API

Interface IWebXRMediaLayerCreationOptions<InitT>

Common options for creating an XRMediaBinding layer.

interface IWebXRMediaLayerCreationOptions<InitT> {
    fallbackMode?: "none" | "mesh";
    layerInit?: Partial<InitT>;
    transformNode?: TransformNode;
}

Type Parameters

  • InitT

    the media layer initialization dictionary

Index
fallbackMode?: "none" | "mesh"

Uses a Babylon mesh and VideoTexture when XRMediaBinding is unavailable. Import @babylonjs/core/XR/features/WebXRLayersFallback to enable this optional fallback. Fallback is disabled by default.

layerInit?: Partial<InitT>

Initialization values for the media layer. Babylon supplies the current reference space when omitted.

transformNode?: TransformNode

A Babylon node whose world position and rotation will be synchronized with the layer. Babylon creates and owns a node when this is omitted.