Skip to main content

Interface: Background

Interface implemented by dynamic or static stage background renderers.

Properties​

PropertyTypeDescription
domElement?HTMLElement-
opacitynumberBackdrop opacity from 0 to 1 (default: 1). Snapshot-restored.

Methods​

attach()​

attach(stage: StageContext): void

Parameters​

ParameterType
stageStageContext

Returns​

void


decorate()​

decorate(decorator: BackgroundDecorator): this

Parameters​

ParameterType
decoratorBackgroundDecorator

Returns​

this


dispose()?​

optional dispose(): void

Returns​

void


onUnmount()?​

optional onUnmount(fn: () => void): () => void

Releases decorator resources on disposal.

Parameters​

ParameterType
fn() => void

Returns​

() => void


onUpdate()?​

optional onUpdate(fn: () => void): () => void

Runs after an active background frame.

Parameters​

ParameterType
fn() => void

Returns​

() => void


pause()?​

optional pause(): void

Returns​

void


play()?​

optional play(): void

Returns​

void