Class WebXRMediaLayerWrapper<LayerT, LayerTypeT>
Type Parameters
- LayerT extends Exclude<WebXRSpatialLayer, XRCubeLayer> = Exclude<WebXRSpatialLayer, XRCubeLayer>
the concrete media layer type
- LayerTypeT extends Exclude<WebXRSpatialLayerType, "XRCubeLayer"> = Exclude<WebXRSpatialLayerType, "XRCubeLayer">
Hierarchy (View Summary)
- WebXRSpatialLayerWrapper<LayerT, LayerTypeT>
- WebXRMediaLayerWrapper
Constructors
constructor
-
new WebXRMediaLayerWrapper<
LayerT extends any = any,
LayerTypeT extends any = any,
>(
getWidth: () => number,
getHeight: () => number,
layer: LayerT,
layerType: LayerTypeT,
transformNode: TransformNode,
ownsTransformNode: boolean,
usesSessionReferenceSpace: boolean,
): WebXRMediaLayerWrapper<LayerT, LayerTypeT>Creates a wrapper for a media-backed spatial layer.
Type Parameters
- LayerT extends any = any
the concrete media layer type
- LayerTypeT extends any = any
Parameters
- getWidth: () => number
returns the current video width
- getHeight: () => number
returns the current video height
- layer: LayerT
the native media composition layer
- layerType: LayerTypeT
the concrete spatial layer type
- transformNode: TransformNode
the Babylon transform synchronized with the native layer
- ownsTransformNode: boolean
whether the wrapper should dispose the transform node
- usesSessionReferenceSpace: boolean
whether the layer should follow session reference-space changes
Returns WebXRMediaLayerWrapper<LayerT, LayerTypeT>
- LayerT extends any = any
Properties
_ original Internal Texture
create RTT Provider
xrSessionManager: WebXRSessionManager,
) => WebXRLayerRenderTargetTextureProvider<LayerTypeT>
get Height
get Width
Readonlyis Media Layer
Media layers receive their contents directly from the user agent.
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
Media layers are populated directly by the user agent.
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 an XRMediaBinding layer.