Jump to content
Search Community

Infinite items on a bezier curve

daversa

Go to solution Solved by OSUblake,

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

Posted

Hi All,

 

I've been banging my head against this for a while, I've been trying to use particle emitters, and about everything else I can think of but I need some help with this. Basically, I want to replicate the attached pen but have an infinite amount of creatures spawned along the bezier curve with no breaks. I'm able to repeat the animation obviously but there's always a break in the chain as it repeats. Any help would be greatly appreciated!

 

Thanks,

-Dave

See the Pen pjOORL?editors=011 by anon (@anon) on CodePen.

Posted

Hi Diaco, 

 

Thanks for taking a look, but your pen isn't working for me. Still editing by chance?

Posted

Ok, works now! So the only other issue I'm having is that I need these elements to appear at an even pace. It seems like I can't get any sort of spacing unless it's using Math.random()*10 for the delay. If I put a defined value there they all come out in one chunk. I think I'm missing something because isn't it just multiplying a random number  0 < # <1 x 10? Why wouldn't a fixed value behave similarly?  

 

 

Thanks again for your help.

  • Solution
Posted

AltaVista  :shock:  Haven't seen that in awhile.

 

I just went over the problem with creating tweens in loop a couple of days ago. This particular post is relevant to your timing issue.

http://greensock.com/forums/topic/12772-animation-in-a-loop/?p=53588

 

You can either use a timeline or stagger the delay somehow. I just used the index of the loop.

See the Pen jbveXN?editors=001 by osublake (@osublake) on CodePen.

  • Like 1
Posted

Forgot to mention that the reason the random value is working is because it's creating a range of 10 seconds to chose from.

Posted

OSUblake, thanks so much—that did the trick! (index)

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