oneshotlm
Compare all models on this prompt →

Fireworks · gpt-5.4-nano

Output generated Cost / run $0.0069 Runtime 72.0s

Prompt for this run

Create a fireworks display on a full-screen canvas where clicks launch shells that explode into gravity-affected, fading particle bursts.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelgpt-5.4-nano
vendorOpenAI
harnesspi-agent
generated2026-07-22

METRICS

runtime72.0s
tokens in6.3k
tokens out4.5k
cached0
cost / run$0.0069
Transcript · 4 messages
user

Create a fireworks display on a full-screen canvas where clicks launch shells that explode into gravity-affected, fading particle bursts.

assistant
thinking
**Planning a canvas app**

I'm writing an index.html for a full app using a canvas that covers the full screen. When the user clicks, I'll create shells that explode into particle bursts influenced by gravity. The shells will have velocity, fuse time, and particles will have radial velocities, gravity, drag, and colors. I also need to handle resizing the canvas, use requestAnimationFrame, and ensure no external libraries are involved. Visuals will be nice, utilizing devicePixelRatio for clarity. Let's outline the implementation details clearly!**Designing the particle explosion**

I need to set conditions for when the particles should explode, like when the fuse is at zero or when the vertical position is below a certain threshold. Each explosion will create a random number of particles, utilizing a color palette in HSL. The particles will have radial velocities influenced by gravity, and their alpha will decay over time.

For rendering, I need to ensure smooth trails by clearing with a slight alpha, likely using rgba for background adjustments. I'm planning to blend particles with a lighter composite operation, and I’ll make sure everything is full-screen. I’ll write index.html without separating any files and include a UI hint for user interaction. Let's get to crafting the code!
→ write index.html (12681 bytes)
toolResult

Successfully wrote 12681 bytes to index.html

assistant

Created **index.html** with a full-screen canvas fireworks scene. Click/tap to launch upward shells that **explode into gravity-affected, fading particle bursts** (with glow, drift, and optional glitter sparks). Press **Space** for a larger show.