Class WebXRLayers
Hierarchy
-
WebXRAbstractFeature
- WebXRLayers
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Parameters
-
_xrSessionManager: WebXRSessionManager
-
Optional _options: IWebXRLayersOptions
Returns WebXRLayers
-
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
xr Native Feature NameSearch playground for xrNativeFeatureName
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Static Readonly NameSearch playground for Name
The module's name
Static Readonly VersionSearch playground for Version
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
-
Is this feature attached
Returns boolean
Methods
addXRSession LayerSearch playground for addXRSessionLayer
-
Add a new layer to the already-existing list of layers
Parameters
-
wrappedLayer: WebXRLayerWrapper
the new layer to add to the existing ones
Returns void
-
attachSearch playground for attach
-
Attach this feature. Will usually be called by the features manager.
Returns boolean
true if successful.
create Projection LayerSearch playground for createProjectionLayer
-
Creates a new XRProjectionLayer.
Parameters
-
Optional params: XRProjectionLayerInit
an object providing configuration options for the new XRProjectionLayer.
-
Optional multiview: boolean
whether the projection layer should render with multiview.
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
-
Returns boolean
disposeSearch playground for dispose
-
Dispose this feature and all of the resources attached.
Returns void
is CompatibleSearch playground for isCompatible
-
Returns boolean
setXRSession LayersSearch playground for setXRSessionLayers
-
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
-
Exposes the WebXR Layers API.