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
In the code below, create a new timeline and append 5 tweens to it.
And then play the timeline that repeats infinite times.
The tweens add 1 to 'counter' and set it to 0 at the end.
"counter" must be 0 or 1.
If counter reaches higher than 1, tween throws an error.
If the timeline is played properly, there should be no errors.
But it is there.
varcounter=0;// <-- This must be 0 or 1vartm=newmojs.Timeline({repeat: 0,onComplete: function(){tm.reset();tm.play();}});functionnewTween(){constt=newmojs.Tween({duration: 500,easing: 'linear.none',repeat: 0,onStart: function(){counter++;console.log(counter);if(counter>1)throw'BAD!!';// <-- This must not happen},onComplete: function(){counter=0;}});returnt;}for(vari=0;i<5;i++){tm.append(newTween());}tm.play();
The text was updated successfully, but these errors were encountered:
Unfortunately I haven't much time to check this in the next few days, may be this weekend..
I will let you know anyway and give the appropriate answer 😉
mojs version 1.7.1 (CDN)
In the code below, create a new timeline and append 5 tweens to it.
And then play the timeline that repeats infinite times.
The tweens add 1 to 'counter' and set it to 0 at the end.
"counter" must be 0 or 1.
If counter reaches higher than 1, tween throws an error.
If the timeline is played properly, there should be no errors.
But it is there.
The text was updated successfully, but these errors were encountered: