You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
creating thousand of new tweens is a costly operation because it involves a lot of prototype instancing, playing with lambdas, and memory writing, during gameplay the framerate drops quickly :(
it would more efficient to have a pre-allocated array of tweens, pre-initialized with same functions, and recycle them. also, maybe we should compare the function to just reusing existing one (ie. if we have 100000 tweens, to not create 100000 lambdas but reuse the same)
actually I need to check the inside of tween.js, either we fork tween.js to add ra .recycle() function, or we create our own, if the tween.js architecture doesn't allow this kind of modification.
The text was updated successfully, but these errors were encountered:
creating thousand of new tweens is a costly operation because it involves a lot of prototype instancing, playing with lambdas, and memory writing, during gameplay the framerate drops quickly :(
it would more efficient to have a pre-allocated array of tweens, pre-initialized with same functions, and recycle them. also, maybe we should compare the function to just reusing existing one (ie. if we have 100000 tweens, to not create 100000 lambdas but reuse the same)
actually I need to check the inside of tween.js, either we fork tween.js to add ra .recycle() function, or we create our own, if the tween.js architecture doesn't allow this kind of modification.
The text was updated successfully, but these errors were encountered: