Jump to content
Search Community

Carousel Wrap Use- Noob Question

matttaylor 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

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.

 

http://codepen.io/GreenSock/pen/kkYrXP

 

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.
×
×
  • Create New...