Jump to content
Search Community

Is there a way to create a repeating section on a timeline?

JoelC test
Moderator Tag

Recommended Posts

My timeline is broken up into sections with pauses, and I'm using React state to trigger tweens to various sections.

 

It's set up something like this:

tl.addLabel('section1')
  .move(...)
  .move(...)
  .addPause()

tl.addLabel('section2')
  .move(...)
  .addPause()

tl.addLabel('section3')
  .move(...)
  .move(...)
  .addPause()

 

So when I tween to section2, it'll go though the animations and then pause before section3, until the state is ready for it.

 

My question is whether there's a straightforward way to have that pause be a looping animation, until a tween to section3 is triggered:

 

tl.addLabel('section1')
  .move(...)
  .move(...)
  .addPause()

tl.addLabel('section2')
  .move(...)
  .addPause() // infinite loop while waiting for next tween

tl.addLabel('section3')
  .move(...)
  .move(...)
  .addPause()

 

Thanks!

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