gitmyhub

fireworks

JavaScript ★ 0 updated 12y ago ⑂ fork

@nodeconf July 4th Fireworks

Fireworks

This is a virtual fireworks simulator built for a July 4th celebration at a NodeConf event. Instead of setting off real fireworks (which would be a fire hazard), the project lets you create and visualize animated light shows on a computer screen—think of it as programming pyrotechnics through code.

The core idea is straightforward: you write a script that describes what effects you want (bursts, sparkles, colored trails, etc.), and the system converts that into a light animation displayed on a web page. You can see it in action by cloning the repository, installing dependencies, and running a local server. Once it's running, you open a browser and watch the animated fireworks display play out.

The clever part is how it translates your high-level effects into actual pixel colors. The system represents the physical fireworks display as 1,260 individual lights arranged in a flower-like pattern across three strands. When you describe an effect like "launch a burst of red, yellow, and orange," the code figures out which lights should be which colors at each moment in time, creating the illusion of motion and explosion. The README includes a visual diagram showing exactly how those lights are arranged.

You don't need to think about individual pixels, though. The script format lets you compose effects by type—"launch," "burst," "sparkle," "curve"—and chain them together, even overlaying multiple effects to run at the same time. It's similar to how you might stack audio tracks or video effects in a creative tool; you're building a sequence of visual moments rather than programming frame-by-frame.

The README notes this is a work in progress, so the main invitation is to fork it, create your own fireworks show script, and eventually share it with others. It's a playful project that makes real-time animation accessible to people who want to experiment with light shows without needing formal graphics or hardware expertise.