Jump to content
Search Community

Unable to change staggerTo to version 3

Ilima test
Moderator Tag

Recommended Posts

Hey Ilima.

 

The stagger docs cover how to use GSAP 3 staggers though I don't understand why a stagger is required as the original demo has 0 duration between each animation which is the same thing as not having a stagger.

 

cycle was replaced by gsap.utils.wrap, as covered in the GSAP 3 release notes though I don't understand why that original pen used cycle at all, they could just use a functional value for the rotation property. 

 

I think your issue is a React issue and I don't know enough about React to help. Maybe someone else will be able to help.

  • Thanks 1
Link to comment
Share on other sites

On 9/8/2020 at 2:11 PM, ZachSaucier said:

Hey Ilima.

 

The stagger docs cover how to use GSAP 3 staggers though I don't understand why a stagger is required as the original demo has 0 duration between each animation which is the same thing as not having a stagger.

 

cycle was replaced by gsap.utils.wrap, as covered in the GSAP 3 release notes though I don't understand why that original pen used cycle at all, they could just use a functional value for the rotation property. 

 

I think your issue is a React issue and I don't know enough about React to help. Maybe someone else will be able to help.

 

 

Thank you so much! Solved my issue, also looks like I was just not using the state values.

 

gsap.to(".dialGrip", 0.6, {
  rotation: function (i) {
    return i === 0 ? rotation * 2 : rotation * 3;
  },
  stagger: 0,
});

 

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