Jump to content
Search Community

GSAP v3 Timeline '.clear' issue

angelgbg test
Moderator Tag

Recommended Posts

Hello,

 

I'm trying to migrate a project from TweenMax v1.17.0 to gsap v3.2.0, but I'm facing some issues.

 

Even though I'm currently using an older version of gsap, I'm finding those issues when I compare TweenMax v2.1.3 with gsap v3.0.0.
What I have is a timeline where I add new tweens infinitely(like a loop) until some event happens and adding the tweens should stop. At that point I `clear` the timeline and add a final tween on the same target.

 

Using TweenMax v1.17.0(also v2.1.3) everything run smoothly (please open then link and check the pen's console).

LINK: TweenMax v1.17.0


However when I use gsap v3.2.0(also v3.0.0), the final tween is executed immediately without any tweening (please open then link and check the pen's console).

LINK: 

See the Pen poJeMoV by angelgbg (@angelgbg) on CodePen


I believe the problem is when I call `timeline.clear` which I think works differently than before.
I know than when stopping the loop I can kill the timeline and create another one, but there is more logic around this timeline which is not in the pen and ideally I would like to keep the current timeline, but just clear all existing tweens.

 

Has anyone noticed this issue and have you found a work around?

 

Thank you in advance!
 

See the Pen oNXZKJY by angelgbg (@angelgbg) on CodePen

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...