Jump to content
Search Community

How to Carry forward an animation from one timeline to another?

Sajidul Islam test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hi,

 

I've been struggling to make an animation and I couldn't find a way to do this.

 

As per my demo, Lets say I have 4 different section and timeline. An elements should start animating from the first timeline and it will continue from the second timeline and so on.

 

In my demo it's bit jumpy and Its not smooth at all.  (Please see the comment's inside the code for more details)

 

I tried to do it with addPause and it didn't work as expected.

 

 

Any help would be highly appreciated.

 

 

Many Thanks,

Sajidul

See the Pen JjxxvRX by sajidulislam0 (@sajidulislam0) on CodePen

Link to comment
Share on other sites

I would span the whole ScrollTrigger over all the sections and use one timeline to control everything 

 

See the Pen wvNNXpv?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

 

Or again use one timeline and have each ScrollTrigger tween to the next label on the timeline, this is a lot more involved and you'll need to do some custom logic on what to do when the visitor scrolls back (tween to previous label) and what do to when someone scrolls past everything really fast. Personally I use codepen to try out new ideas, I usually then just keep forking my pen to try out different ideas, either because I think it could be better or my original idea was not working. Usually at version 10 I got something I'm happy with. Creating forks of your pen will allow you to fall back at earlier ideas if something new is not working.

 

Hope it helps and happy tweening! 

 

See the Pen wvNNxwW?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

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