Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXROculusTouchMotionController

The motion controller class for oculus touch (quest, rift). This class supports legacy mapping as well the standard xr mapping

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly componentsSearch playground for components

components: {}

A map of components (WebXRControllerComponent) in this motion controller Components have a ComponentType and can also have both button and axis definitions

Type declaration

disableAnimationSearch playground for disableAnimation

disableAnimation: boolean

Disable the model's animation. Can be set at any time.

gamepadObjectSearch playground for gamepadObject

The gamepad object correlating to this controller

handednessSearch playground for handedness

handedness (left/right/none) of this controller

onModelLoadedObservableSearch playground for onModelLoadedObservable

onModelLoadedObservable: Observable<WebXRAbstractMotionController>

Observers registered here will be triggered when the model of this controller is done loading

profileIdSearch playground for profileId

profileId: string

rootMeshSearch playground for rootMesh

The root mesh of the model. It is null if the model was not yet initialized

Static MODEL_BASE_URLSearch playground for MODEL_BASE_URL

MODEL_BASE_URL: string

The base url used to load the left and right controller models

Static MODEL_LEFT_FILENAMESearch playground for MODEL_LEFT_FILENAME

MODEL_LEFT_FILENAME: string

The name of the left controller model file

Static MODEL_RIGHT_FILENAMESearch playground for MODEL_RIGHT_FILENAME

MODEL_RIGHT_FILENAME: string

The name of the right controller model file

Static QUEST_MODEL_BASE_URLSearch playground for QUEST_MODEL_BASE_URL

QUEST_MODEL_BASE_URL: string

Base Url for the Quest controller model.

Accessors

handness

Methods

disposeSearch playground for dispose

  • dispose(): void

getAllComponentsOfTypeSearch playground for getAllComponentsOfType

getComponentSearch playground for getComponent

getComponentIdsSearch playground for getComponentIds

  • getComponentIds(): string[]
  • Get the list of components available in this motion controller

    Returns string[]

    an array of strings correlating to available components

getComponentOfTypeSearch playground for getComponentOfType

getMainComponentSearch playground for getMainComponent

loadModelSearch playground for loadModel

  • loadModel(): Promise<boolean>
  • Loads the model correlating to this controller When the mesh is loaded, the onModelLoadedObservable will be triggered

    Returns Promise<boolean>

    A promise fulfilled with the result of the model loading

pulse

  • pulse(value: number, duration: number, hapticActuatorIndex?: number): Promise<boolean>
Pulse (vibrate) this controller If the controller does not support pulses, this function will fail silently and return Promise directly after called Consecutive calls to this function will cancel the last pulse call

Parameters

  • value: number

    the strength of the pulse in 0.0...1.0 range

  • duration: number

    Duration of the pulse in milliseconds

  • Optional hapticActuatorIndex: number

    optional index of actuator (will usually be 0)

Returns Promise<boolean>

a promise that will send true when the pulse has ended and false if the device doesn't support pulse or an error accrued

updateFromXRFrameSearch playground for updateFromXRFrame

  • updateFromXRFrame(xrFrame: XRFrame): void

Legend

  • Property
  • Method
  • Constructor
  • Property
  • Inherited property
  • Inherited method
  • Static property
  • Static method