oneshotlm
Compare all models on this prompt →

Fireworks · hy3

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 · 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
The user wants me to create a fireworks display as a single-page web app. The requirements are:
1. Full-screen canvas
2. Clicks launch shells
3. Shells explode into particle bursts
4. Particles are affected by gravity
5. Particles fade out over time
6. Everything in one index.html file with inline CSS and JS
7. No external resources

Let me create this step by step:
- HTML structure with a full-screen canvas
- CSS to make the canvas full-screen
- JavaScript to handle:
  - Canvas setup
  - Mouse click events to launch shells
  - Shell physics (launching upward, then exploding)
  - Particle system for explosions
  - Gravity effect on particles
  - Fading effect on particles
  - Animation loop

I'll write this as a complete, self-contained index.html file.

I'll create a self-contained fireworks display app with interactive shell launching, particle physics, and gravity effects.

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

Successfully wrote 8777 bytes to /workspace/index.html

assistant
thinking
The user asked me to create a fireworks display on a full-screen canvas where clicks launch shells that explode into gravity-affected, fading particle bursts. I've just created the file, but let me verify it was created correctly and maybe test it or check if there are any issues.

Actually, looking at my code, I should double-check a few things:
1. The canvas is full-screen - yes, I set it to window.innerWidth and window.innerHeight
2. Clicks launch shells - yes, I have a click event listener
3. Shells explode - yes, the Shell class has an explode() method
4. Gravity affects particles - yes, I set gravity = 0.05 in Particle class
5. Particles fade - yes, I'm using alpha based on life/maxLife
6. Everything is in one file - yes, CSS in style tag, JS in script tag
7. No external resources - yes, everything is inline

The code looks good, but let me verify the file was created.

I've created a self-contained fireworks display app in `/workspace/index.html`. Here's what it includes: **Features:** - **Full-screen canvas** with dark background - **Click to launch** - Click anywhere to launch a firework shell from the bottom - **Mouse movement** - Lightly holding mouse down/moving creates trailing fireworks - **Touch support** - Works on mobile devices - **Auto-launch** - Random fireworks automatically launch every ~1-2 seconds **Physics & Effects:** - **Shell trajectory** - Shells arc upward with gravity, then explode at their peak - **Gravity** - Particles are affected by gravity (0.05 acceleration downward) - **Fade effect** - Particles fade out based on remaining life - **Trail effects** - Both shells and particles leave glowing trails - **Particle types** - Multiple explosion patterns (circular, double ring, chrysanthemum) - **Sparkle particles** - White sparkles mixed in for extra visual flair - **Screen fade** - Slight fade trail effect creates natural-looking persistence **Visual Details:** - 9 different color options (red, green, blue, yellow, magenta, cyan, orange, pink, purple) - Glow effects on shells and particles - Particle sizes vary for depth effect - Life spans vary for natural dissipation Open `index.html` in a browser to see the fireworks display!

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

modelhy3
vendorTencent · Hunyuan
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Full-screen fireworks with gravity-affected particle bursts auto-launch and respond to clicks/keys with new shells.

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 motion10.0%
on click9.3%
on drag12.2%
on wheel10.0%
on enter + space16.0%
on arrow keys6.2%
on w/a/s/d7.5%
frame spread27.6 / 255
console errors0
js errors none

METRICS

runtime36.7s
tokens in3.1k
tokens out3.6k
cached2.9k
cost / run$0.0010