Skip to content
pixi-silk
GitHub repository
Function

auroraBlobs

import { auroraBlobs } from 'pixi-silk/glow';
function auroraBlobs(
   t: number, 
   width: number, 
   height: number, 
   rise?: number
): AuroraBlob[];

Where the nine blobs of an aurora sit at time t (seconds) in a width by height box. Light rises from the bottom: deep colour high and wide, white low and thin. rise, 0 to 1, sets how high it reaches (default 0.62). Pure function: it allocates a new array and draws nothing.

Parameters#

ParameterTypeDefault value
tnumberundefined
widthnumberundefined
heightnumberundefined
risenumber0.62

Returns#

AuroraBlob[]