Share Posted June 10, 2022 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 More sharing options...
Solution Solution Share Posted June 10, 2022 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. See the Pen 9ad77250a0432d7baf26d1e377b56d5d by PointC (@PointC) on CodePen Hopefully that helps. Happy tweening. 3 Link to comment Share on other sites More sharing options...
Share Posted June 10, 2022 It just occurred to me that you may have wanted the echoes to all come to a stop before it repeats. If that's the case, using amount for the stagger and an equal value for the repeatDelay would work well. Happy tweening. See the Pen d29854ac5aaca6dd46fcd8d50dbcdc73 by PointC (@PointC) on CodePen 1 Link to comment Share on other sites More sharing options...
Author Share Posted June 10, 2022 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! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now