@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / UISliderComponent
Class: UISliderComponent ​
Defined in: components/UISlider.ts:35
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:65
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:37 |
min | number | - | components/UISlider.ts:38 |
max | number | - | components/UISlider.ts:39 |
actionId | string | Dispatch identifier; empty string means "use the entity name". | components/UISlider.ts:41 |
width | number | Full width in metres. | components/UISlider.ts:43 |
height | number | Full height in metres. | components/UISlider.ts:45 |
trackColor | string | - | components/UISlider.ts:46 |
accentColor | string | Fill colour between min and the current value. | components/UISlider.ts:48 |
knobColor | string | - | components/UISlider.ts:49 |
pixelDensity? | number | Texture density in px/metre, clamped 256–2048 at render time. Absent means the default: a defaulted field would count as a change on every instance of a prefab saved before it existed. | components/UISlider.ts:55 |
style? | UiStyle | Modern styling; wins over the flat fields above. Absent until authored. | components/UISlider.ts:57 |
variant? | UiSliderVariant | How the value is drawn. progress and ring are read-only. | components/UISlider.ts:59 |
step? | number | Snap to multiples of this, measured from min. | components/UISlider.ts:61 |
readOnly? | boolean | Shows the value but takes no input. | components/UISlider.ts:63 |

