Skip to main content

Function: driveUiAxis()

driveUiAxis(axis, value): void

Defined in: ui/types/ui-axis.ts:209

Drives a UiAxis to a new normalized anchor position - anchor for a UiPointAxis, anchorMax for a UiStretchAxis - mutating it in place and leaving pivot/size/margin/anchorMin untouched. The mechanism createUiSliderEcsSystem/createUiProgressBarEcsSystem use to slide a handle along a track, or grow a fill span, from a normalized [0, 1] value every tick.

Parameters​

axis​

UiAxis

The axis to mutate.

value​

number

The new normalized anchor position.

Returns​

void