Jump to content
Search Community

Timeline restart has delay?

Tedev test
Moderator Tag

Go to solution Solved by PointC,

Recommended Posts

Good day!

After messing with some more GSAP I found some fun stuff to work with.
Currently I'm messing with this timeline, which I'd like to have animate instantly after completion.
But even after giving 0 delay to the timeline AND the tweens it seems after each timeline-restart it adds a delay exponentially.
My question is: Why is this? Haven't I given all properties 0 delay?

Thanks in advance,

Tedev

See the Pen bGLQqXz by tedev (@tedev) on CodePen

Link to comment
Share on other sites

2 hours ago, PointC said:

That's because of your onComplete. You're adding tweens to the end of the timeline on each repeat so the timeline is getting longer and longer. I assume you just wanted something like this.

 

 

 

 

Hopefully that helps. Happy tweening.

:)

 

 

 

Thanks for your fast reply!
This is indeed the issue I was encountering!

After looking at the fix I realize my mistake.

Thanks for the help, Craig! :)

  • Like 2
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...