d-sheep Posted November 15, 2021 Share Posted November 15, 2021 Hi, in GSAP v2 it was possible to add nested timelines to a main timeline with a stagger by specifying two additional parameters like so: const timelines = [tl1, tl2, tl3]; const mainTimeline = new TimelineMax(...); mainTimeline.add(timelines, 0, 'start', 0.1); How can I achieve a stagger when adding a possibly unknown number of nested timelines in GSAP v3? It seems that this functionality has been abandoned since timeline.add() only takes 2 parameters now. Link to comment Share on other sites More sharing options...
Cassie Posted November 15, 2021 Share Posted November 15, 2021 Hey @d-sheep, Welcome to the forums! You can still pass a position parameter - so you could do something like this - timelines.forEach((tl, i) => { mainTimeline.add(tl, i * 0.1) }) Hope this helps! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now