Class: SliderSystem
Drives SliderComponent. PreRender, before TransformSystem, so the handle lands this frame.
Every frame (edit mode too): value is clamped (and rounded for wholeNumbers), the handle child is moved to it along the track and the fill child shows the track up to it. While the game runs: a press on the track jumps there and the drag follows, through the global pointer stream (so it keeps going off the slider); SliderChanged fires on every change.
Press positions come from IInput, not the entity event, so the jump and the drag share one coordinate space. Pixi's handler and IInput's listener see the same DOM pointerdown in either order, so whichever runs second starts the drag.
Extends
BoundComponentSystem<SliderComponent,BoundSlider>
Constructors
Constructor
ts
new SliderSystem(): SliderSystem;Returns
SliderSystem
Inherited from
ts
BoundComponentSystem<SliderComponent, BoundSlider>.constructorProperties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
enabled | public | boolean | true | BoundComponentSystem.enabled |
parallel | public | boolean | false | BoundComponentSystem.parallel |
Methods
GetName()
ts
GetName(): string;Returns
string
Overrides
ts
BoundComponentSystem.GetNameGetOrder()
ts
GetOrder(): SystemOrder;Returns
SystemOrder
GetPhase()
ts
GetPhase(): SystemPhase;Returns
Overrides
ts
BoundComponentSystem.GetPhaseOnClose()
ts
OnClose(): void;Returns
void
Inherited from
ts
BoundComponentSystem.OnCloseOnInit()
ts
OnInit(engine): void;Parameters
| Parameter | Type |
|---|---|
engine | IEngine |
Returns
void
Inherited from
ts
BoundComponentSystem.OnInitOnRender()
ts
OnRender(scene, _renderer): void;Parameters
| Parameter | Type |
|---|---|
scene | Scene |
_renderer | IRenderer |
Returns
void
Overrides
ts
BoundComponentSystem.OnRenderOnRendererChanged()
ts
OnRendererChanged(_renderer): void;Parameters
| Parameter | Type |
|---|---|
_renderer | IRenderer |
Returns
void
Inherited from
ts
BoundComponentSystem.OnRendererChangedOnStart()
ts
OnStart(scene, renderer): void;Parameters
| Parameter | Type |
|---|---|
scene | Scene |
renderer | IRenderer |
Returns
void
Overrides
ts
BoundComponentSystem.OnStartOnStop()
ts
OnStop(scene): void;Parameters
| Parameter | Type |
|---|---|
scene | Scene |
Returns
void
Overrides
ts
BoundComponentSystem.OnStopOnUpdate()
ts
OnUpdate(_scene, _dt): void | Promise<void>;Parameters
| Parameter | Type |
|---|---|
_scene | Scene |
_dt | number |
Returns
void | Promise<void>
Inherited from
ts
BoundComponentSystem.OnUpdate