Interface IWebXRCompositionLayerCreationOptions<TWebGLInit, TWebGPUInit>
fallbackMode?: "none" | "mesh";
fallbackTexture?: BaseTexture;
gpuLayerInit?: Partial<TWebGPUInit>;
layerInit?: Partial<TWebGLInit>;
transformNode?: TransformNode;
}
Type Parameters
- TWebGLInit
the WebGL layer initialization dictionary
- TWebGPUInit
the WebGPU layer initialization dictionary
Index
Properties
Optionalfallback Mode
Uses a Babylon mesh when the requested native layer factory is unavailable.
Import @babylonjs/core/XR/features/WebXRLayersFallback to enable this optional fallback.
Fallback is disabled by default.
Optionalfallback Texture
A texture to display on the fallback mesh.
Required when fallbackMode is "mesh".
Optionalgpu Layer Init
WebGPU-specific initialization overrides.
Shared spatial and layout values are copied from layerInit before these overrides are applied.
Optionallayer Init
Initialization values shared with the WebGL Layers API. Babylon supplies the current reference space and projection-layer pixel dimensions when omitted.
Optionaltransform Node
A Babylon node whose world position and rotation will be synchronized with the layer. Babylon creates and owns a node when this is omitted.
Common options for creating a graphics-backed WebXR composition layer.