Jump to content
Search Community

Particle Animation using GSAP v3

rdgAtl test
Moderator Tag

Recommended Posts

Greetings all,

I'm working on a project and would like to use the code from this pen as a starting point for what I would like to accomplish. However, when I download the pen and update the gsap library to the latest and greatest version, the emitter on shoots one single particle then stops. Checked my console and no errors are being thrown. Any ideas what I need to edit in order to make this work correctly?

Thank you,

Renard

See the Pen rJtjw by jamiejefferson (@jamiejefferson) on CodePen

Link to comment
Share on other sites

22 minutes ago, ZachSaucier said:

Hey Renard. I think the GSAP 3 Migration Guide and, if necessary, the Release Notes can help you get up to speed on GSAP 3. If you're still running into issues, please create a minimal demo of the issue using something like CodePen :) 

Thanks Zach! Looking through the documentation and I can't see any syntax that I over looked(?) Here is a basic pen of my problem. As you can see, it fires only a single particle one time...

See the Pen YzqrYQm by rizzy3000 (@rizzy3000) on CodePen

Link to comment
Share on other sites

Good work! I think this might be a minor bug with zero duration timelines being repeated. If you add a tween with a really small duration it fixes the issue:

gsap.timeline({repeat: -1}).to({}, {duration: 0.001}).call(shootDot, [emitter], null, 2 / dotQuantity);

See the Pen RwaLxyP?editors=0010 by GreenSock (@GreenSock) on CodePen

Side note: I also switched out the random function for GSAP 3's built in random utility method.

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