oneshotlm
Compare all models on this prompt →

Flow-field particles · grok-4.20

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 task is to create a full-screen flow-field particle animation using p5.js. It must be a single self-contained index.html file with CSS in <style>, JS in <script>, and include the p5.min.js via <sc...
bash {"command":"ls -la"}
toolResult

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

assistant
thinking
The task is to create a full-screen flow-field particle animation using p5.min.js. It needs thousands of particles advected by Perlin-noise vectors, leaving fading trails, with colors shifting over ti...The task is to create a full-screen flow-field particle animation using p5.min.js. It needs thousands of particles advected by Perlin-noise vectors, leaving fading trails, with colors shifting over time. All in one self-contained index.html file with CSS in <style>, JS in <script>, and include <script src="p5.min.js"></script>.

I need to write the complete index.html file.

First, sketch the code.

Use global mode since p5.min.js global.

HTML:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Flow Field Particles</title>

<style style>

body { margin: 0; overflow: hidden; background: black; }

canvas { display: block; }

</style>

<script src="p5.min.js"></script>

</head>

<body>

<script>

// code here

let particles = [];

let flowField;

let cols, rows;

let res = 20;

let zoff = 0;

function setup() {

  createCanvas(windowWidth, windowHeight);

  colorMode(HSB, 360, 100, 100);

  cols = floor(width / res);

  rows = floor(height / res);

  flowField = new Array(cols * rows);

 for (let i = 0; i < 5000; i++) {

    particles.
write index.html (7492 bytes)
toolResult

Successfully wrote 7492 bytes to index.html

assistant
thinking
The task is complete. The single self-contained index.html file has been created with p5.min.js loaded, full-screen canvas, thousands of particles (6500), Perlin noise flow field updated every frame w...

The file **index.html** has been created. Open it in a browser to view the full-screen flow-field particle animation (thousands of particles following evolving 3D Perlin noise vectors, with smooth fading trails and time-shifting HSB colors). Press **R** to reset or drag/touch to perturb the flow.

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

modelgrok-4.20
vendorxAI · Grok
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Colorful flow-field particle trails animate continuously and respond visibly to click/drag/wheel/keys with perturbations.

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 motion14.7%
on click14.1%
on drag16.0%
on wheel15.6%
on enter + space14.6%
on arrow keys16.0%
on w/a/s/d17.1%
frame spread12.6 / 255
console errors1
js errors none

METRICS

runtime24.3s
tokens in2.8k
tokens out3.8k
cached4.0k
cost / run$0.0139