Firefox Tomorrow

web api interface

XRProjectionLayer

View on MDN ↗

Secure contextLimited availability

The XRProjectionLayer interface of the WebXR Device API is a layer that fills the entire view of the observer and is refreshed close to the device’s native frame rate.

XRProjectionLayer is supported by all XRSession objects (no layers feature descriptor is needed).

To create a new XRProjectionLayer, call createProjectionLayer(). To present layers to the XR device, add them to the layers render state using updateRenderState().

XRProjectionLayer objects don’t have an associated XRSpace, because they render to the full frame.

Instance properties

Inherits properties from its parent, XRCompositionLayer and EventTarget.

  • fixedFoveation Experimental
    • : A number indicating the amount of foveation used by the XR compositor for the layer. Fixed Foveated Rendering (FFR) renders the edges of the eye textures at a lower resolution than the center and reduces the GPU load.
  • ignoreDepthValues Read only Experimental
    • : A boolean indicating that the XR compositor is not making use of depth buffer values when rendering the layer.
  • textureArrayLength Read only Experimental
    • : The layer’s layer count for array textures when using texture-array as the textureType.
  • textureHeight Read only Experimental
    • : The height in pixels of the color textures of this layer.
  • textureWidth Read only Experimental
    • : The width in pixels of the color textures of this layer.

Instance methods

Inherits methods from its parents, XRCompositionLayer and EventTarget.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also