Jump to content


Carousel Wrap Use- Noob Question

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

Saw this website http://www.invstr.com that uses Greensock. I was wondering how the background ticks(grey rectangles) were in a animated loop that when they past the viewport they automatically started at the top again... could that be achieved somehow with modifiers plugin like the carousel wrap example?



Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,


I wasn't able to dig through the source code, but my guess would be that they are just using repeating tweens. Not sure ModifiersPlugin would be necessary there.

Link to comment
Share on other sites

mm.. I understand the concept to go from y-0% to y-100%.but when the page loads the ticks are given a random offset from the top. each one of them has a different duration and then once they exit the view they start at the top without the offset.  I guess that is why they are the pros cause they good..  can't wrap my head around this one... how to reset animation once they leave viewport and continue...

Link to comment
Share on other sites

Thanks for the clarification. In that case you can create a bunch of repeating tweens that all animate from y:0 to y:500 (or whatever values) but place them in a timeline with randomized start times and durations. Then you can just start the animation by jumping to the middle of the timeline to a point where most of the tweens have made some progress.




See how play(0) always starts with each element coming in from the top but play(3) starts with some elements with a vertical offset?


All elements will wrap up to the top when they get to the bottom because the tweens repeat.

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.