Closed electronicdreamer closed 9 years ago
Hi, No, it's not supposed to work that way, it's a bug, thanks for reporting it. It is happening because the callback is inside the same loop that will trigger the next tweens. so until I'm able to fix it, I can suggest you a temporary workaround, with a small negative offset for the callback, like this: timeline.add(pause, '-=1ms'); It should achieve the same visual result. I'll let you know as soon as it is fixed, thanks again for the report.
Hello again,
That temp fix seems to work in the case of a .to() call but not a .fromTo(), I updated the example.
If there's no workaround for that one, I'll wait for the fix. Thanks!
Hi, sorry for the delay, I was very busy at work. In order to achieve what you need in a coherent way across the different drivers, I added a new method addPause() if you don't specify an offset as first param, it is added at the end of the current timeline. You can also bind a callback call to the pause. Some examples:
// no offset, no callback, just pause at the current final position
line.addPause();
// add a pause to specific position
line.addPause('0.8s');
// pause + callback
line.addPause('+=300ms', function() {});
Let me know if you have any issue or question about it.
Finally had time to work on the project and test this.
Thanks!
Hello,
I'm trying to animate several objects with tweene. I want the animation to pause each time one tween finishes so I tried adding a callback after each .to() call.
But it does nothing. Is it supposed to work that way? Example Thanks