Jump to content
Search Community

Nested Timelines from Function Returns

dev-kp test
Moderator Tag

Go to solution Solved by dev-kp,

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,

 

Been trying to get this to work for a little while now, a bit stuck.

 

CodePen:

See the Pen jbMWxy by Dev-KP (@Dev-KP) on CodePen

 

Basically the individual animations work:

.add(aninIn(copy1, 20))
//.add(aninOut(copy1, 20))
 
When one of them is commented out the other will work perfectly, but having them both there seems to make them merge. 
I'm guessing it's something to do with the .set in the returned tiimelines?
 
 
If I am not mistaken the nested timelines should play one after another?
Or is this something for immediateRender?
 
Cheers
P
Link to comment
Share on other sites

Yup I did have a look at that post. The work around seems workable but a bit odd. If I build a normal timeline, with a bunch of add() and set() with out using nested timeline the set() seems to work correctly. But nested timelines run immediately, wonder if a call() function would cause the same issue?

 

Guess will be using the 0.01 duration fix for the time be. 

 

Cheers,

 

P

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