Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
olhapi

Stagger issue, 2 elements animating without delay

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 I have 3 elements with the same class. At the start of animation 2 of them starting instantaneously and only third one after a desired delay. How to fix that?

See the Pen rQKber by olhapi (@olhapi) on CodePen

Link to comment
Share on other sites

Please check the stagger type in the docs.

https://greensock.com/docs/TweenMax/static.staggerFromTo()

 

stagger: Number

 

These are not the same.

 

'0.4' !== 0.4

 

Try this. There is no need to specify an ease in the from object.

 

TweenMax.staggerFromTo('.js-svg-roll', 1, {
  opacity: 1, 
  rotation: -4, 
  x: -32,
}, {
  opacity: 1, 
  rotation: 0, 
  x: 0, 
  ease: Back.easeOut.config(1.7),
}, 0.4);

 

 

This is also going to cause problems.

 

.js-svg-roll {
  transform-origin: bottom left;
}

 

 

You should use GSAP to set transforms and any transform origins  you plan to animate.

https://greensock.com/forums/topic/19333-troubles-with-svg-animation-and-mastertimeline/?tab=comments#comment-89854

 

 

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

×