oneshotlm
Compare all models on this prompt →

Flow-field particles · kimi-k2.7-code

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
 Need create index.html in /workspace with p5.min.js local. Need full-screen flow field particle animation with thousands particles advected by Perlin noise, fading trails, colors shifting, all self-contained, inline CSS/JS. Need a html file that loads p5.min.js exact filename. Need implement in global mode likely. Need maybe use createCanvas(windowWidth, windowHeight) and noSmooth? Need performance. Need background fade for trails each frame with alpha. Need vector field maybe computed on fly via noise(x*scale, y*scale, zoff). Need array of particles. Thousands (maybe 3000). Need color shift over time using HSB or colorPalette noise. Include respawn edges or random respawn. UI maybe none. Ensure full screen no scroll. Use p5.colorMode maybe HSB. Let's check current directory for p5.min.js.

bash {"command":"ls -la /workspace"}
toolResult

total 1028 drwxrwxrwx 3 node node 96 Jul 8 00:34 . drwxr-xr-x 1 root root 4096 Jul 8 00:35 .. -rw-r--r-- 1 node node 1034532 Jul 8 00:34 p5.min.js

assistant
thinking
 Need create index.html single self-contained. Use p5.min.js local. Full-screen flow field with thousands particles. Use global p5. Need ensure performance. Plan: setup full canvas windowWidth windowHeight, create particles array 4000. Flow field grid, compute vectors via noise(x*scale, y*scale, zoff) every maybe every 10 frames or partial. Use pixel manipulation for fading trails? p5 drawing translucent background per frame is OK for thousands? Could use background(0,10) each frame, then particles drawn with additive colors. Fading trails via background low alpha. Need color shifting over time: use HSB or color with hue mapped to noise/time/position. Use global mode. No external resources. Also maybe interaction: click reset, resize. Need full screen no scroll. Let's write.

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

Successfully wrote 3052 bytes to /workspace/index.html

assistant

Built `/workspace/index.html`: a full-screen flow-field animation using the local `p5.min.js`. Features ~4,200 particles, Perlin-noise-driven vectors, fading trails, and HSB colors shifting over time. Click anywhere to restart the field.

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

modelkimi-k2.7-code
vendorMoonshot · Kimi
harnesspi-agent
generated2026-07-08

EVALUATION

2/5 partial

Flow-field particles render but quickly devolve into full-screen horizontal scanline noise, looking broken rather than fluid.

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 motion90.9%
on click91.8%
on drag88.0%
on wheel63.4%
on enter + space60.4%
on arrow keys85.9%
on w/a/s/d89.6%
frame spread62 / 255
console errors0
js errors none

METRICS

runtime26.1s
tokens in1.9k
tokens out1.6k
cached3.3k
cost / run$0.0075