XRViewerPose: views property
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.
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
.
Value
Examples
See XRViewerPose
for example code.
Specifications
Specification |
---|
WebXR Device API # dom-xrviewerpose-views |
Browser compatibility
BCD tables only load in the browser