Selva Compute API Reference - v1.1.2
    Preparing search index...

    Class XRSessionAbstract

    Hierarchy

    • EventTarget
      • XRSession

    Implements

    Implemented by

    Index

    Constructors

    Properties

    deletePersistentAnchor?: (uuid: string) => Promise<void>

    Deletes the persistent anchor with the given UUID. Also deletes the anchor.

    If the sessions map of persistent anchors does not contain the given UUID the promise will be rejected with a InvalidStateError.

    depthActive?: boolean
    depthDataFormat?: XRDepthDataFormat
    depthType?: XRDepthType
    depthUsage?: XRDepthUsage
    domOverlayState?: XRDOMOverlayState
    enabledFeatures?: string[]
    environmentBlendMode: XREnvironmentBlendMode
    frameRate?: number
    inputSources: XRInputSourceArray

    Returns a list of this session's XRInputSources, each representing an input device used to control the camera and/or scene.

    interactionMode?: XRInteractionMode
    isSystemKeyboardSupported: boolean
    onframeratechange: XRSessionEventHandler
    oninputsourceschange: XRInputSourcesChangeEventHandler
    onvisibilitychange: XRSessionEventHandler
    pauseDepthSensing?: () => void
    persistentAnchors?: string[]

    A list of the known persistent anchors

    renderState: XRRenderState

    object which contains options affecting how the imagery is rendered. This includes things such as the near and far clipping planes

    requestHitTest?: (
        ray: XRRay,
        referenceSpace: XRReferenceSpace,
    ) => Promise<XRHitResult[]> | undefined
    requestHitTestSource?: (
        options: XRHitTestOptionsInit,
    ) => Promise<XRHitTestSource> | undefined
    requestHitTestSourceForTransientInput?: (
        options: XRTransientInputHitTestOptionsInit,
    ) => Promise<XRTransientInputHitTestSource> | undefined
    restorePersistentAnchor?: (uuid: string) => Promise<XRAnchor>

    Restores a persistent anchor with the given UUID.

    If the sessions map of persistent anchors does not contain the given UUID or if the session has ended, the promise will be rejected with a InvalidStateError.

    resumeDepthSensing?: () => void
    supportedFrameRates?: Float32Array<ArrayBufferLike>
    visibilityState: XRVisibilityState

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Type Parameters

      Parameters

      Returns void

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      Returns void

    • Removes a callback from the animation frame painting callback from XRSession's set of animation frame rendering callbacks, given the identifying handle returned by a previous call to requestAnimationFrame().

      Parameters

      • id: number

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Ends the WebXR session. Returns a promise which resolves when the session has been shut down.

      Returns Promise<void>

    • XRSession is extended to contain the initiateRoomCapture method which, if supported, will ask the XR Compositor to capture the current room layout. It is up to the XRCompositor if this will replace or augment the set of tracked planes. The user agent MAY also ignore this call, for instance if it doesn’t support a manual room capture more or if it determines that the room is already set up. The initiateRoomCapture method MUST only be able to be called once per XRSession.

      Returns Promise<undefined>

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Type Parameters

      Parameters

      Returns void

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      Returns void

    • Schedules the specified method to be called the next time the user agent is working on rendering an animation frame for the WebXR device. Returns an integer value which can be used to identify the request for the purposes of canceling the callback using cancelAnimationFrame(). This method is comparable to the Window.requestAnimationFrame() method.

      Parameters

      Returns number

    • Parameters

      Returns Promise<void>

    • Parameters

      • rate: number

      Returns Promise<void>