Boids playground

Every bird runs the same three rules: get out of a crowded neighbor's way, turn toward wherever the birds around it are heading, and drift toward the middle of whoever's nearby. None of them can see the whole flock, and the flock happens anyway. It's really touchy about the mix, too; nudge one force and you get a tight ball, a stream of fish, or birds ricocheting off each other. The presets are a starting point, the sliders are for finding your own. (It's also the flock running behind the home page, if you'd been wondering.)

Three steering rules (separation, alignment, cohesion) over a neighbor query, stepped in C and compiled to WASM. The sliders write straight into the kernel's parameter struct; nothing round-trips to the server. -> petri

source petri/fugue