Skip to content

Primordial Soup API

PrimordialSoup

Extends Effect.

Factory Function

typescript
createPrimordialSoup(config?: PrimordialSoupConfig)

Methods

See Effect for the full method reference: mount(), start(), pause(), resume(), configure(), withFade(), and destroy().


PrimordialSoupConfig

typescript
interface PrimordialSoupConfig {
    speed?: number;
    maxCells?: number;
    foodRate?: number;
    colors?: string[];
    scale?: number;
}
PropertyTypeDefaultDescription
speednumber1Animation speed multiplier.
maxCellsnumber40Maximum number of living cells. Halved on small screens.
foodRatenumber3Rate at which food particles spawn per second.
colorsstring[]['#66bb6a', '#42a5f5', '#ab47bc', '#ef5350', '#ffa726']Colors assigned to cell lineages.
scalenumber1Global scale factor for cell radii.