Jump to content
Search Community

repeat animation loop

Eugene Rayner 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



Simply trying to have my "clouds" (the red boxes that say cloud) to repeat.

Currently, they are repeating, but the animation doesn't end (the cloud doesn't make it to the other side of the screen)


There are about 5 different clouds on the page and I want them all to move at varying speeds, and then loop once they can no longer be seen on the page.


Any help greatly appreciated.


See the Pen MmzRYb by erayner (@erayner) on CodePen

Link to comment
Share on other sites

Hi erayner_45092,


there are a lot of clouds.


If you mean the 5 "parallax-bg1"-clouds should tween only once just tween without "repeat:-1".
"repeat:-1" is for repeating indefinitely.


In the forked pen I have changed the positions of these clouds:


See the Pen XRyQqE by mikeK (@mikeK) on CodePen



Happy tweening

Link to comment
Share on other sites

  • 2 years later...

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