Jump to content
Search Community

particles : Animate CC + GSAP

fripi test
Moderator Tag

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,

 

first of all sorry there will not be a codepen as it's specific to Animate CC.

I'm not very experienced in canvas coding and particle effects... so I found some code and tried to adapt it to work in A.CC, you'll find the project attached.

 

Now my questions are :

  • how get rid of the trail, as it draws a new circle every time and doesn't delete the old one, I don't get how to do it in the code.
  • wouldn't it be easier with a TweenMax for each particle to move around, and remove this draw update that is used now? But how to do it? again i'm lost in this code ?

 

Thank you

stars.fla

Link to comment
Share on other sites

 

This is the best I can do for you right now:

 

for (var i = 0; i < 200; i++) {
    var p = new lib.Particle();
    this.addChild(p);
    TweenMax.to(p, 1, {x:400 + Math.random() * 400, y:400 + Math.random() * 400, delay:i * 0.01, repeat:-1})    
}

 

please see the attached fla. it should be a good start.

 

simple-particles.zip

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

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