Open sendel opened 11 years ago
you're incorrect. take a look at this line:
https://github.com/ericdrowell/KineticJS/blob/master/src/Animation.js#L200
only one animation loop is used for all animations.
var any1 = new Animation(); ... var anyN = new Animation();
for every anyN will call this function! When its RAF (window.requestAnimationFrame ) that ok, but if set FRAF (setTimeout) for each objects will create self timer!
Oh I see what you mean, you're referring to the FRAF exclusively. okay thanks, I'll take a closer look at this :)
When Kinetic.Animation create, it set RAF function for each animtion object. If i want use FRAF hardly, it create setTimeout for each object! Its no good.
I think need create one global function, that work with all instance, for example put callback functions to array...
/* Example, not full tested. WARNING raf only FRAF (setTimeout())!!!! */