Skip to content

Murmuration API ​

Murmuration ​

Extends Effect.

Factory Function ​

typescript
createMurmuration(config?: MurmurationConfig)

Methods ​

See Effect for the full method reference.


MurmurationConfig ​

typescript
interface MurmurationConfig {
    alignment?: number;
    cohesion?: number;
    color?: string;
    count?: number;
    scale?: number;
    separation?: number;
    speed?: number;
    turnRadius?: number;
}
PropertyTypeDefaultDescription
alignmentnumber0.8How strongly birds align direction with nearby flock mates.
cohesionnumber0.5How strongly birds are attracted to the flock center.
colorstring'#1a1a2e'Color of the birds.
countnumber300Number of birds in the swarm.
scalenumber1Scales all sizes proportionally.
separationnumber0.4How strongly birds avoid crowding nearby flock mates.
speednumber1Overall speed multiplier.
turnRadiusnumber0.7How sharply birds can change direction.