Class WebXRCubeLayerWrapper
Hierarchy (View Summary)
- WebXRSpatialLayerWrapper<XRCubeLayer, "XRCubeLayer">
- WebXRCubeLayerWrapper
Constructors
constructor
-
new WebXRCubeLayerWrapper(
getWidth: () => number,
getHeight: () => number,
layer: XRCubeLayer,
isStatic: boolean,
usesSessionReferenceSpace: boolean,
_binding: any,
transformNode: TransformNode,
ownsTransformNode: boolean,
): WebXRCubeLayerWrapperParameters
- getWidth: () => number
- getHeight: () => number
- layer: XRCubeLayer
- isStatic: boolean
- usesSessionReferenceSpace: boolean
- _binding: any
- transformNode: TransformNode
- ownsTransformNode: boolean
Returns WebXRCubeLayerWrapper
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
Cube layers are populated through raw cubemap or array-layer access.
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
get Sub Image
-
Gets the compositor-owned cube subimage for the current frame. WebGL callers must populate all six cubemap faces. WebGPU callers must render to six consecutive array layers beginning at the descriptor's base array layer.
Parameters
- frame: XRFrame
the current XR frame
Optionaleye: anythe eye to retrieve for stereo cube layers
Returns any
the raw WebGL or WebGPU cube subimage
- frame: XRFrame
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 native cube layer and exposes its raw subimage. Cube layers require six face uploads or render passes and therefore do not use Babylon's 2D composition-layer render target provider.