Jump to content
Search Community

How to loop a GSAP Animation? Help!

bosecodes101 test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

  • bosecodes101 changed the title to How to loop a GSAP Animation? Help!
  • Solution

Hi @bosecodes101 welcome to the forum! 

 

Ha you've found the tweens, but did you know you can write a timeline in GSAP and it will calculate all the delays for you! No need to add them manually or update them when you tweens will change (and believe me they will!)

 

I've changed a lot around in your pen, but the logic is still the same. The timings could be better, but I'll leave that to you. I've placed a lot or comments in the code to explain certain parts better. If you have questions feel free to ask them. Hope it helps and happy tweening! 

 

See the Pen rNQyPGw?editors=1010 by mvaneijgen (@mvaneijgen) on CodePen

 

My advise would also be read to these post to get a better understanding of everything that is possible with GSAP:

https://greensock.com/get-started/
https://greensock.com/get-started-2

  • Like 2
Link to comment
Share on other sites

On 6/29/2023 at 1:52 PM, mvaneijgen said:

Hi @bosecodes101 welcome to the forum! 

 

Ha you've found the tweens, but did you know you can write a timeline in GSAP and it will calculate all the delays for you! No need to add them manually or update them when you tweens will change (and believe me they will!)

 

I've changed a lot around in your pen, but the logic is still the same. The timings could be better, but I'll leave that to you. I've placed a lot or comments in the code to explain certain parts better. If you have questions feel free to ask them. Hope it helps and happy tweening! 

 

 

 

 

My advise would also be read to these post to get a better understanding of everything that is possible with GSAP:

https://greensock.com/get-started/
https://greensock.com/get-started-2

Thank you so much! This helps me a lot!! You have skyrocketed my intrest in GSAP!

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