oneshotlm
Compare all models on this prompt →

Flow-field particles · deepseek-v4-pro

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 · 6 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 full-screen flow-field particle animation using p5.js (global mode). Let me create a self-contained index.html file with:

1. Thousands of particles advected by Perlin noise flow fields
2. Fading trails
3. Colors shifting over time
4. Full-screen canvas
5. Using p5.min.js (already present in the directory)

Let me design this carefully:

- Use global mode p5.js (no instance mode needed since they said "global p5, instance or global mode")
- Create a flow field using Perlin noise
- Thousands of particles that follow the flow field vectors
- Fading trails (using semi-transparent background or trail rendering)
- Color shifting over time (HSB color mode with shifting hue)

I'll use:
- A grid of flow vectors based on noise()
- Many particles with position, velocity
- Semi-transparent background for fading trails
- HSB color mode for smooth color transitions
- Full window canvas

Let me write this all into one index.html file.
write /workspace/index.html (3831 bytes)
toolResult

Successfully wrote 3831 bytes to /workspace/index.html

assistant
thinking
The file has been written. Let me verify it exists and that p5.min.js is also present.
bash {"command":"ls -lh /workspace/index.html /workspace/p5.min.js"}
toolResult

-rw-r--r-- 1 node node 4.2K Jul 8 00:35 /workspace/index.html -rw-r--r-- 1 node node 1011K Jul 8 00:35 /workspace/p5.min.js

assistant
thinking
Both files are present. The index.html is ready.

Both files are in place. Here's what the animation does: **Flow Field** — A grid of Perlin-noise vectors (`noise()`) is recomputed each frame. The noise scrolls in the z-dimension (`zoff`) so the field continuously evolves. **5,000 particles** — Each one: - Samples the nearest flow-field cell and applies the force as acceleration - Has its own base hue and speed cap, giving variety - Wraps around screen edges so no particle is lost **Fading trails** — Instead of erasing with `background()`, a semi-transparent black rectangle is drawn every frame (`TRAIL_ALPHA = 8`). Lower alpha = longer persistence. **Shifting colours** — HSB colour mode is used. A global `hueShift` increments each frame, added to each particle's unique base hue, so colours cycle continuously. Particle brightness and saturation also respond to speed — faster particles glow brighter and more saturated. **Responsive** — `windowResized()` rebuilds the flow-field grid on window resize. The canvas fills the viewport with no scrollbars.

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

modeldeepseek-v4-pro
vendorDeepSeek
harnesspi-agent
generated2026-07-08

EVALUATION

3/5 working

Flow-field particle trails animate continuously with color shifts, but appear as one thin wandering ribbon rather than thousands of particles.

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 motion4.8%
on click5.3%
on drag10.7%
on wheel10.3%
on enter + space5.7%
on arrow keys4.6%
on w/a/s/d11.2%
frame spread17.1 / 255
console errors0
js errors none

METRICS

runtime34.6s
tokens in3.1k
tokens out1.8k
cached5.1k
cost / run$0.0029