Options
All
  • Public
  • Public/Protected
  • All
Menu

A profiled motion controller has its profile loaded from an online repository. The class is responsible of loading the model, mapping the keys and enabling model-animations

Hierarchy

Index

Constructors

Properties

_doNotLoadControllerMesh: boolean
internal
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

disableAnimation: boolean

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

The gamepad object correlating to this controller

handedness (left/right/none) of this controller

onModelLoadedObservable: Observable<WebXRAbstractMotionController>

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

profileId: string

The profile ID of this controller. Will be populated when the controller initializes.

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

Accessors

  • Backwards compatibility due to a deeply-integrated typo

    Returns MotionControllerHandedness

Methods

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

    Returns string[]

    an array of strings correlating to available components

  • 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(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

  • updateFromXRFrame(xrFrame: XRFrame): void

Legend

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

Settings

Theme