Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXRLayers

Exposes the WebXR Layers API.

Hierarchy

Implements

Index

Constructors

constructor

Properties

disableAutoAttachSearch playground for disableAutoAttach

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposedSearch playground for isDisposed

isDisposed: boolean

Is this feature disposed?

xrNativeFeatureNameSearch playground for xrNativeFeatureName

xrNativeFeatureName: string

The name of the native xr feature name (like anchor, hit-test, or hand-tracking)

Static Readonly NameSearch playground for Name

Name: string

The module's name

Static Readonly VersionSearch playground for Version

Version: number

The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the WebXR specs version

Accessors

attached

  • get attached(): boolean

Methods

attachSearch playground for attach

  • attach(): boolean
  • Attach this feature. Will usually be called by the features manager.

    Returns boolean

    true if successful.

createProjectionLayerSearch playground for createProjectionLayer

  • Creates a new XRProjectionLayer.

    Parameters

    • Optional params: XRProjectionLayerInit

      an object providing configuration options for the new XRProjectionLayer

    Returns WebXRProjectionLayerWrapper

    the projection layer

createXRWebGLLayerSearch playground for createXRWebGLLayer

  • Creates a new XRWebGLLayer.

    Parameters

    • Optional params: XRWebGLLayerInit

      an object providing configuration options for the new XRWebGLLayer

    Returns WebXRWebGLLayerWrapper

    the XRWebGLLayer

detachSearch playground for detach

  • detach(): boolean

disposeSearch playground for dispose

  • dispose(): void

isCompatibleSearch playground for isCompatible

  • isCompatible(): boolean

setXRSessionLayersSearch playground for setXRSessionLayers

  • setXRSessionLayers(wrappedLayers: Array<WebXRLayerWrapper>): void
  • Sets the layers to be used by the XR session. Note that you must call this function with any layers you wish to render to since it adds them to the XR session's render state (replacing any layers that were added in a previous call to setXRSessionLayers or updateRenderState). This method also sets up the session manager's render target texture provider as the first layer in the array, which feeds the WebXR camera(s) attached to the session.

    Parameters

    • wrappedLayers: Array<WebXRLayerWrapper>

      An array of WebXRLayerWrapper, usually returned from the WebXRLayers createLayer functions.

    Returns void

Legend

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