Jump to content
Search Community

How to make both my timelines take the same length of time to complete the animations (10 seconds)

k1ngy.eth test
Moderator Tag

Recommended Posts

Calculate the duration of each tween and the overlapping of it and adjust. 
By default duration is 0.5 for each tween. 

Duration property on scrollTrigger will no work.

Total duration of tl3 is 11*0.5 = 5.5.

In the tl2 timeline if you give duration 1 to the first tween. So the total duration becomes 2.75. See what factor you can add to duration each tween to get 10. 

I hope this helps. I don't think there is a direct way to make total duration of a timeline except if you are using stagger. 
 

  • Like 1
Link to comment
Share on other sites

Hi,

 

Is really hard to troubleshoot without a minimal demo, based on the code you just posted.

 

The one thing that I can see is that you are setting a duration to the ScrollTrigger instance. ScrollTrigger doesn't work based on time but in the current scroll position, especially since you are using scrub: true or with some numeric value passed to it.

 

I strongly recommend you to take a look at the ScrollTrigger docs:

https://greensock.com/docs/v3/Plugins/ScrollTrigger

 

Also take a look at this video @Cassie made in order to get a better grasp on working with ScrollTrigger based animations:

Happy Tweening!

  • 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.
×
×
  • Create New...