Exploration
The AI visual started as trigonometry I wrote by hand, moved to a GPU particle system after working through it with Codex, and is now modelled geometry. All three builds are kept here.
01Math swarm
ArchivedEvery particle was a DOM node placed by hand: a seeded hash for its offset, sine and cosine for its orbit, a rounded depth value standing in for z. No canvas and no renderer — just arithmetic written out and run each frame.
Position, drift and depth were each solved separately and tuned by eye. The motion was controllable, which was the appeal, but every new behaviour meant more trigonometry by hand, and depth was faked by rounding a value into twenty bands.
and conversation
It shipped and it worked. The ceiling was the node count — a DOM node per particle is laid out and composited like any other element, so the density the effect wanted was the density the browser could not afford.
023D swarm
ArchivedThe same idea moved onto the GPU. One BufferGeometry holds every particle, a shader pair does the displacement and the falloff, and the depth that was faked in twenty bands became real perspective.
Worked through with Codex. The turn was giving up per-particle control in JavaScript for a vertex shader that moves all of them at once — which is what made the particle count stop being the constraint.
and conversation
Noise and displacement live in swarmShaders.ts and are shared with the ink field behind it. Still reachable — NEXT_PUBLIC_BRAIN_VISUAL=legacy brings it back, and it is also the fallback if the model in build 03 fails to load.
03Neural web
LiveModelled rather than generated. The web is real geometry authored in Blender and loaded as a scene, so the shape is designed instead of emerging from noise. Nodes fire on their own and light travels the fibres between them.
The particle cloud could be tuned but never aimed — it made a shape, not a specific one. Moving the form into Blender put the structure under direct control and left the code to handle only what moves through it.
and conversation
It answers native scroll and pointer drag without taking either over, and arrow keys turn the focused web. Build 02 is kept behind an environment flag and stands in if the model fails to load.