Jump to content
GreenSock

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

Fireworks WIP

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 there,

 

Still a newbie to Greensock and noticing how much of a newbie every hour.

 

I was hoping to turn this particle emitter to more of a explosion burst effect like you would see with a firework. After 2 hours of playing i'm not really getting anywhere. Can someone tell me if an emitter is right for this?

 

Thanks,

 

Phil

See the Pen GpjMqZ by phillip_vale (@phillip_vale) on CodePen

Link to comment
Share on other sites

Hi Pusher :)

 

pls fix line 15# by this : xPercent:-50 , yPercent:-50

Link to comment
Share on other sites

Hi Diaco,

 

Sorry i'm not sure what i am fixing? :)

 

I just found the tidy button so now that line looks like this...

for (var i = dotQuantity - 1; i >= 0; i--) {
  dot = document.createElement("div");
  dot.className = "dot";
  TweenMax.set(dot, {
    xPercent: -50,
    yPercent: -50,
    force3D: true
  });
  document.body.appendChild(dot);
  dotPool[i] = dot;
}
Link to comment
Share on other sites

What are you having problems with?

 

I know you said you are a newbie, so this might not make any sense to you, but here's an exploding effect I made. The timeline for the explosion is being set in the createExplosion function.

 

See the Pen avbPON by osublake (@osublake) on CodePen

Link to comment
Share on other sites

Hi OSUblake,

 

That's pretty much what i am looking for. I will take a look at this and come back. :)

Link to comment
Share on other sites

You can ignore most of the code on there. A lot of it just a bunch of boilerplate to setup a canvas so I could shove an obscene amount of stars on there. But the timeline code could be changed to work with DOM elements instead of canvas objects.

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