Jump to content
GreenSock

pier

What happens when Tweenlite.to is called a second time with the same end value?

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

So lets say I tween opacity to 0, and before the tween ends I make a new call to Tweenlite.to to opacity 0 on the same object.

Does Tweenlite ignore the second tween?

Does it start again from the current opacity value and "resets" the easing curve?

Link to comment
Share on other sites

Yep, by default the new tween will overwrite the previous one. So if you're tweening from 1 to 0 linearly, and then halfway through that tween, you start another tween to 0, it'd go from 0.5 to 0 over the duration you set on that 2nd tween. 

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