Table of Contents

Class XRViewerPose

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The WebXR Device API interface XRViewerPose represents the pose (the position and orientation) of a viewer's point of view on the scene. Each XRViewerPose can have multiple views to represent, for example, the slight separation between the left and right eye.

[Value("XRViewerPose")]
public class XRViewerPose : XRPose
Inheritance
XRViewerPose
Inherited Members

Remarks

This view can represent anything from the point-of-view of a user's XR headset to the viewpoint represented by a player's movement of an avatar using mouse and keyboard, presented on the screen, to a virtual camera capturing the scene for a spectator.

-WebXR Device API
-Movement, orientation, and motion
-XRPose and XRView

See also on MDN

Constructors

XRViewerPose()

public XRViewerPose()

Properties

Views

The read-only XRViewerPose property views
returns an array which contains every XRView which must be rendered in
order to fully represent the scene from the viewpoint defined by the viewer pose. For
monoscopic devices, this array contains a single view.

[Value("views")]
public XRView[] Views { get; }

Property Value

XRView[]

An array of XRView objects, one for each view available as part of the
scene for the current viewer pose. This array's length may potentially vary over the
lifetime of the XRSession (for example, if the viewer enables or disables
stereo mode on their XR output device).

Remarks

WARNING

There is no guarantee that the number of views will
remain constant over the lifetime of an XRSession. For each frame, you
should always use the current length of this array rather than caching the value.

Stereo views require two views to render properly, with the left eye's view having its
Eye set to the string left and the right eye's
view a value of right.

-WebXR Device API
-Movement, orientation, and motion

See also on MDN