Jump to content
Search Community

Looping timeline startpoint offsets confusion

vektor 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

Hey! 

 

So I have a timeline loop that should loop infinitely, each new timeline has a negative offset to keep the loop from having a gap at the beginning of each timeline 

 

I can achieve the desired effect by adding the same timeline with negative delay multiple times ( lots of timeline.add(anim(), "-=3") )

 

But for some reason today I can't wrap my brain around how to do this nicely?

 

I have tried various things, negative repeatDelay, onComplete set time() / progress(), but none of them quite work. Something like 2 timelines and the second one loops forever sounds like the right way to do it?

 

Please look at the codepen and all should be made clear, on each 'repeat' of the master timeline there is a gap  

 

Thank you in advance ? I'm so sure it's something really simple that I'm overlooking!?!

See the Pen jjbbwB?editors=1111 by bananafarma00 (@bananafarma00) 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...