Jump to content
Search Community

Second Timeline Faster Than First (same settings)

notalkingplz test
Moderator Tag

Go to solution Solved by Diaco,

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

Yup, Diaco's solution is great. Much better to just reverse an animation than worry about 2 separate animations affecting the same properties of the same element. 

 

To explain why open appeared faster than close consider the following:

 

div has an x of 0% when your page loads.

When you open you tween the x of div to -100% (traveling a distance of 100%)

 

 

when you close you tween the x of div from -100% to +100% (traveling a distance of 200%)

You are going twice the distance with close over the same amount of time (appears faster).

 

I think you meant for close to tween back to the starting x of 0% (not +100%)

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