Renderer · interface

FlockParams

Ambient sky life. Entirely GPU-side: the geometry is uploaded once and every bird's path is computed in the vertex shader from its index and the clock.

Explained in Hello world.

interface FlockParams
import type { FlockParams } from '@driftengine/core';

In depth

Deliberately not a simulation. Flocking behaviour would be CPU work every frame, forever, for something nobody looks at directly — and the thing it actually buys, a world that carries on without the player, comes from motion and silhouette rather than from correct boids.

Properties

NameTypeDescription
centerVec3
radiusnumber
heightnumber
countnumber
speednumberMetres per second along the orbit.
scalenumberHalf the wingspan, in metres: a bird measures 2 * scale from tip to tip.
More

It said "wingspan, roughly", and it is out by a factor of two, which is not roughly. The corner table below puts the tips at plus and minus one before this multiplies them, so a caller asking for a 1.5 m bird is handed a 3 m one.