Jump to content
Search Community

How to put multiple elements grouped through the same animation on scroll?

vialito 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

Hello everyone,

 

I'm trying GSAP and Scrollmagic for the first time.

 

This is what I'm trying to achieve:

 

There are multiple sentences, 15 in this example. At first you can't see anything. When you start to scroll, the first sentence should appear at the 3rd position. When scrolling further down, this first sentence should move up to the second middle position and scale 2. Now the next sentence should appear on the previous position of the first sentence. Finally, When scrolling even further down, both sentences should move up again when when scrolling further down, taking each other's places. Until you've finished scrolling though all sentences.

 

The attachment shows what the container containing the text should look like when scrolling. When starting to scroll only one sentence, the first, should be visible. Then two and max three.

 

I've gone from toggling classes to setting multiple tweens, to staggering tweens to using cycles but I still feel I'm missing out on something.

 

 

qE5gZ.png

See the Pen WVjJoe by vialito (@vialito) on CodePen

Link to comment
Share on other sites

  • vialito changed the title to How to put multiple elements grouped through the same animation on scroll?

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