Jump to content
Search Community

How to control scrub animations

Jona Anders test
Moderator Tag

Recommended Posts

Thanks for the fast reply!

Sorry that my explaination wasn't good. I try to explain the scrollanimation. I have 3 elements, a,b and c. Element a is moving in x direction. When it reaches 50% of the way, element b should rotate, during element a is moving. Without a pause or something like this. After elemnt a reaches its ending position, element c will change its color.  I have made it a scrub animation, so delay don't work.

Here is a codepen with a simple example what I did:

See the Pen rNerRYY by JonaAnders (@JonaAnders) on CodePen

 

Link to comment
Share on other sites

Thanks for the minimal demo! That's very clear.

 

Since the default duration of tweens is 0.5, you should set the start time of the second tween to 0.25. What might make things easier to think about is changing the default duration of the tweens in the timeline to 1 instead. It won't affect the scrub effect but it will make conceptualizing timings a little easier.

 

Here's how I'd set it up:

See the Pen oNxMraV?editors=0010 by GreenSock (@GreenSock) on CodePen

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