Jump to content
Search Community

Check if tween var has finished

icraft-websites 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

Hi,

 

Well the easiest way is using an onComplete and/or onReverseComplete callback in the instance.

 

Another option is check if the current time is equal to the instance's duration or check the instance's progress, 0 means at the beginning of the instance and 1 means that the instance has finished.

 

As you can see there are a few options and as usual a reduced codepen sample could really help us narrow down which option could be the best.

 

Rodrigo.

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