Jump to content


Timeline animation is different when repeated

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts



I have a timeline which I created beforehand and put it on pause. Then on trigger I run it with 


it plays correctly the very first time but subsequent repeats are not right. What am I missing?


Thanks for help! 

See the Pen aYKWgN by catico (@catico) on CodePen

Link to comment
Share on other sites

Something to do with the offsets ... I've removed them and it appears to be functioning as you would expect it to.


See the Pen RMJZMw by sgorneau (@sgorneau) on CodePen


  • Like 4
Link to comment
Share on other sites

I'm not exactly sure what the animation is supposed to do I think it's supposed to do a kind of double blink but I believe the problem is because the timing on your second "blink" is overlapping the first one.


The first animation would end at 0.9 but your telling the second to start at 0.75.

  • Like 3
Link to comment
Share on other sites

yup. when you have two tweens at the same time trying to animate the same property of the same object you will cause an overwrite which means the new tween will kill the existing tween. Its wasteful to have 2 tweens fighting for control at the same time so GSAP has this optimization built in. So when you play your timeline again, some of the tweens have been killed thus making the animation look different.


2 solutions: 


  • change your timing so that tweens do no not overlap as the guys suggested
  • put overwrite:"none" on the offending tweens


demo of overwrite:"none"


EDIT : Previously had wrong demo here / fixed now


See the Pen oqyGbg?editors=0010 by GreenSock (@GreenSock) on CodePen


  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.