greensock timline does not work properly -
my greensock timeline executes second timeline instruction. if comment out second one, first tween works. wrong timing?
tl.to($img, .3, {rotation: 0, ease:linear.easenone}, 0) .fromto($img, .3, {rotation: 0, ease:linear.easenone}, {rotation: 10, yoyo:true, repeat:-1, ease:linear.easenone}, 0);
that last parameter on each of timeline calls called position parameter. setting parameter 0 on both method calls telling both animations tu run @ 0 seconds mark of timeline. being beginning. telling both animations execute @ same time why see second animation , when delete call see first. so, if want 1 animation run after should remove position parameter altogether second fromto call.
you can define offset meaning can set second animation run before first ends or after. setting position parameter '-=0,5' start second animation 0.5 before first animation finishes or '+=0.5' start animation .5 seconds after.
Comments
Post a Comment