Skip to content

Commit cfe0fdb

Browse files
committed
Add reference space concept
1 parent 0958c15 commit cfe0fdb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.bs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,7 @@ When this method is invoked, the user agent MUST run the following steps:
12441244
1. Initialize |xrview|'s {{XRView/eye}} to |view|'s [=view/eye=].
12451245
1. Initialize |xrview|'s [=XRView/frame=] to |frame|.
12461246
1. Initialize |xrview|'s [=XRView/session=] to |session|.
1247+
1. Initialize |xrview|'s [=view/reference space=] to |referenceSpace|.
12471248
1. Let |offset| be an [=new=] {{XRRigidTransform}} object equal to the [=view offset=] of |view| in the [=relevant realm=] of |session|.
12481249
1. Set |xrview|'s {{XRViewCalibration/transform}} property to the result of [=multiply transforms|multiplying=] the {{XRViewerPose}}'s {{XRPose/transform}} by the |offset| transform in the relevant realm of |session|
12491250
1. [=list/Append=] |xrview| to |xrviews|
@@ -1558,6 +1559,8 @@ A [=view=] has an internal <dfn for="view">requested viewport scale</dfn> value
15581559

15591560
A [=view=] has an internal <dfn for="view">current viewport scale</dfn> value that represents the current viewport scale for this view as used internally by the system. It is initially set to 1.0. It is updated to match the [=view/requested viewport scale=] when the viewport change is successfully applied by a {{XRWebGLLayer/getViewport()}} call.
15601561

1562+
A [=view=] has an <dfn for="view">reference space</dfn>, which is the {{XRReferenceSpace}} space used to obtain this [=view=] in {{XRFrame/getViewerPose()}}
1563+
15611564
Note: Dynamic viewport scaling allows applications to render to a subset of the full-sized viewport using a scale factor that can be changed every animation frame. This is intended to be efficiently modifiable on a per-frame basis without reallocation. For correct rendering, it's essential that the XR system and application agree on the active viewport. An application can call {{XRView/requestViewportScale()}} for an {{XRView}} multiple times within a single animation frame, but the requested scale does not take effect until the application calls {{XRWebGLLayer/getViewport()}} for that view. The first `getViewport` call in an animation frame applies the change (taking effect immediately for the current animation frame), locks in the view's current scaled viewport for the remainder of this animation frame, and sets the scale as the new default for future animation frames. Optionally, the system can provide a suggested value through the {{XRView/recommendedViewportScale}} attribute based on internal performance heuristics and target framerates.
15621565

15631566
<pre class="idl">
@@ -1577,7 +1580,7 @@ enum XREye {
15771580
XRView includes XRViewCalibration;
15781581
</pre>
15791582

1580-
The {{XRViewCalibration/transform}} is given in the {{XRReferenceSpace}} provided in {{XRFrame/getViewerPose()}}.
1583+
The {{XRViewCalibration/transform}} is given in it's [=view/reference space=].
15811584

15821585
The <dfn attribute for="XRView">eye</dfn> attribute describes the [=view/eye=] of the underlying [=view=]. This attribute's primary purpose is to ensure that pre-rendered stereo content can present the correct portion of the content to the correct eye.
15831586

0 commit comments

Comments
 (0)