oneshotlm
Compare all models on this prompt →

Fireworks · north-mini-code

Output generated Cost / run $0.0000 Runtime 80.9s

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

modelnorth-mini-code
vendorCohere
harnesspi-agent
generated2026-07-22

METRICS

runtime80.9s
tokens in2.4k
tokens out3.0k
cached0
cost / run$0.0000
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 single-page web app that displays a fireworks show. The requirements are:
1. Full-screen canvas
2. Click to launch shells
3. Shells explode into gravity-affected, fading particle bursts

I need to create a single self-contained HTML file named `index.html` that includes:
- CSS for styling in a `<style>` tag
- JavaScript for the fireworks logic in a `<script>` tag
- No external resources, CDNs, or network requests

Let me break down what I need to implement:
1. Set up a full-screen canvas
2. Add click event handling
3. Create shell launch logic
4. Create particle explosion with gravity and fading effects

I'll create the complete HTML file directly.
→ write /workspace/index.html (10112 bytes)
toolResult

Successfully wrote 10112 bytes to /workspace/index.html

assistant
thinking
I've created a self-contained HTML file that implements a fireworks display. The code includes:

1. A full-screen canvas element
2. CSS styling for full-screen display and black background
3. JavaScript that:
   - Sets up a canvas and resizes it to fill the window
   - Handles mouse clicks and touch events to launch shells at the clicked/touched position
   - Creates shells that fly upward with gravity and friction, then explode
   - Creates particles for the explosion that have gravity, fade out over time, and trail
   - Manages the entire fireworks display with an animation loop
   - Includes a timeout to launch an initial shell if the user doesn't click first

The implementation uses modern JavaScript features, clean code organization with classes and event handling, and is completely self-contained without any external resources. The colors are vibrant and the particles have a glowing, fading effect as they fall back to the ground.

I've created a self-contained fireworks display in `/workspace/index.html`. The app features: - **Full-screen canvas** that adapts to window size - **Interactive launch** - click or touch anywhere to launch fireworks shells - **Launch mechanics** - shells fly upward with gravity and friction effects - **Explosions** - shells explode at peak altitude into particle bursts - **Particle physics** - gravity-affected particles with fade animations - **Visual effects** - vibrant colors with alpha blending for glowing particles - **Automatic initial launch** - starts with a shell after 2 seconds if no clicks The display runs entirely in the browser with no external resources or network requests. Open the file in any modern web browser to see the fireworks show!