Class: PlaybackControls
Defined in: interaction/PlaybackControls.ts:30
PlaybackControls for timeline manipulation. Extends Controls to add playback-specific UI elements.
Extends
Constructors
Constructor
new PlaybackControls(
scene,options):PlaybackControls
Defined in: interaction/PlaybackControls.ts:46
Create new PlaybackControls.
Parameters
scene
The scene to control
options
Configuration options
Returns
PlaybackControls
Overrides
Properties
_options
protected_options:Required<ControlsOptions>
Defined in: interaction/Controls.ts:89
Inherited from
_panel
protected_panel:HTMLElement
Defined in: interaction/Controls.ts:88
Inherited from
_scene
protected_scene:Scene
Defined in: interaction/Controls.ts:87
Inherited from
Accessors
panel
Get Signature
get panel():
HTMLElement
Defined in: interaction/Controls.ts:109
Get the underlying HTML panel element.
Returns
HTMLElement
Inherited from
playbackRate
Get Signature
get playbackRate():
number
Defined in: interaction/PlaybackControls.ts:63
Get the current playback rate.
Returns
number
Set Signature
set playbackRate(
rate):void
Defined in: interaction/PlaybackControls.ts:70
Set the playback rate.
Parameters
rate
number
Returns
void
scene
Get Signature
get scene():
Scene
Defined in: interaction/Controls.ts:116
Get the scene this controls panel is attached to.
Returns
Inherited from
Methods
_getAccentColor()
protected_getAccentColor():string
Defined in: interaction/Controls.ts:176
Get the accent color based on theme.
Returns
string
Inherited from
_getBorderColor()
protected_getBorderColor():string
Defined in: interaction/Controls.ts:190
Get the border color based on theme.
Returns
string
Inherited from
_getHoverColor()
protected_getHoverColor():string
Defined in: interaction/Controls.ts:183
Get the hover color based on theme.
Returns
string
Inherited from
addButton()
addButton(
config):HTMLElement
Defined in: interaction/Controls.ts:318
Add a button control.
Parameters
config
Button configuration
Returns
HTMLElement
The created button element
Inherited from
addCheckbox()
addCheckbox(
config):HTMLElement
Defined in: interaction/Controls.ts:366
Add a checkbox control.
Parameters
config
Checkbox configuration
Returns
HTMLElement
The created wrapper element
Inherited from
addColorPicker()
addColorPicker(
config):HTMLElement
Defined in: interaction/Controls.ts:447
Add a color picker control.
Parameters
config
Color picker configuration
Returns
HTMLElement
The created wrapper element
Inherited from
addLabel()
addLabel(
text):HTMLElement
Defined in: interaction/Controls.ts:566
Add a section label.
Parameters
text
string
Label text
Returns
HTMLElement
The created label element
Inherited from
addSeparator()
addSeparator():
void
Defined in: interaction/Controls.ts:551
Add a horizontal separator line.
Returns
void
Inherited from
addSlider()
addSlider(
config):HTMLElement
Defined in: interaction/Controls.ts:199
Add a slider control.
Parameters
config
Slider configuration
Returns
HTMLElement
The created wrapper element
Inherited from
dispose()
dispose():
void
Defined in: interaction/PlaybackControls.ts:462
Clean up resources.
Returns
void
Overrides
hide()
hide():
void
Defined in: interaction/Controls.ts:592
Hide the controls panel.
Returns
void
Inherited from
isVisible()
isVisible():
boolean
Defined in: interaction/Controls.ts:610
Check if the controls panel is visible.
Returns
boolean
Inherited from
onTimeUpdate()
onTimeUpdate(
callback):void
Defined in: interaction/PlaybackControls.ts:56
Set callback for time updates.
Parameters
callback
Function called when time changes
Returns
void
show()
show():
void
Defined in: interaction/Controls.ts:585
Show the controls panel.
Returns
void
Inherited from
toggle()
toggle():
void
Defined in: interaction/Controls.ts:599
Toggle the controls panel visibility.
Returns
void
Inherited from
updateTime()
updateTime(
currentTime,duration):void
Defined in: interaction/PlaybackControls.ts:356
Update the time display.
Parameters
currentTime
number
Current playback time in seconds
duration
number
Total duration in seconds
Returns
void