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 FlockParamsimport 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
| Name | Type | Description |
|---|---|---|
center | Vec3 | |
radius | number | |
height | number | |
count | number | |
speed | number | Metres per second along the orbit. |
scale | number | Half the wingspan, in metres: a bird measures 2 * scale from tip to tip.MoreIt 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. |