Class WebXROculusTouchMotionController
Hierarchy
- WebXRAbstractMotionController
- WebXROculusTouchMotionController
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
constructs a new abstract motion controller
Parameters
scene: Scene
gamepadObject: IMinimalMotionControllerObject
handedness: MotionControllerHandedness
Optional _legacyMapping: boolean
Optional _forceLegacyControllers: boolean
Returns WebXROculusTouchMotionController
Properties
Readonly componentsSearch playground for 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
[id: string]: WebXRControllerComponent
disable AnimationSearch playground for disableAnimation
Disable the model's animation. Can be set at any time.
gamepad ObjectSearch playground for gamepadObject
The gamepad object correlating to this controller
handednessSearch playground for handedness
handedness (left/right/none) of this controller
on Model Loaded ObservableSearch playground for onModelLoadedObservable
Observers registered here will be triggered when the model of this controller is done loading
profile IdSearch playground for profileId
The profile id of this motion controller
root MeshSearch 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
The base url used to load the left and right controller models
Static MODEL_ LEFT_ FILENAMESearch playground for MODEL_LEFT_FILENAME
The name of the left controller model file
Static MODEL_ RIGHT_ FILENAMESearch playground for MODEL_RIGHT_FILENAME
The name of the right controller model file
Static QUEST_ MODEL_ BASE_ URLSearch playground for QUEST_MODEL_BASE_URL
Base Url for the Quest controller model.
Accessors
handness
Backwards compatibility due to a deeply-integrated typo
Returns MotionControllerHandedness
Methods
disposeSearch playground for dispose
Dispose this controller, the model mesh and all its components
Returns void
get All Components Of TypeSearch playground for getAllComponentsOfType
Returns all components of specific type
Parameters
type: MotionControllerComponentType
the type to search for
Returns WebXRControllerComponent[]
an array of components with this type
get ComponentSearch playground for getComponent
get a component based an its component id as defined in layout.components
Parameters
id: string
the id of the component
Returns WebXRControllerComponent
the component correlates to the id or undefined if not found
get Component IdsSearch playground for getComponentIds
Get the list of components available in this motion controller
Returns string[]
an array of strings correlating to available components
get Component Of TypeSearch playground for getComponentOfType
Get the first component of specific type
Parameters
type: MotionControllerComponentType
type of component to find
Returns Nullable<WebXRControllerComponent>
a controller component or null if not found
get Main ComponentSearch playground for getMainComponent
Get the main (Select) component of this controller as defined in the layout
Returns WebXRControllerComponent
the main component of this controller
load ModelSearch playground for loadModel
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
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
update FromXRFrameSearch playground for updateFromXRFrame
Update this model using the current XRFrame
Parameters
xrFrame: XRFrame
the current xr frame to use and update the model
Returns void
The motion controller class for oculus touch (quest, rift). This class supports legacy mapping as well the standard xr mapping