oneshotlm
Compare all models on this prompt →

Flow-field particles · qwen3.8-max

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 · 10 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
Write a single index.html that loads p5.min.js, in a fullscreen canvas, implementing a flow field via noise, particles with fading trails (a translucent rectangle overlay), and hue shifting.
bash {"command":"ls -la /tmp/ws"}
toolResult

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

assistant
thinking
Create index.html that includes a flow field animation. Use global mode. Fading trails: draw a low-alpha dark rectangle onto the background every frame. Use colorMode(HSB), and make the hue shift according to time + position.
write /tmp/ws/index.html (5686 bytes)
toolResult

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

assistant
thinking
A quick sanity check on whether p5.min.js exists and is a valid script — it exists. Maybe I should validate the JS syntax with node? This script uses p5 globals; it can't easily be run in node. But at least I can check the syntax: extract the script and run node --check on it. `class Particle` uses the global p5.Vector — syntax check only.
bash {"command":"cd /tmp/ws && python3 -c \"\nimport re\nhtml = open('index.html').read()\nm = re.findall(r'<script>(.*?)</script>', html, re.S)\
toolResult

/bin/bash: line 1: python3: command not found Command exited with code 127

assistant
thinking
There is no python3. Please use node itself to extract the script.
bash {"command":"cd /tmp/ws && node -e \"\nconst fs = require('fs');\nconst html = fs.readFileSync('index.html','utf8');\nconst m = html.match(/<
toolResult

SYNTAX_OK -rw-r--r--. 1 node node 5688 Aug 3 23:53 index.html -rw-r--r--. 1 node node 1034532 Aug 3 23:53 p5.min.js

assistant
thinking
One bug check: `hueBase = (hueBase + HUE_SPEED * (now - (draw._prev || now)) / 1000) % 360;` — on the first frame, draw._prev is undefined, so it becomes (now - now)=0, no problem. After that, it uses the previous frame's timestamp. This works, but it's a bit unconventional. OK.

Also, p5's `constrain` works. Done.

Done. `/tmp/ws/index.html` is a single self-contained file (inline CSS + JS, loads only the local `p5.min.js` via a plain `<script src>` tag) and its script passes a syntax check. **What it does:** - **Full-screen canvas** — `windowWidth × windowHeight`, with `windowResized` handling - **~2,600 particles** advected by a Perlin-noise vector field (`noise(x, y, z)` → angle), with the field's z-dimension slowly evolving so the flow morphs over time - **Fading trails** — each frame draws a near-black rect at alpha 14 over the previous frame, so particle line segments dissolve gradually; edge-wrapping jumps the "previous" point to avoid streaks across the screen - **Shifting colors** — HSB palette where hue drifts continuously over time (~4°/s) plus per-particle jitter and spatial noise variation, with alpha tied to particle lifespan - **Delta-time integration** so speed stays consistent across frame rates **Interactions:** - Move the mouse → creates a local vortex that bends the field around the cursor - Click → scatters nearby particles outward - Any key → reseeds the noise field and palette Just open `index.html` in a browser (or `xdg-open` it) — no network needed.

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

modelqwen3.8-max
vendorQwen
harnesspi-agent
generated2026-08-03

EVALUATION

4/5 working

Animated flow-field visualization that reacts to mouse, click, wheel, and keyboard with color/shape shifts and constant self-animation.

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 motion57.9%
on click59.7%
on drag58.0%
on wheel48.9%
on enter + space54.2%
on arrow keys59.8%
on w/a/s/d58.5%
frame spread28.2 / 255
console errors0
js errors none

METRICS

runtime57.9s
tokens in16k
tokens out2.8k
cached9.2k
cost / run$0.0328