Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. XRRenderState

XRRenderState

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

TheXRRenderState interface of theWebXR Device API contains configurable values which affect how the imagery generated by anXRSession gets composited. These properties include the range of distances from the viewer within which content should be rendered, the vertical field of view (for inline presentations), and a reference to theXRWebGLLayer being used as the target for rendering the scene prior to it being presented on the XR device's display or displays.

When you apply changes using theXRSession methodupdateRenderState(), the specified changes take effect after the current animation frame has completed, but before the next one begins.

Instance properties

XRRenderState.baseLayerRead onlyExperimental

TheXRWebGLLayer from which the browser's compositing system obtains the image for the XR session.

XRRenderState.depthFarRead onlyExperimental

The distance, in meters, of thefar clip plane from the viewer. The far clip plane is the plane which is parallel to the display beyond which rendering of the scene no longer takes place. This, essentially, specifies the maximum distance the user can see.

XRRenderState.depthNearRead onlyExperimental

The distance, in meters, of thenear clip plane from the viewer. The near clip plane is the plane, parallel to the display, at which rendering of the scene begins. Any closer to the viewer than this, and no portions of the scene are drawn.

XRRenderState.inlineVerticalFieldOfViewRead onlyExperimental

The default vertical field of view, defined in radians, to use when the session is ininline mode.null for all immersive sessions.

XRRenderState.layersRead onlyExperimental

An ordered array containingXRLayer objects that are displayed by the XR compositor.

Specifications

Specification
WebXR Device API
# xrrenderstate-interface

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp