oneshotlm
Compare all models on this prompt →

Fireworks · minimax-m3

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 ↗
transcript · 8 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
The user wants a single-page fireworks display web app. Let me create a beautiful, full-screen canvas fireworks simulation with:
- Full-screen canvas
- Click to launch shells
- Particles with gravity
- Fading particle bursts
- Self-contained in one HTML file (no external resources)

Let me build something visually impressive with:
- Trail effects for shells
- Realistic gravity-affected particles
- Particle fading/trail effects
- Color variety
- Sparkle effects
- Auto-launch option
- Responsive design

Let me design this carefully:

1. Canvas setup - full screen, resize on window resize
2. Shell class - launches upward, has trail
3. Particle system - explodes into many particles with gravity
4. Fade effect using global alpha
5. Optional auto-fire mode for ambient display
6. Beautiful color palette
7. Multiple burst types (sphere, ring, chrysanthemum, willow)

I'll use additive blending for glow effects. Let me write the full HTML file.

I'll create an impressive fireworks display with realistic physics, colorful bursts, and smooth fading trails.

write /workspace/index.html (18819 bytes)
toolResult

Successfully wrote 18819 bytes to /workspace/index.html

assistant
thinking
Let me verify the file was created correctly and validate the HTML structure.
bash {"command":"ls -la /workspace/index.html && head -5 /workspace/index.html && echo \"---\" && tail -5 /workspace/index.html"}
toolResult

-rw-r--r-- 1 node node 18831 Jul 22 17:43 /workspace/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> --- // (They look fine even without this; gravity is the main physics driver.) })(); </script> </body> </html>

assistant
thinking
The file is created. Let me quickly do a syntax sanity check by attempting to parse the script content. Actually, since this is browser-only code and uses requestAnimationFrame, etc., let me just do a simple node-level syntax check on the script body to ensure I don't have any obvious errors.

Let me extract the script and try parsing it with node.

Let me do a quick syntax sanity check on the JS:

bash {"command":"node -e \"\nconst fs = require('fs');\nconst html = fs.readFileSync('index.html', 'utf8');\nconst m = html.match(/<script>([\\s\
toolResult

JS parses OK

assistant
thinking
The JavaScript parses correctly. The file is created in /workspace/index.html with:

- Full-screen canvas with gradient night-sky background
- Click anywhere to launch a shell
- Shells rise with realistic trajectory (gravity, wind)
- Trail effect (toggleable)
- 4 burst types: Chrysanthemum, Ring, Palm, Willow
- Particles with gravity, drag, fading alpha
- Glow halos using radial gradients
- Additive blending for nice light bloom
- Auto mode (default on) launches shells periodically with occasional multi-burst finales
- White sparkle cores for extra twinkle
- Sound option (WebAudio synthesized pop)
- Keyboard shortcuts: Space, C, A, T, S
- HUD with title and instructions
- Glass-morphism control panel (Auto, Trails, Sound, Clear)
- Responsive - resizes with window
- High-DPI aware (capped at 2x for performance)
- No external resources, no network requests

The artifact is complete.

Done. `index.html` is in `/workspace` — a single self-contained file with everything inlined (no external resources, no network calls). **What it does** - **Full-screen canvas** with a soft night-sky gradient - **Click anywhere** to launch a shell that arcs up and explodes at the target point - **Realistic physics**: shells obey gravity, particles obey gravity + air drag - **Fading bursts** via per-frame semi-transparent fill (trails mode) plus per-particle alpha decay - **4 burst types** chosen randomly per shell: - *Chrysanthemum* — dense spherical spread with sparkle cores - *Ring* — evenly-spaced circular ring - *Palm* — 7 thick streams (like a palm tree) - *Willow* — long-lived drooping particles (heavier gravity) - **Additive "lighter" compositing** + radial glow gradients give a true bloom feel - **Auto mode** (default on) launches shells across the sky with occasional multi-shell finales - **Trails toggle** — turn motion-persistence on/off - **Sound toggle** — synthesized "pop" via WebAudio (no asset files) - **Keyboard**: `Space` center burst · `C` clear · `A` auto · `T` trails · `S` sound - **Responsive + HiDPI** (capped at 2× for perf) - **Glass-morphism control panel** in the top-right Open `index.html` in any modern browser and click the sky.

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

modelminimax-m3
vendorMiniMax
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Vivid fireworks with rockets launching and exploding into colorful, gravity-affected particle bursts, responsive to click, drag, space, and toggled clear via WASD.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion64.6%
on click59.0%
on drag65.5%
on wheel66.6%
on enter + space48.8%
on arrow keys60.0%
on w/a/s/d39.4%
frame spread91.1 / 255
console errors0
js errors none

METRICS

runtime59.5s
tokens in16k
tokens out7.1k
cached10.0k
cost / run$0.0141