Interface: Background
Interface implemented by dynamic or static stage background renderers.
Properties
| Property | Type | Description |
|---|---|---|
domElement? | HTMLElement | - |
opacity | number | Backdrop opacity from 0 to 1 (default: 1). Snapshot-restored. |
Methods
attach()
attach(
stage:StageContext):void
Parameters
| Parameter | Type |
|---|---|
stage | StageContext |
Returns
void
decorate()
decorate(
decorator:BackgroundDecorator):this
Parameters
| Parameter | Type |
|---|---|
decorator | BackgroundDecorator |
Returns
this
dispose()?
optionaldispose():void
Returns
void
onUnmount()?
optionalonUnmount(fn: () =>void): () =>void
Releases decorator resources on disposal.
Parameters
| Parameter | Type |
|---|---|
fn | () => void |
Returns
() => void
onUpdate()?
optionalonUpdate(fn: () =>void): () =>void
Runs after an active background frame.
Parameters
| Parameter | Type |
|---|---|
fn | () => void |
Returns
() => void
pause()?
optionalpause():void
Returns
void
play()?
optionalplay():void
Returns
void