Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
bfred.it

Add tween/label after the last one added, not at the end of the timeline

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

Carl, thanks for the answers buddy 8-)

 

I agree with Jamie, Carl and Jack in terms of extending the API for something that basically represents 1% of the cases, something that usually goes under a lot of review, like this topic. Also I never considered how this would affect new users and how complicated could turn out for someone new to GSAP.

 

Finally, as Jamie points a situation like this one could be solved with labels, duration, and startTime, and if you add to the mix recent and endTime you can land perfectly in the position where any instance ends in the timeline, so you can sequence anything after that one independently of where is positioned and how long the timeline is. The main reason I was leaning towards adding something like this in the API, is for specific scenarios when the math part of calculating an instance position could become a nightmare for the user and appendMode seemed to do that (among other things) with just an extremely short amount of code, but recent and endTime offer a great solution for that scenario.

 

Adding recent as a method gives more flexibility, specially if in the future an extra feature could be needed.

 

Rodrigo.

  • Like 2
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.
×