Function: addUiSliderComponent()
addUiSliderComponent(
world,entity,options):UiSliderEcsComponent
Defined in: ui/components/ui-slider-component.ts:82
Attaches a UiSliderEcsComponent to entity. Needs a
UiInteractableEcsComponent on the same entity for
createUiSliderEcsSystem to read drag gestures from.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options
UiSliderRequiredOptions & Partial<UiSliderDefaultedOptions>
Options for configuring the slider. handle has no
sensible default and must always be provided; value defaults to
minValue.
Returns
The attached component, for further tuning, listening to
onValueChanged, or reading/setting value directly.