Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Victor Work

Tween to Point (label) of Timeline. [SOLVED]

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 Gsap'ers.

Is there a way to go to a label other than just jumping?
Example: When clicking the button it goes from the current point of the timeline to the label, but keeping the tweens in sequence.

 

 

See the Pen RQxXvW by Noturnoo (@Noturnoo) on CodePen

 

Link to comment
Share on other sites

Hi @Noturnoo

 

If I understand your question correctly, I think you're looking for the .tweenFromTo() method.

https://greensock.com/docs/TimelineMax/tweenFromTo()

 

You could tween from the current time of the timeline to the label with something like this:

tl.tweenFromTo(tl.time(), "label");

 

Hopefully that helps. Happy tweening.

:)

 

  • Like 5
Link to comment
Share on other sites

Thanks @PointC,

Exactly this, there is a way for me to assign a duration time to this animation?

Link to comment
Share on other sites

You could do something like this:

 

tl.tweenFromTo(tl.time(), "label").duration(2);

 

Hopefully that helps. Happy tweening.

:)

 

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