API

Class WebXRControllerComponent

This class represents a single component (for example button or thumbstick) of a motion controller

Implements

Index
id: string

the id of this component

onAxisValueChangedObservable: Observable<{ x: number; y: number }> = ...

If axes are available for this component (like a touchpad or thumbstick) the observers will be notified when the axes data changes

onButtonStateChangedObservable: Observable<WebXRControllerComponent> = ...

Observers registered here will be triggered when the state of a button changes State change is either pressed / touched / value

the type of the component

BUTTON_TYPE: MotionControllerComponentType = "button"

button component type

SQUEEZE_TYPE: MotionControllerComponentType = "squeeze"

squeeze component type

THUMBSTICK_TYPE: MotionControllerComponentType = "thumbstick"

Thumbstick component type

TOUCHPAD_TYPE: MotionControllerComponentType = "touchpad"

Touchpad component type

TRIGGER_TYPE: MotionControllerComponentType = "trigger"

trigger component type