Skip to content

1681-engine / index / flockSlot

Function: flockSlot() ​

ts
function flockSlot(
   i, 
   dirX, 
   jitterX, 
   jitterY
): object;

Defined in: src/ambient/life/lifeMotion.ts:65

Where the i-th bird of a flock flies behind the leader: a loose V trailing back along dirX (its sign), ranks alternating side to side. jitter (0..1 each) loosens it so no two flocks are drawn alike.

Parameters ​

ParameterType
inumber
dirXnumber
jitterXnumber
jitterYnumber

Returns ​

object

dx ​

ts
dx: number;

dy ​

ts
dy: number;

Released under the MIT License.