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
Given the above code - 'Starting' is never output to the console.
However, it is possible to get onStart to fire by placing the tween in a timeline.
var timeline = TINA.Timeline();
var obj = { x: 0 };
var testTina = new TINA.Tween(obj, ['x'])
.to({ x: 10 }, 200)
.onStart(function () {
console.log('Starting');
});
timeline.add(testTina, 0);
timeline.start();
It is likely this occurs because an individual tween is appears to never be added to the list of _inactivePlayables. A cursory glance suggests that it is only when a tween is removed from the _inactivePlayables list and set to active that the onStart callbacks are fired.
It should be possible to add a fix the Playable.start method to also fire the onStart method.
The text was updated successfully, but these errors were encountered:
mjm973
added a commit
to mjm973/tina.js
that referenced
this issue
Jul 6, 2018
When creating an individual tween, all callbacks work, with the exception of the onStart.
Given the above code - 'Starting' is never output to the console.
However, it is possible to get onStart to fire by placing the tween in a timeline.
It is likely this occurs because an individual tween is appears to never be added to the list of _inactivePlayables. A cursory glance suggests that it is only when a tween is removed from the _inactivePlayables list and set to active that the onStart callbacks are fired.
It should be possible to add a fix the Playable.start method to also fire the onStart method.
The text was updated successfully, but these errors were encountered: