Fireworks

· 2min
Fireworks finale over the Front Range

I built a realistic fireworks simulator in Rust with Bevy, and it’s playable in the browser as WebAssembly.

Play it here →

Moonlit night over the Front Range

The scene is a moonlit night over the Front Range of Colorado — distant peaks with snowfields, dark hogback foothills, and foreground hills that catch light from each burst. Shells launch from the valley floor behind the near ridgeline; rising tails and falling embers appear and disappear around it.

Click anywhere to launch a shell that bursts at that point. Space fires a finale salvo (eight shells at once), A toggles automatic launching (on by default), and F shows an FPS overlay. On the desktop build, F11 toggles borderless fullscreen.

Chrysanthemum burst over the foothills

Stars are sampled on a 3D sphere and projected to the screen, which gives bursts the dense-rimmed silhouette of real shell breaks. Colors follow pyrotechnic emitters — strontium red, barium green, copper blue, sodium gold, magnesium silver — fading from white-hot ignition through the star’s color into a dim orange ember. There are seven shell types: peony, chrysanthemum, willow, palm, ring, crossette, and strobe. Gravity, per-star drag, and a slowly wandering wind carry the sparks; HDR rendering and bloom make the bright stars actually glow.

Finale with peony, chrysanthemum, willow, palm, ring, crossette, and strobe shells

If you want to dig into the code, build it natively, or see how the web build is wired up, the source is on GitHub: jasonslay/fireworks.