How does it work?
- Each firework have two parts, straight line and spark. Straight line is
object and spark is created by calling
spark function which create
- The main parameter in
FireworkLine object is lifespan. When it reach its lifespan, it is no longer updatable and switch to
Curve object have various parameters. It has position,velocity and acceleration so that it can form curvy path.
- The canvas is updated inside
draw function using