English
Class: SSUiStateDriver
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:139
Plays the section an SSUiState calls for on a player the host owns.
show switches at once and plays the new section from its first frame, looping; the section that was playing is dropped. Under reduced motion it holds the section's first frame instead, stopped, so no event fires — except that normal, and the states that fall back to it, play the reduced_motion label's section when the animation has one.
It takes the player's playback over: it selects animations, sets sections and the loop count, and plays and stops.
Constructors
Constructor
new SSUiStateDriver(
player,options?):SSUiStateDriver
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:157
Parameters
player
options?
animation?
string
clips?
Partial<Record<SSUiState, SSUiClip>>
Returns
SSUiStateDriver
Properties
animation
readonlyanimation:string|undefined
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:145
The animation the states' labels are read from. When omitted, the one the player has selected the first time a state is shown, or else the pack's first.
clips
readonlyclips:SSUiClips
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:148
Per-state replacements for the labels named after the states.
player
readonlyplayer:SSPlayer
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:158
Accessors
state
Get Signature
get state():
SSUiState|null
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:166
The state last shown, or null before one has been.
Returns
SSUiState | null
Methods
show()
show(
state,reducedMotion?):void
Defined in: packages/ssplayer-pixi-ui/src/uiState.ts:178
Shows state — or nothing before the player has a pack.
Showing the state already shown, with the same reducedMotion, does nothing while the player still plays the animation it was given, so it can be called every frame. After the player loads another pack, it shows the state again.
Parameters
state
reducedMotion?
boolean = false
Returns
void