Jump to content
GreenSock

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

Initial Speed of animations

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 post
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 post
Share on other sites

That was it.  I knew it had to be something simple.  Thanks for your help!

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

×