Introducing v3 — a new editor, faster engine, and more.

See what's new

Boids

A living murmuration of hundreds of flocking agents drawn as crisp arrows, streaks, dots or glowing comets — separation, alignment and cohesion drive fluid, splitting-and-merging ribbons, agents flash toward an excited color when scattered, and the cursor acts as an attractor or a predator

Props

colorAstring
Default:#8ec5ff
Color of agents cruising calmly with the flock
colorBstring
Default:#ff7ad9
Color agents flash toward when agitated — scattering from the predator cursor or banking through a hard turn
colorSpace"linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"
Default:oklab
Color space for the rest→excited color ramp
agentShape"arrow" | "streak" | "dot" | "square" | "glow"
Default:arrow
What each agent is drawn as — a hard-edged arrow, streak or square pointing along its heading, a plain dot, or a soft glowing comet
countnumber
Default:2000
Number of flocking agents
speednumber
Default:2
Overall cruising speed of the flock
seednumber
Default:0
Re-rolls the flock's starting formation — each value spawns the murmuration in a different arrangement
sizenumber
Default:1.5
Size of each agent
trailsnumber
Default:0
How long each agent's motion trail persists — 0 draws crisp agents, 1 leaves long ribbons
separationnumber
Default:1.7
How strongly agents steer away from crowding their neighbours
alignmentnumber
Default:1.5
How strongly agents match their neighbours' heading — the driver of coherent murmuration ribbons
cohesionnumber
Default:1
How strongly agents steer toward the local center of the flock
perceptionnumber
Default:0.12
How far each agent can sense its neighbours (in screen heights) — larger sees bigger, smoother flocks
cursorMode"none" | "attract" | "repel"
Default:repel
How the flock reacts to the cursor
cursorStrengthnumber
Default:1.5
Strength of the cursor's pull or push on the flock

Usage

<Shader>
  <Boids />
</Shader>