I want to create a sparkler effect using a particle system. I started modifying a fireworks example from The Coding Train: Fireworks Challenge
In the original example, fireworks shoot up and explode after some time. For a sparkler, the sparks should appear immediately, so I made the explosion happen right when the particle is created.
Looking at sparkler photos, I noticed that sparks look like streaks rather than dots. So instead of relying on the background not refreshing to create trails, I used a different method:
vertex()
, making each spark look like a streak with a head and tail.Here’s the sketch:
https://editor.p5js.org/shunhuang0906/full/L-PZ3FqDp
From the reference photos, each streak has a bright mini explosion at its tip. To implement this, I plan to introduce secondary particles that spawn at the endpoint of the main spark’s trail. These tiny sparks will likely follow a similar particle system but with shorter lifespan and more random motion.
is useful for make counter that go back to 0 for fixed amount
have meditative sound wave using fft
responsive canvas: https://codingtrain.github.io/12oclocks/#clock-09