Boids Simulation

Rust + WebAssembly Component Model + Canvas 2D

A flocking simulation based on Craig Reynolds' boids algorithm. Three simple rules produce emergent flock behavior: separation (avoid crowding neighbors), alignment (steer toward average heading), and cohesion (steer toward average position).

The simulation runs in a Rust-compiled WebAssembly component. The WIT interface defines a typed contract for parameters, so you can tweak the flock behavior in real-time using the controls below.

Loading WASM module...
0 fps | 200 boids
Parameters
Behavior Presets