Class: Controls
Defined in: interaction/Controls.ts:86
Controls panel for interactive scene manipulation. Creates a DOM-based UI overlay positioned over the scene canvas.
Extended by
Constructors
Constructor
new Controls(
scene,options):Controls
Defined in: interaction/Controls.ts:96
Create a new Controls panel.
Parameters
scene
The scene to attach controls to
options
ControlsOptions = {}
Configuration options
Returns
Controls
Properties
_options
protected_options:Required<ControlsOptions>
Defined in: interaction/Controls.ts:89
_panel
protected_panel:HTMLElement
Defined in: interaction/Controls.ts:88
_scene
protected_scene:Scene
Defined in: interaction/Controls.ts:87
Accessors
panel
Get Signature
get panel():
HTMLElement
Defined in: interaction/Controls.ts:109
Get the underlying HTML panel element.
Returns
HTMLElement
scene
Get Signature
get scene():
Scene
Defined in: interaction/Controls.ts:116
Get the scene this controls panel is attached to.
Returns
Methods
_getAccentColor()
protected_getAccentColor():string
Defined in: interaction/Controls.ts:176
Get the accent color based on theme.
Returns
string
_getBorderColor()
protected_getBorderColor():string
Defined in: interaction/Controls.ts:190
Get the border color based on theme.
Returns
string
_getHoverColor()
protected_getHoverColor():string
Defined in: interaction/Controls.ts:183
Get the hover color based on theme.
Returns
string
addButton()
addButton(
config):HTMLElement
Defined in: interaction/Controls.ts:318
Add a button control.
Parameters
config
Button configuration
Returns
HTMLElement
The created button element
addCheckbox()
addCheckbox(
config):HTMLElement
Defined in: interaction/Controls.ts:366
Add a checkbox control.
Parameters
config
Checkbox configuration
Returns
HTMLElement
The created wrapper element
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
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
addSeparator()
addSeparator():
void
Defined in: interaction/Controls.ts:551
Add a horizontal separator line.
Returns
void
addSlider()
addSlider(
config):HTMLElement
Defined in: interaction/Controls.ts:199
Add a slider control.
Parameters
config
Slider configuration
Returns
HTMLElement
The created wrapper element
dispose()
dispose():
void
Defined in: interaction/Controls.ts:617
Clean up and remove the controls panel from the DOM.
Returns
void
hide()
hide():
void
Defined in: interaction/Controls.ts:592
Hide the controls panel.
Returns
void
isVisible()
isVisible():
boolean
Defined in: interaction/Controls.ts:610
Check if the controls panel is visible.
Returns
boolean
show()
show():
void
Defined in: interaction/Controls.ts:585
Show the controls panel.
Returns
void
toggle()
toggle():
void
Defined in: interaction/Controls.ts:599
Toggle the controls panel visibility.
Returns
void