oneshotlm
Compare all models on this prompt →

Flow-field particles · minimax-m2

Using the pre-provided p5.min.js (global p5, instance or global mode), create a full-screen flow-field particle animation: thousands of particles advected by Perlin-noise vectors, leaving fading trails, with colors shifting over time.

⛨ sandboxed Open in new tab ↗
transcript · 8 messages
user

Using the pre-provided p5.min.js (global p5, instance or global mode), create a full-screen flow-field particle animation: thousands of particles advected by Perlin-noise vectors, leaving fading trails, with colors shifting over time.

assistant
thinking
The user wants me to create a flow-field particle animation using p5.js. Let me first check what's in the current directory to see the p5.min.js file, then create a single HTML file with the animation.

Let me first check what files are available.
bash {"command":"ls -la /tmp/ws/"}
toolResult

total 1012 drwxr-sr-x. 2 node node 23 Aug 1 20:25 . drwxrwsrwx. 3 root node 16 Aug 1 20:25 .. -rw-r--r--. 1 node node 1034532 Aug 1 20:25 p5.min.js

assistant
thinking
The p5.min.js file is available. Now I'll create a full-screen flow-field particle animation with:
- Thousands of particles
- Perlin noise vectors for flow field
- Fading trails
- Colors shifting over time

I'll create a self-contained HTML file with all the CSS and JavaScript inline.
write /tmp/ws/index.html (5388 bytes)
toolResult

Successfully wrote 5388 bytes to /tmp/ws/index.html

assistant
thinking
I've created a flow field particle animation with:
- 4000 particles
- Perlin noise for flow field vectors
- Fading trails (using semi-transparent background fill)
- Colors shifting over time using HSB color mode
- Particles that reset when they go off screen or die
- Friction/damping on particle velocity
- Max speed limiting
- Window resize handling

The file is self-contained with inline CSS and JS, using the p5.min.js file from the current directory. Let me verify the file was created correctly.
bash {"command":"ls -la /tmp/ws/"}
toolResult

total 1020 drwxr-sr-x. 2 node node 41 Aug 1 20:25 . drwxrwsrwx. 3 root node 16 Aug 1 20:25 .. -rw-r--r--. 1 node node 5388 Aug 1 20:25 index.html -rw-r--r--. 1 node node 1034532 Aug 1 20:25 p5.min.js

assistant
thinking
The index.html file has been created successfully. It's a self-contained flow field particle animation with:
- Thousands of particles (4000)
- Perlin noise vectors for flow field
- Fading trails using semi-transparent background
- Colors shifting over time using HSB color mode with a colorShift variable
- Particles respawn when they go off-screen or their life runs out
- Full-screen canvas that responds to window resize

The animation is complete and ready to run in any browser.

Created `index.html` with a full-screen flow-field particle animation featuring: - **4000 particles** advected by Perlin noise vectors - **Fading trails** via semi-transparent background overlay (alpha ~12) - **Colors shifting over time** using HSB color mode with a global hue shift - **Smooth motion** with velocity damping and max speed limiting - **Particle lifecycle** - respawn when off-screen or life expires - **Responsive** - canvas resizes with the window The animation uses 3D Perlin noise (x, y, time) to create an evolving flow field. Each particle reads the noise at its position, converts to an angle, and applies that as a force. The color cycles through the hue spectrum continuously.

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-m2
vendorMiniMax
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Flow-field particle animation with colorful fading trails constantly evolving; input has little distinct effect but core animation is strong.

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 motion55.8%
on click55.5%
on drag53.5%
on wheel57.4%
on enter + space56.9%
on arrow keys49.9%
on w/a/s/d53.5%
frame spread26.7 / 255
console errors0
js errors none

METRICS

runtime21.2s
tokens in9.5k
tokens out1.8k
cached0
cost / run$0.0042