oneshotlm
Compare all models on this prompt →

Flow-field particles · glm-5.2

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 · 4 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
Let me create a flow-field particle animation using p5.js.
write /workspace/index.html (3467 bytes)
toolResult

Successfully wrote 3467 bytes to /workspace/index.html

assistant

Done. `index.html` is in the current directory. What it does: - **Full-screen canvas** via `windowWidth/windowHeight`, with `windowResized` handling. - **~2,200 particles**, each advected by an angle sampled from `noise(x, y, z)` (Perlin). `zoff` advances every frame so the flow field evolves over time. - **Fading trails** painted by drawing a low-alpha translucent background rect each frame (trail length controlled by `TRAIL_ALPHA`). - **Time-shifting colors** in HSB mode: a global `hueShift` drifts continuously, combined with each particle's own hue offset and the local field angle, so hues sweep across the spectrum as the animation runs. - Particles respawn when they leave the screen or exceed their lifetime, keeping the field densely populated. - Press **S** to save a PNG snapshot. Tweakables at the top of the script: `PARTICLE_COUNT`, `SPEED`, `TRAIL_ALPHA`, `NOISE_SCALE`, `NOISE_TIME` for density, speed, trail length, field coarseness, and evolution speed.

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

modelglm-5.2
vendorZ.ai · GLM
harnesspi-agent
generated2026-07-08

EVALUATION

4/5 working

Flow-field particle trails animate continuously with shifting colors, consistent with prompt; inputs don't visibly alter behavior beyond ongoing 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 motion22.5%
on click20.3%
on drag13.9%
on wheel14.1%
on enter + space12.1%
on arrow keys12.3%
on w/a/s/d16.9%
frame spread12 / 255
console errors0
js errors none

METRICS

runtime29.1s
tokens in1.6k
tokens out1.3k
cached2.5k
cost / run$0.0060