Closed danro closed 12 years ago
actually, there is one last race condition. hold plz.
Ah that's better.
Been doing some work with canvas / svg animation and I think perhaps we should change the 11ms to something closer to the 1000/60 mark. Raphael.js uses 16ms and D3.js uses 17ms. I'm leaning toward 17, because it gives mobile devices that much more time to draw before requesting the next frame. Thoughts?
Based on this idea: http://jsperf.com/centralized-animation-loop
Moved all tween frame event listeners to a single render loop. This is how my AS3 tweening engine works, and I've seen nice benchmark gains in the past. It should also have the added bonus of keeping multiple tweened properties in better sync (since we're not depending on multiple setTimeouts to fire at the same time).