Jump to content
GreenSock

edbras

Supported Duration values?

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

The JS api doc's say that the duration of a tween has to be in seconds. Can this be values less then 1s, like 0.6 (600ms), or 2.54 second? 

I think so, just checking, as I am not completely sure...... Or does it round/truncate the numbers?

Thanks

 

Link to comment
Share on other sites

The JS api doc's say that the duration of a tween has to be in seconds. Can this be values less then 1s, like 0.6 (600ms), or 2.54 second? 

 

 

Yup.

 

This might come in handy to test other similar assumptions in the future:

http://codepen.io/GreenSock/pen/loeAB

  • Like 1
Link to comment
Share on other sites

Carl beat me to it :P

 

yes you can have values of the duration like you described

// (number in ms / 1000)
600ms = 0.6
2540ms = 2.54

:)

  • Like 1
Link to comment
Share on other sites

This might come in handy to test other similar assumptions in the future:

See the Pen loeAB by GreenSock (@GreenSock) on CodePen

Yes, true, completely forgot, so stupid... simple I could have used the demo code, there is plenty around on codepen....

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