Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXRInputSource

Represents an XR controller

Hierarchy

  • WebXRInputSource

Index

Constructors

constructor

Properties

Optional gripSearch playground for grip

Represents the part of the controller that is held. This may not exist if the controller is the head mounted display itself, if that's the case only the pointer from the head will be available

inputSourceSearch playground for inputSource

inputSource: XRInputSource

The underlying input source for the controller

Optional motionControllerSearch playground for motionController

If available, this is the gamepad object related to this controller. Using this object it is possible to get click events and trackpad changes of the webxr controller that is currently being used.

onDisposeObservableSearch playground for onDisposeObservable

onDisposeObservable: Observable<WebXRInputSource>

Event that fires when the controller is removed/disposed. The object provided as event data is this controller, after associated assets were disposed. uniqueId is still available.

onMeshLoadedObservableSearch playground for onMeshLoadedObservable

onMeshLoadedObservable: Observable<AbstractMesh>

Will be triggered when the mesh associated with the motion controller is done loading. It is also possible that this will never trigger (!) if no mesh was loaded, or if the developer decides to load a different mesh A shortened version of controller -> motion controller -> on mesh loaded.

onMotionControllerInitObservableSearch playground for onMotionControllerInitObservable

onMotionControllerInitObservable: Observable<WebXRAbstractMotionController>

Observers registered here will trigger when a motion controller profile was assigned to this xr controller

pointerSearch playground for pointer

pointer: AbstractMesh

Pointer which can be used to select objects or attach a visible laser to

Accessors

uniqueId

  • get uniqueId(): string
  • Get this controllers unique id

    Returns string

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Disposes of the object

    Returns void

getWorldPointerRayToRefSearch playground for getWorldPointerRayToRef

  • getWorldPointerRayToRef(result: Ray, gripIfAvailable?: boolean): void
  • Gets a world space ray coming from the pointer or grip

    Parameters

    • result: Ray

      the resulting ray

    • Optional gripIfAvailable: boolean

      use the grip mesh instead of the pointer, if available

    Returns void

updateFromXRFrameSearch playground for updateFromXRFrame

  • Updates the controller pose based on the given XRFrame

    Parameters

    Returns void

Legend

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