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
I would expect that any quantity of tweens started from the same "frame" would be always syncronized. But since SimpleActuator set the "startTime" var with:
Lib.getTimer()
every time a new tween is instantiated, each instance gets a slightly different time and thus get desynchronized from the others.
As a fix suggestion, maybe instead of lazily listening to Event.ENTER_FRAME, listen to it before any tweens are instantiated and keep a single value from Lib.getTimer() as startTime.
The text was updated successfully, but these errors were encountered:
guifes
changed the title
I started a bunch of tweens in the same for and they are not synchronized
I started a bunch of tweens in the same "for" and they are not synchronized
Dec 6, 2021
#117 I've created a PR to fix this. Hope it helps. I think the PR version is better since, it guarantees that for all actuators instantiated in the same frame, they all get the same startTime, as already happens with "stage_onEnterFrame" that is called only once per frame and calls update on every actuators with the same "currentTime" instead of fetching a new Lib.getTimer() for each one.
I would expect that any quantity of tweens started from the same "frame" would be always syncronized. But since SimpleActuator set the "startTime" var with:
every time a new tween is instantiated, each instance gets a slightly different time and thus get desynchronized from the others.
As a fix suggestion, maybe instead of lazily listening to Event.ENTER_FRAME, listen to it before any tweens are instantiated and keep a single value from Lib.getTimer() as startTime.
The text was updated successfully, but these errors were encountered: