Skip to content
UniKit

Firework

Click the canvas to launch a real shell: it rises, bursts and every particle is integrated frame by frame with gravity, wind and drag while fading with its remaining life. The launch plan comes from a seed (same seed and parameters reproduce it) and the live particles, peak, frame count and measured fps are all counted.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Live firework canvas

Click anywhere on the canvas to launch a shell there; with auto-launch on it cycles at the launch interval. Particles, gravity, wind and drag all feed the per-frame physics.

Not started · click the canvas (or press Space) to launch the first shell
Live particles
0
Peak particles
0
Shells launched
0
Frames drawn
0
Measured fps
0
Elapsed
0.0 s

Keyboard: Space launches one shell (click the canvas first for focus), P pauses or resumes.

Live particles: 0 · Shells launched: 0

Live particles, peak particles, frame count and fps are all counted per frame; change a parameter and the picture changes immediately. No audio, nothing uploaded.

Seeded launch plan

The canvas really follows this plan: put the seed and parameters back into the inputs to reproduce the same show (launch and burst times, burst point, radius, particle count and hue are real numbers).

种子 / Seed: firework(指纹 02c83a8b)
画布 / Canvas: 720×420 像素 · 计划 3 发
第 1 发 / shell 1: 0.15 s 升空,0.68 s 爆开,爆点 (0.49, 0.35),半径 72.59 px,79 个粒子,色相 233°
第 2 发 / shell 2: 1.28 s 升空,1.71 s 爆开,爆点 (0.56, 0.19),半径 108.38 px,146 个粒子,色相 53°
第 3 发 / shell 3: 1.91 s 升空,2.38 s 爆开,爆点 (0.29, 0.29),半径 108.82 px,112 个粒子,色相 313°

What this tool does

  • Click anywhere on the canvas to launch a shell there: ascent, burst, gravity and drag are integrated frame by frame, and each particle fades with its remaining life.
  • Tune gravity, wind and drag and watch the trails change: wind tilts the whole cloud, drag slows the expansion and gravity pulls it down.
  • Write down the seed and parameters to replay a show: the same seed, shell count and launch interval always produce the same launch plan.

Example

Input

seed 2024除夕 · 3 shells · 900 ms interval · canvas 720×420

Output

种子 / Seed: 2024除夕(指纹 cae0dc74)
画布 / Canvas: 720×420 像素 · 计划 3 发
第 1 发 / shell 1: 0.18 s 升空,0.52 s 爆开,爆点 (0.18, 0.35),半径 66.64 px,124 个粒子,色相 7°
第 2 发 / shell 2: 1.33 s 升空,1.82 s 爆开,爆点 (0.76, 0.20),半径 122.96 px,81 个粒子,色相 216°
第 3 发 / shell 3: 1.93 s 升空,2.29 s 爆开,爆点 (0.77, 0.39),半径 93.11 px,116 个粒子,色相 170°

Real output of the “Seeded launch plan” card below the canvas: burst points are fractions of the canvas, radii are pixels, particle counts are integers and hues are HSL angles. The canvas follows exactly this plan.

Frequently asked questions

How do I use it?

Click any point on the canvas to launch a shell at that x position; switch “Auto launch” on to fire on the launch interval. The side buttons offer “Launch now”, “Pause” and “Clear canvas”.

Does the keyboard work?

Yes. Click the canvas (or Tab to the board) for focus, then Space or Enter launches one shell and P pauses or resumes.

Is it random or reproducible?

The launch plan is reproducible: launch and burst times, burst point, radius, particle count and hue all come from the seed (xorshift128), so the same seed and parameters always give the same plan. A burst adds seeded jitter to each particle angle and speed, so the pattern of a given shell is stable too. The physics itself has no randomness: gravity, wind and drag are deterministic integration.

Are the numbers real, and what does this not do?

Live particles, peak particles, frames drawn and measured fps are all counted per frame (fps = frames ÷ real milliseconds), and changing a parameter changes both the picture and the numbers. There is no audio, nothing is uploaded, and there is no claim of a physically accurate fireworks model.

Keywords:firework

Related tools