@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / UISliderComponent
Class: UISliderComponent ​
Defined in: components/UISlider.ts:27
A draggable value control.
Press and drag along the track: the value is the clamped projection of the pointer onto the track's local X. The fill and knob are separate quads positioned from value, so dragging repositions geometry and never redraws the canvas. Scripts hear changes via Behaviour.onUiChange (throttled to real value changes, plus a final dispatch on release).
Extends ​
Constructors ​
Constructor ​
ts
new UISliderComponent(options?): UISliderComponent;Defined in: components/UISlider.ts:43
Parameters ​
| Parameter | Type |
|---|---|
options? | UISliderOptions |
Returns ​
UISliderComponent
Overrides ​
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
value | number | Current value, clamped to [min, max]. | components/UISlider.ts:29 |
min | number | - | components/UISlider.ts:30 |
max | number | - | components/UISlider.ts:31 |
actionId | string | Dispatch identifier; empty string means "use the entity name". | components/UISlider.ts:33 |
width | number | Full width in metres. | components/UISlider.ts:35 |
height | number | Full height in metres. | components/UISlider.ts:37 |
trackColor | string | - | components/UISlider.ts:38 |
accentColor | string | Fill colour between min and the current value. | components/UISlider.ts:40 |
knobColor | string | - | components/UISlider.ts:41 |

