GSAP delay and repeat property

 GSAP delay and repeat property


delay: how much time should transpire before animation begins

repeat: how many times the animation should repeat

yoyo: when set to true the animation will play back and forth

repeatDelay: how much time should transpire between each repeat


gsap.to(".box", {x:300, repeat:-1, yoyo:true, repeatDelay:1});

Now this will repeat forever, 
going back to left side from right side slowly is due to yoyo property, otherwise, when reaching at right side, it directly goes to left and but with yoyo we can see box going slowly towards left side


Comments

Popular posts from this blog

CSS simple grid layout

Gsap timeline position parameters

GSAP Timelines