Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Particles, nested timeline, repeat problem

Go to solution Solved by Cassie,

Recommended Posts

I have 2 functions:  generateParticles and animateParticles ( w. an inner timeline ).

I also have a 'Main Timeline':  gsap.timeline( { repeat: -1 } ).call( animateParticles, [numParticles - 1], '-=0' );

The problem is that 'animateParticles' executes only ONE time - the function will NOT repeat.

How can I make the function 'animateParticles' repeat itself after the first execution - play multiple times ?


See the Pen QWMZxOB by steinarV (@steinarV) on CodePen

Link to comment
Share on other sites

  • Solution

Hey there @SteinarvDesign,

I may be misunderstanding - so apologies if so - but are you sure you want to call that function multiple times?

Maybe an easier way would be to just repeat the timeline created inside that function?


let pTimeLine = gsap.timeline({repeat: -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.