Class WebXRSpatialLayerWrapper<LayerT, LayerTypeT>
Type Parameters
- LayerT extends WebXRSpatialLayer = WebXRSpatialLayer
the concrete positionable WebXR layer type
- LayerTypeT extends WebXRSpatialLayerType = WebXRSpatialLayerType
Hierarchy (View Summary)
- WebXRCompositionLayerWrapper<LayerT, LayerTypeT>
- WebXRSpatialLayerWrapper
Constructors
constructor
-
new WebXRSpatialLayerWrapper<
LayerT extends any = any,
LayerTypeT extends WebXRSpatialLayerType = WebXRSpatialLayerType,
>(
getWidth: () => number,
getHeight: () => number,
layer: LayerT,
layerType: LayerTypeT,
isMultiview: boolean,
isStatic: boolean,
usesSessionReferenceSpace: boolean,
createRTTProvider: (
xrSessionManager: WebXRSessionManager,
) => WebXRLayerRenderTargetTextureProvider<LayerTypeT>,
transformNode: TransformNode,
_ownsTransformNode: boolean,
): WebXRSpatialLayerWrapper<LayerT, LayerTypeT>Type Parameters
- LayerT extends any = any
the concrete positionable WebXR layer type
- LayerTypeT extends WebXRSpatialLayerType = WebXRSpatialLayerType
Parameters
- getWidth: () => number
- getHeight: () => number
- layer: LayerT
- layerType: LayerTypeT
- isMultiview: boolean
- isStatic: boolean
- usesSessionReferenceSpace: boolean
Whether the layer should follow changes to the session manager's reference space.
- createRTTProvider: (
xrSessionManager: WebXRSessionManager,
) => WebXRLayerRenderTargetTextureProvider<LayerTypeT> - transformNode: TransformNode
The Babylon node whose world position and rotation are applied to the native layer.
- _ownsTransformNode: boolean
Returns WebXRSpatialLayerWrapper<LayerT, LayerTypeT>
- LayerT extends any = any
Properties
_ original Internal Texture
create RTT Provider
xrSessionManager: WebXRSessionManager,
) => WebXRLayerRenderTargetTextureProvider<LayerTypeT>
get Height
get Width
Readonlyis Media Layer
Whether this layer receives its content directly from an HTML media element.
Readonlyis Multiview
Whether the layer renders both views into a texture array.
Readonlyis Static
Whether the layer can only be rendered when its native needsRedraw flag is set.
Readonlylayer
Readonlylayer Type
Readonlytransform Node
The Babylon node whose world position and rotation are applied to the native layer.
Readonlyuses Render Target Provider
Whether Babylon should acquire subimages and expose render target textures for this layer.
Readonlyuses Session Reference Space
Whether the layer should follow changes to the session manager's reference space.
Accessors
force Mono Presentation
-
get forceMonoPresentation(): boolean
-
set forceMonoPresentation(value: boolean): void
Sets whether the compositor presents the left-eye layer configuration to both eyes. Applications should continue rendering both eyes when this is enabled.
Parameters
- value: boolean
Whether to force mono presentation.
Returns void
- value: boolean
is Force Mono Presentation Supported
-
get isForceMonoPresentationSupported(): boolean
Whether the native layer exposes mono-presentation control.
Returns boolean
is Opacity Supported
-
get isOpacitySupported(): boolean
Whether the native layer exposes compositor opacity control.
Returns boolean
is Quality Supported
-
get isQualitySupported(): boolean
Whether the native layer exposes compositor quality hints.
Returns boolean
opacity
-
get opacity(): number
-
set opacity(value: number): void
quality
-
get quality(): XRLayerQuality
-
set quality(value: XRLayerQuality): void
Methods
dispose
-
Disposes the native layer wrapper and its Babylon transform node when the node was created by Babylon.
Returns void
update From Transform Node
-
Synchronizes the native layer with the current world transform of the Babylon node.
Parameters
- useRightHandedSystem: boolean
whether the Babylon scene uses right-handed coordinates
- worldScalingFactor: number
the number of Babylon scene units represented by one meter
Returns void
- useRightHandedSystem: boolean
Wraps a positionable XR composition layer and synchronizes it with a Babylon transform node. The node's scaling does not affect the physical dimensions of the layer.