Jump to content
GreenSock

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

particles : Animate CC + GSAP

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

note: edited the response above with files

Link to comment
Share on other sites

Great, thanks Carl, indeed much easier than what I had ?

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