Jump to content
Search Community

Simple timeline question: continue repeat: -1 loop?

Makaak 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

I have a very simple question and made a codepen to demonstrate.

I have a timeline with 2 tweens. First changes autoAlpha to 1 and has infinite repeat, second one moves y: 150 down. My timeline doesn't jump to the second tween since first one has repeat: -1.

 

How can i make it jump down to next tween while keeping the infinite repeat running?

 

See the Pen NpYowo by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi Makaak :)

 

Yes - you're right. An infinitely repeating tween won't allow the next tween to run. There are a few options available for you. You can call the infinite tween in a function, use the position parameter or use recent() and endTime(). We had a similar question and discussion that I think will help you:

 

https://greensock.com/forums/topic/13717-infinitly-repeating-tween-stops-timeline/

 

Happy tweening.

:)

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