Class WebXRManager

JavaScript events for custom objects

// Adding events to a custom object
class Car extends EventDispatcher {
start() {
this.dispatchEvent( { type: 'start', message: 'vroom vroom!' } );
}
};
// Using events with the custom object
const car = new Car();
car.addEventListener( 'start', ( event ) => {
alert( event.message );
} );
car.start();

Hierarchy (view full)

Constructors

Properties

enabled: boolean
false
isPresenting: boolean
false
cameraAutoUpdate: boolean
true

Methods

  • Parameters

    • index: number

    Returns XRTargetRaySpace

  • Parameters

    • index: number

    Returns XRGripSpace

  • Parameters

    • index: number

    Returns XRHandSpace

  • Parameters

    • value: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns XRFrame

  • Returns null | XRSession

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns undefined | number

  • Parameters

    • value: number

    Returns void

  • Returns void