Skip to main content

Variable: UiAxis

UiAxis: object

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

Factories for UiAxis. Use these (rather than a raw object literal) to build one axis of a RectTransformEcsComponent.x/.y, or of a UiAnchor preset's own x/y.

Type Declaration​

point​

point: (anchor, options) => UiPointAxis

Creates a UiPointAxis.

Parameters​

anchor​

number

Normalized anchor position within the parent's rect on this axis.

options?​

UiPointAxisOptions = {}

Options for configuring the axis. pivot defaults to anchor; size defaults to 100.

Returns​

UiPointAxis

The point axis.

stretch​

stretch: (range, options) => UiStretchAxis

Creates a UiStretchAxis.

Parameters​

range​

UiStretchAxisRange

The normalized [min, max] span this axis anchors to within the parent's rect.

options?​

UiStretchAxisOptions = {}

Options for configuring the axis. margin defaults to 0; pivot defaults to 0.5.

Returns​

UiStretchAxis

The stretch axis.