Skip to main content

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

Scene

The scene to control

options

PlaybackControlsOptions = {}

Configuration options

Returns

PlaybackControls

Overrides

Controls.constructor

Properties

_options

protected _options: Required<ControlsOptions>

Defined in: interaction/Controls.ts:89

Inherited from

Controls._options


_panel

protected _panel: HTMLElement

Defined in: interaction/Controls.ts:88

Inherited from

Controls._panel


_scene

protected _scene: Scene

Defined in: interaction/Controls.ts:87

Inherited from

Controls._scene

Accessors

panel

Get Signature

get panel(): HTMLElement

Defined in: interaction/Controls.ts:109

Get the underlying HTML panel element.

Returns

HTMLElement

Inherited from

Controls.panel


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

Scene

Inherited from

Controls.scene

Methods

_getAccentColor()

protected _getAccentColor(): string

Defined in: interaction/Controls.ts:176

Get the accent color based on theme.

Returns

string

Inherited from

Controls._getAccentColor


_getBorderColor()

protected _getBorderColor(): string

Defined in: interaction/Controls.ts:190

Get the border color based on theme.

Returns

string

Inherited from

Controls._getBorderColor


_getHoverColor()

protected _getHoverColor(): string

Defined in: interaction/Controls.ts:183

Get the hover color based on theme.

Returns

string

Inherited from

Controls._getHoverColor


addButton()

addButton(config): HTMLElement

Defined in: interaction/Controls.ts:318

Add a button control.

Parameters

config

ButtonConfig

Button configuration

Returns

HTMLElement

The created button element

Inherited from

Controls.addButton


addCheckbox()

addCheckbox(config): HTMLElement

Defined in: interaction/Controls.ts:366

Add a checkbox control.

Parameters

config

CheckboxConfig

Checkbox configuration

Returns

HTMLElement

The created wrapper element

Inherited from

Controls.addCheckbox


addColorPicker()

addColorPicker(config): HTMLElement

Defined in: interaction/Controls.ts:447

Add a color picker control.

Parameters

config

ColorPickerConfig

Color picker configuration

Returns

HTMLElement

The created wrapper element

Inherited from

Controls.addColorPicker


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

Controls.addLabel


addSeparator()

addSeparator(): void

Defined in: interaction/Controls.ts:551

Add a horizontal separator line.

Returns

void

Inherited from

Controls.addSeparator


addSlider()

addSlider(config): HTMLElement

Defined in: interaction/Controls.ts:199

Add a slider control.

Parameters

config

SliderConfig

Slider configuration

Returns

HTMLElement

The created wrapper element

Inherited from

Controls.addSlider


dispose()

dispose(): void

Defined in: interaction/PlaybackControls.ts:462

Clean up resources.

Returns

void

Overrides

Controls.dispose


hide()

hide(): void

Defined in: interaction/Controls.ts:592

Hide the controls panel.

Returns

void

Inherited from

Controls.hide


isVisible()

isVisible(): boolean

Defined in: interaction/Controls.ts:610

Check if the controls panel is visible.

Returns

boolean

Inherited from

Controls.isVisible


onTimeUpdate()

onTimeUpdate(callback): void

Defined in: interaction/PlaybackControls.ts:56

Set callback for time updates.

Parameters

callback

TimeUpdateCallback

Function called when time changes

Returns

void


show()

show(): void

Defined in: interaction/Controls.ts:585

Show the controls panel.

Returns

void

Inherited from

Controls.show


toggle()

toggle(): void

Defined in: interaction/Controls.ts:599

Toggle the controls panel visibility.

Returns

void

Inherited from

Controls.toggle


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