Jump to content
Search Community

Initial Speed of animations

hackfin 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

I am working on a simple vertical accordion menu and I noticed that the animations that I created run much slower the first time they are triggered and the correct speed every subsequent trigger.  Is there something obvious that I am missing or is my javascript just hosed?  Any help is appreciated.

See the Pen KvWzPE by hackfin (@hackfin) on CodePen

Link to comment
Share on other sites

Hi @hackfin:)

 

They run faster on subsequent plays because you're setting .timeScale(3) on line 39 when you reverse. If you'd like them all to play at a timeScale of 3 just add that timeScale to the play on line 33. If they should run slow on play and fast on reverse you can just set the play timeScale back to 1 on line 33.

 

Does that help?

 

Happy tweening.

:)

  • 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.
×
×
  • Create New...