Jump to content
Search Community

Looping animation

fernandofas test
Moderator Tag

Go to solution Solved by Dipscom,

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

Hi Fernando,

 

Well done on your demo. 

 

Is there anything in particular that you are after when you ask how to make it better? To me, that's nice enough as it is. Code is ok, there is no need to go into more complex setup for a banner like that. So, I would say, you're on the money on that one.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Dipscom,

 

 

Thanks for your reply.

 

I'm really struggling on looping the whole animation.

I've read many different options, but unfortunately none worked for me.

 

Do you think there is a proper way to make it work?

 

Let's say I want to loop the animations 3 times from start to finish.

 

Thank you very much in advance.

Link to comment
Share on other sites

  • Solution

Hi fernandofas,

 

I am a bit confused as to what your struggle is. Your animation is already looping. If all you want is for it to loop three times, just change:

var tl1 = new TimelineMax({repeat: -1, repeatDelay:1});

to

var tl1 = new TimelineMax({repeat: 2, repeatDelay:1});

Also, a pet peeve of mine: When you say: "I want to loop the animations 3 times from start to finish" - you mean: "I want to play the animations 3 times from start to finish", right? Because if you say "loop 3 times", the animation will play 4 times.

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