Jump to content
Search Community

Timeline animation is different when repeated

catico test
Moderator Tag

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'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.
×
×
  • Create New...