demos

steering behaviours

Boids

Separation, alignment and cohesion resolved over a uniform grid. Hold to pull the flock into orbit.

interaction

Hold anywhere to draw the flock in. A sideways swirl rides on top of the pull, so boids settle into orbit around the cursor rather than collapsing onto it, and the reach extends well past the ring — one press gathers a whole swathe of the flock.

canvas 2d