omni360 / kuda

Automatically exported from code.google.com/p/kuda
GNU General Public License v2.0
0 stars 0 forks source link

Implement optional support for requestAnimationFrame in o3d-webgl client.js replacing the interval timer #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
WebGL browsers have implemented versions of requestAnimationFrame eliminating 
the need for setTimeout or setInterval timers. See 
http://paulirish.com/2011/requestanimationframe-for-smart-animating/ as a 
reference. Initially implementing this as an option and hopefully in the future 
we can use it solely.

Original issue reported on code.google.com by jpywt...@gmail.com on 10 May 2011 at 10:25

GoogleCodeExporter commented 9 years ago
Added optional support for requestAnimationFrame. Holding off from turning it 
on permanently due to strange issue with Chrome 11 where camera calls to 
transform translate with undefined arguments. This is the error "Uncaught 
TypeError: Cannot read property '0' of undefined". Inserting a simple line of 
code in that function to test for undefined arguments, essentially a no-op 
eliminates the error.

// Example of using the experimental support for requestAnimationFrame in user 
scripts
clearInterval(o3d.Renderer.render_callback_interval_);
o3d.Renderer.installRequestAnimationFrame();
window.requestAnimationFrame(o3d.Renderer.renderClients);

Original comment by jpywt...@gmail.com on 10 May 2011 at 11:21

GoogleCodeExporter commented 9 years ago
Marking verified to denote this issue was part of 1.3.1 release.

Original comment by erik.kit...@gmail.com on 13 May 2011 at 5:34