Skip to content

Aurora API

Aurora

Extends Effect.

Factory Function

typescript
createAurora(config?: AuroraConfig)

Methods

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


AuroraConfig

typescript
interface AuroraConfig {
    bands?: number;
    colors?: string[];
    speed?: number;
    intensity?: number;
    waveAmplitude?: number;
    verticalPosition?: number;
    scale?: number;
}
PropertyTypeDefaultDescription
bandsnumber5Number of aurora curtain rays.
colorsstring[]['#9922ff', '#4455ff', '#0077ee', '#00aabb', '#22ddff']Base hex colors for each ray. Colors cycle if fewer than bands.
speednumber1Animation speed multiplier.
intensitynumber0.8Overall brightness/opacity (0-1).
waveAmplitudenumber1Base wave undulation amplitude multiplier.
verticalPositionnumber0.68Normalized Y base for the aurora rays (0=top, 1=bottom).
scalenumber1Global scale factor for ray height.