Table of Contents

Class XRRenderState

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The XRRenderState interface of the WebXR Device API contains configurable values which affect how the imagery generated by an XRSession 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 the XRWebGLLayer being used as the target for rendering the scene prior to it being presented on the XR device's display or displays.
[Value("XRRenderState")]
public class XRRenderState
Inheritance
XRRenderState
Inherited Members

Remarks

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

-RenderState
-UpdateRenderState(XRRenderStateInit)
-RequestSession(XRSessionMode, XRSessionInit)

See also on MDN

Constructors

XRRenderState()

public XRRenderState()

Properties

BaseLayer

NOTE
Experimental
The read-only baseLayer property of the
XRRenderState interface returns the XRWebGLLayer instance
that is the source of bitmap images and a description of how the image is to be rendered
in the device.
[Value("baseLayer")]
public XRWebGLLayer? BaseLayer { get; }

Property Value

XRWebGLLayer

A XRWebGLLayer object which is used as the source of the world's
contents when rendering each frame of the scene.See the examples below to see how to use UpdateRenderState(XRRenderStateInit) to set the current XRWebGLLayer used for rendering
the scene.

Remarks

This property is read-only; however, you can indirectly change its
value using UpdateRenderState(XRRenderStateInit).

See also on MDN

DepthFar

NOTE
Experimental
The depthFar read-only property of the
XRRenderState interface returns the distance in meters of the far clip
plane from the viewer.
[Value("depthFar")]
public Number DepthFar { get; }

Property Value

Number

A Number.

Remarks

DepthNear

NOTE
Experimental
The depthNear read-only property of the
XRRenderState interface returns the distance in meters of the near clip
plane from the viewer.
[Value("depthNear")]
public Number DepthNear { get; }

Property Value

Number

A Number.

Remarks

InlineVerticalFieldOfView

NOTE
Experimental
The read-only inlineVerticalFieldOfView
property of the XRRenderState interface returns the default vertical
field of view for "inline" sessions and null for all immersive
sessions.
[Value("inlineVerticalFieldOfView")]
public Number? InlineVerticalFieldOfView { get; }

Property Value

Number

A Number for "inline" sessions, which represents the default
field of view, and null for immersive sessions.

Remarks

Layers

NOTE
Experimental
The read-only layers property of the XRRenderState interface is an ordered array containing XRLayer objects that are displayed by the XR compositor.
[Value("layers")]
public XRLayer[] Layers { get; }

Property Value

XRLayer[]

An ordered array containing XRLayer objects. The order of the layers is "back-to-front".

Remarks