Interface IMinimalMotionControllerObject
interface IMinimalMotionControllerObject {
axes: number[];
buttons: { pressed: boolean; touched: boolean; value: number }[];
hapticActuators?: (
IWebXRControllerHapticActuator & {
pulse: (value: number, duration: number) => Promise<boolean>;
}
)[];
vibrationActuator?: IWebXRControllerHapticActuator;
}
axes: number[];
buttons: { pressed: boolean; touched: boolean; value: number }[];
hapticActuators?: (
IWebXRControllerHapticActuator & {
pulse: (value: number, duration: number) => Promise<boolean>;
}
)[];
vibrationActuator?: IWebXRControllerHapticActuator;
}
Properties
axes
axes: number[]
Available axes of this controller
buttons
buttons: { pressed: boolean; touched: boolean; value: number }[]
An array of available buttons
Type Declaration
-
pressed: boolean
If the button/trigger is currently pressed
-
touched: boolean
If the button/trigger is currently touched
-
value: number
Value of the button/trigger
Optionalhaptic Actuators
hapticActuators?: (
IWebXRControllerHapticActuator & {
pulse: (value: number, duration: number) => Promise<boolean>;
}
)[]
IWebXRControllerHapticActuator & {
pulse: (value: number, duration: number) => Promise<boolean>;
}
)[]
EXPERIMENTAL haptic support.
Type Declaration
-
pulse: (value: number, duration: number) => Promise<boolean>
Plays a legacy haptic pulse.
Optionalvibration Actuator
The primary Gamepad vibration actuator used for advanced haptic effects.
The elements needed for change-detection of the gamepad objects in motion controllers