Jump to content
Search Community

TimelineMax problem with staggers and position parameter

federicovezzoli 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

As you can see in the codepen, when I have two staggers one after another, the position parameter of the second stagger is not respected.

The second stagger always start after the first one is done.

I've tried with a label, nothing changes.

 

Anyone can shed some light? Am I missing something?

 

thanks a lot

See the Pen RzjNVb by federicovezzoli (@federicovezzoli) on CodePen

Link to comment
Share on other sites

It's because you're setting the 0.5 in the default "stagger" place.

 

Have a look at the docs for a full listing of the properties.

 

// Instead of this
.staggerFromTo(second.children, 0.7, { opacity: 0, yPercent: 50 }, { opacity: 1, yPercent: 0, ease: Sine.easeOut, stagger: 0.1 }, 0.5)

// You want this
.staggerFromTo(second.children, 0.7, { opacity: 0, yPercent: 50 }, { opacity: 1, yPercent: 0, ease: Sine.easeOut, stagger: 0.1 }, null, 0.5)

 

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