Skip to content

r3f-xr-widgets / UseXRButtonsOptions

Interface: UseXRButtonsOptions ​

Defined in: src/hooks/useXRButtons.ts:13

Configuration options for useXRButtons hook

Properties ​

onAPress()? ​

optional onAPress: () => void

Defined in: src/hooks/useXRButtons.ts:15

Callback when A button is pressed on either controller

Returns ​

void


onBPress()? ​

optional onBPress: () => void

Defined in: src/hooks/useXRButtons.ts:17

Callback when B button is pressed on either controller

Returns ​

void


onThumbstickDown()? ​

optional onThumbstickDown: () => void

Defined in: src/hooks/useXRButtons.ts:26

Callback when thumbstick pushed down past threshold (0.7) on either controller

Returns ​

void


onThumbstickLeft()? ​

optional onThumbstickLeft: () => void

Defined in: src/hooks/useXRButtons.ts:28

Callback when thumbstick pushed left past threshold (0.7) on either controller

Returns ​

void


onThumbstickRight()? ​

optional onThumbstickRight: () => void

Defined in: src/hooks/useXRButtons.ts:30

Callback when thumbstick pushed right past threshold (0.7) on either controller

Returns ​

void


onThumbstickUp()? ​

optional onThumbstickUp: () => void

Defined in: src/hooks/useXRButtons.ts:24

Callback when thumbstick pushed up past threshold (0.7) on either controller

Returns ​

void


onXPress()? ​

optional onXPress: () => void

Defined in: src/hooks/useXRButtons.ts:19

Callback when X button is pressed on either controller

Returns ​

void


onYPress()? ​

optional onYPress: () => void

Defined in: src/hooks/useXRButtons.ts:21

Callback when Y button is pressed on either controller

Returns ​

void


requirePointerOn? ​

optional requirePointerOn: boolean

Defined in: src/hooks/useXRButtons.ts:33

If true, only trigger callbacks when pointer is on target.

Default ​

ts
true

Released under the MIT License.