Skip to content

@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 ​

ParameterType
options?UISliderOptions

Returns ​

UISliderComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
valuenumberCurrent value, clamped to [min, max].components/UISlider.ts:29
minnumber-components/UISlider.ts:30
maxnumber-components/UISlider.ts:31
actionIdstringDispatch identifier; empty string means "use the entity name".components/UISlider.ts:33
widthnumberFull width in metres.components/UISlider.ts:35
heightnumberFull height in metres.components/UISlider.ts:37
trackColorstring-components/UISlider.ts:38
accentColorstringFill colour between min and the current value.components/UISlider.ts:40
knobColorstring-components/UISlider.ts:41