OpenWebGlobe / WebViewer

Engine development: OpenWebGlobe for WebGL
http://www.openwebglobe.org
Other
157 stars 76 forks source link

Use requestAnimationFrame if available #2

Closed twpayne closed 13 years ago

twpayne commented 13 years ago

This patch add support for requestAnimationFrame if is available. This means that the scene will not be rendered if it is not visible.

See: http://paulirish.com/2011/requestanimationframe-for-smart-animating/ http://www.khronos.org/webgl/wiki/FAQ#What_is_the_recommended_way_to_implement_a_rendering_loop.3F