You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -389,6 +389,8 @@ enum XREnvironmentBlendMode {
389
389
390
390
Each {{XRSession}} has a <dfn for="XRSession">mode</dfn>, which is one of the values of {{XRSessionMode}}.
391
391
392
+
The {{XRSession/viewerSpace}} on an {{XRSession}} has a <dfn for="XRSession/viewerSpace">list of views</dfn>, which is a [=/list=] of [=view=]s corresponding to the views provided by the underlying device.
To <dfn>initialize the session</dfn>, given |session| and |mode|, the user agent MUST run the following steps:
@@ -687,6 +689,16 @@ When the <dfn method for="XRFrame">getViewerPose(|referenceSpace|)</dfn> method
687
689
1. If |frame|'s [=animationFrame=] boolean is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
688
690
1. Let |pose| be a new {{XRViewerPose}} object.
689
691
1. [=Populate the pose=] of |session|'s {{XRSession/viewerSpace}} in |referenceSpace| at the time represented by |frame| into |pose|.
692
+
1. If |pose| is <code>null</code> return <code>null</code>.
693
+
1. Let |xrviews| be an empty [=/list=].
694
+
1. For each [=view=] |view| in the [=XRSession/viewerSpace/list of views=] on the {{XRSession/viewerSpace}} of {{XRFrame/session}}, perform the following steps:
695
+
1. Let |xrview| be a new {{XRView}} object.
696
+
1. Initialize |xrview|'s {{XRView/eye}} to the appropriate eye the |view| is expected to render to. For views that have no such associated eye, this defaults to {{XREye/left}}.
697
+
1. Initialize |xrview|'s {{XRView/projectionMatrix}} to a [=matrix=] describing the projection to be used when rendering the [=view=], provided by the underlying XR system.
698
+
1. Let |offset| be an {{XRRigidTransform}} equal to the [=view offset=] of |view|
699
+
1. Set |xrview|'s {{XRView/transform}} property to the result of [=multiply transforms|multiplying=] the |offset| transform by the {{XRViewerPose}}'s {{XRPose/transform}}
700
+
1. [=list/Append=] |xrview| to |xrviews|
701
+
1. Set |pose|'ss {{XRViewerPose/views}} to |xrviews|
690
702
1. Return |pose|.
691
703
692
704
</div>
@@ -877,7 +889,11 @@ Views {#views}
877
889
XRView {#xrview-interface}
878
890
------
879
891
880
-
An {{XRView}} describes a single <dfn>view</dfn> into an XR scene. Each [=view=] corresponds to a display or portion of a display used by an XR device to present imagery to the user. They are used to retrieve all the information necessary to render content that is well aligned to the [=view=]'s physical output properties, including the field of view, eye offset, and other optical properties. [=Views=] may cover overlapping regions of the user's vision. No guarantee is made about the number of [=views=] any XR device uses or their order, nor is the number of [=views=] required to be constant for the duration of an {{XRSession}}.
892
+
An {{XRView}} describes a single <dfn>view</dfn> into an XR scene for a given frame.
893
+
894
+
Each [=view=] corresponds to a display or portion of a display used by an XR device to present imagery to the user. They are used to retrieve all the information necessary to render content that is well aligned to the [=view=]'s physical output properties, including the field of view, eye offset, and other optical properties. [=Views=] may cover overlapping regions of the user's vision. No guarantee is made about the number of [=views=] any XR device uses or their order, nor is the number of [=views=] required to be constant for the duration of an {{XRSession}}.
895
+
896
+
A [=view=] has an associated internal <dfn>view offset</dfn>, which is an {{XRRigidTransform}} describing the position and orientation of the [=view=] in the {{XRSession/viewerSpace}}'s [=coordinate system=].
881
897
882
898
NOTE: Many HMDs will request that content render two [=views=], one for the left eye and one for the right, while most magic window devices will only request one [=view=], but applications should never assume a specific view configuration. For example: A magic window device may request two views if it is capable of stereo output, but may revert to requesting a single view for performance reasons if the stereo output mode is turned off. Similarly, HMDs may request more than two views to facilitate a wide field of view or displays of different pixel density.
0 commit comments