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
+30-28Lines changed: 30 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -713,9 +713,11 @@ When this method is invoked, the user agent MUST run the following steps:
713
713
714
714
1. Let |promise| be [=a new Promise=] in the [=relevant realm=] of this {{XRSession}}.
715
715
1. Run the following steps [=in parallel=]:
716
-
1. [=Create a reference space=], |referenceSpace|, with the {{XRReferenceSpaceType}} |type|.
717
-
1. If |referenceSpace| is <code>null</code>, [=queue a task=] to [=reject=] |promise| with a {{NotSupportedError}} and abort these steps.
718
-
1. [=Queue a task=] to [=/resolve=] |promise| with |referenceSpace|.
716
+
1. If the result of running [=reference space is supported=] for |type| and |session| is <code>false</code>, [=queue a task=] to [=reject=] |promise| with a {{NotSupportedError}} and abort these steps.
717
+
1. Set up any platform resources required to track reference spaces of type |type|.
718
+
1. [=Queue a task=] to run the following steps:
719
+
1. [=Create a reference space=], |referenceSpace|, with |type| and |session|.
720
+
1. [=/Resolve=] |promise| with |referenceSpace|.
719
721
1. Return |promise|.
720
722
721
723
</div>
@@ -760,6 +762,8 @@ When any previously added <dfn for="XRSession" lt="remove input source">[=XR inp
760
762
1. [=list/Remove=] each {{XRInputSource}} in |removed| from |session|'s [=list of active XR input sources=].
761
763
1. Fire an {{XRInputSourcesChangeEvent}} named {{inputsourceschange!!event}} on |session| with {{XRInputSourcesChangeEvent/removed}} set to |removed|.
762
764
765
+
Note: The user agent MAY fire this event when an input source temporarily loses both position and orientation tracking. It is recommended that this only be done for physical handheld controller input sources. It is not recommended that this event be fired when this happens for tracked hand input sources, because this will happen often, nor is it recommended when this happens for tracker object input sources, since this makes it harder for the application to maintain a notion of identity.
@@ -1032,7 +1036,7 @@ When this method is invoked, the user agent MUST run the following steps:
1032
1036
1. Let |session| be |frame|'s {{XRFrame/session}} object.
1033
1037
1. If |frame|'s [=animationFrame=] boolean is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
1034
1038
1. Let |pose| be a [=new=]{{XRViewerPose}} object in the [=relevant realm=] of |session|.
1035
-
1. [=Populate the pose=] of |session|'s [=XRSession/viewer reference space=] in |referenceSpace| at the time represented by |frame| into |pose|.
1039
+
1. [=Populate the pose=] of |session|'s [=XRSession/viewer reference space=] in |referenceSpace| at the time represented by |frame| into |pose|, with <code>force emulation</code> set to <code>true</code>.
1036
1040
1. If |pose| is <code>null</code> return <code>null</code>.
1037
1041
1. Let |xrviews| be an empty [=/list=].
1038
1042
1. For each [=view=] |view| in the [=XRSession/viewer reference space/list of views=] on the[=XRSession/viewer reference space=] of {{XRFrame/session}}, perform the following steps:
@@ -1100,7 +1104,7 @@ The [=effective origin=] of an {{XRSpace}} can only be observed in the coordinat
To <dfn>populate the pose</dfn> of an {{XRSpace}} |space| in an {{XRSpace}} |baseSpace| at the time represented by an {{XRFrame}} |frame| into an {{XRPose}} |pose|, the user agent MUST run the following steps:
1107
+
To <dfn>populate the pose</dfn> of an {{XRSpace}} |space| in an {{XRSpace}} |baseSpace| at the time represented by an {{XRFrame}} |frame| into an {{XRPose}} |pose|, with an optional |force emulation| flag, the user agent MUST run the following steps:
1104
1108
1105
1109
1. If |frame|'s [=active=] boolean is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
1106
1110
1. Let |session| be |frame|'s {{XRFrame/session}} object.
@@ -1121,12 +1125,12 @@ To <dfn>populate the pose</dfn> of an {{XRSpace}} |space| in an {{XRSpace}} |bas
1121
1125
<dd> Set |transform|'s {{XRRigidTransform/position}} to the tracking system's best estimate of the position of |space|'s [=effective origin=] in |baseSpace|'s [=coordinate system=]. This MAY include a computed offset such as a neck or arm model. If a position estimate is not available, the last known position MUST be used.
1122
1126
<dd> Set |pose|'s {{XRPose/emulatedPosition}} to <code>true</code>.
1123
1127
1124
-
<dt> Else if |space|'s pose relative to |baseSpace| has been determined in the past:
1128
+
<dt> Else if |space|'s pose relative to |baseSpace| has been determined in the past and |force emulation| is <code>true</code>:
1125
1129
<dd> Set |transform|'s {{XRRigidTransform/position}} to the last known position of |space|'s [=effective origin=] in |baseSpace|'s [=coordinate system=].
1126
1130
<dd> Set |transform|'s {{XRRigidTransform/orientation}} to the last known orientation of |space|'s [=effective origin=] in |baseSpace|'s [=coordinate system=].
1127
1131
<dd> Set |pose|'s {{XRPose/emulatedPosition}} boolean to <code>true</code>.
1128
1132
1129
-
<dt>Else if |space|'s pose relative to |baseSpace| has never been determined:
1133
+
<dt>Otherwise:
1130
1134
<dd> Set |pose| to <code>null</code>.
1131
1135
</dl>
1132
1136
@@ -1180,22 +1184,18 @@ The <dfn attribute for="XRReferenceSpace">onreset</dfn> attribute is an [=Event
When an {{XRReferenceSpace}} is requested, the user agent MUST <dfn>create a reference space</dfn> by running the following steps:
1187
+
When an {{XRReferenceSpace}} is requested with {{XRReferenceSpaceType}} |type| for {{XRSession}} |session|, the user agent MUST <dfn>create a reference space</dfn> by running the following steps:
1184
1188
1185
-
1. Let |session| be the {{XRSession}} object that requested creation of a reference space.
1186
-
1. Let |type| be set to the {{XRReferenceSpaceType}} passed to {{requestReferenceSpace()}}.
1187
-
1. If the [=reference space is supported=] for |type| and |session|, run the following steps:
1188
-
1. Initialize |referenceSpace| as follows:
1189
-
<dl class="switch">
1190
-
<dt> If |type| is {{bounded-floor}}
1191
-
<dd> Let |referenceSpace| be a [=new=]{{XRBoundedReferenceSpace}} in the [=relevant realm=] of |session|.
1192
-
<dt> Otherwise
1193
-
<dd> Let |referenceSpace| be a [=new=]{{XRReferenceSpace}} in the [=relevant realm=] of |session|.
1194
-
</dl>
1195
-
1. Initialize |referenceSpace|'s [=XRReferenceSpace/type=] to |type|.
1196
-
1. Initialize |referenceSpace|'s [=XRSpace/session=] to |session|.
1197
-
1. Return |referenceSpace|
1198
-
1. Return <code>null</code>.
1189
+
1. Initialize |referenceSpace| as follows:
1190
+
<dl class="switch">
1191
+
<dt> If |type| is {{bounded-floor}}
1192
+
<dd> Let |referenceSpace| be a [=new=]{{XRBoundedReferenceSpace}} in the [=relevant realm=] of |session|.
1193
+
<dt> Otherwise
1194
+
<dd> Let |referenceSpace| be a [=new=]{{XRReferenceSpace}} in the [=relevant realm=] of |session|.
1195
+
</dl>
1196
+
1. Initialize |referenceSpace|'s [=XRReferenceSpace/type=] to |type|.
1197
+
1. Initialize |referenceSpace|'s [=XRSpace/session=] to |session|.
1198
+
1. Return |referenceSpace|.
1199
1199
1200
1200
</div>
1201
1201
@@ -2300,8 +2300,7 @@ When based on sensor data, {{XRPose}} and {{XRViewerPose}} will expose [=sensiti
2300
2300
2301
2301
To determine if <dfn>poses may be reported</dfn> to an {{XRSession}} |session|, the user agent MUST run the following steps:
2302
2302
2303
-
1. Let |document| be |session|'s [=relevant global object=]'s [=associated document=].
2304
-
1. If |document| is [=hidden=] return <code>false</code>.
2303
+
1. If |session|'s [=relevant global object=] is not the [=current global object=], return <code>false</code>.
2305
2304
1. If |session|'s {{XRSession/visibilityState}} in not {{XRVisibilityState/"visible"}}, return <code>false</code>.
2306
2305
1. Determine if the pose data can be returned as follows:
2307
2306
<dl class="switch">
@@ -2315,12 +2314,11 @@ To determine if <dfn>poses may be reported</dfn> to an {{XRSession}} |session|,
2315
2314
<dd> Return <code>false</code>.
2316
2315
</dl>
2317
2316
2318
-
</div>
2319
-
2320
-
Note: The requirement for document visibility is based on [[DEVICE-ORIENTATION]].
2321
2317
2322
2318
Note: The method by which a user agent determines that poses do not expose fingerprintable data is left to the user agent's discretion.
2323
2319
2320
+
</div>
2321
+
2324
2322
The primary difference between {{XRViewerPose}} and {{XRPose}} is the inclusion of {{XRView}} information. When more than one view is present and the physical relationship between these views is configurable by the user, the relationship between these views is considered [=sensitive information=] as it can be used to fingerprint or profile the user.
2325
2323
2326
2324
If the relationship between {{XRView}}s could uniquely identify the [=/XR device=], then the user agent MUST anonymize the {{XRView}} data to prevent fingerprinting. The method of anonymization is at the discretion of the user agent.
@@ -2350,10 +2348,14 @@ To determine if <dfn>poses must be limited</dfn> between two spaces, |space| and
2350
2348
2351
2349
1. If either |space| or |baseSpace| are an {{XRBoundedReferenceSpace}} and the other space's [=native origin=]'s falls further outside the [=native bounds geometry=] than a reasonable distance determined by the user agent, return true.
2352
2350
1. If either |space| or |baseSpace| are an {{XRReferenceSpace}} with a [=XRReferenceSpace/type=] of {{XRReferenceSpaceType/"local"}} or {{XRReferenceSpaceType/"local-floor"}} and the distance between the spaces' [=native origin=]'s is greater than a reasonable distance determined by the user agent, return <code>true</code>.
2353
-
1. Return false.
2351
+
1. Let |document| be |space|'s [=relevant global object=]'s [=associated document=].
2352
+
1. If |document| is [=hidden=] return <code>true</code>.
2353
+
1. Return <code>false</code>.
2354
2354
2355
2355
</div>
2356
2356
2357
+
Note: The requirement for document visibility is based on [[DEVICE-ORIENTATION]].
2358
+
2357
2359
Note: Is is suggested that poses reported relative to a {{XRReferenceSpaceType/"local"}} or {{XRReferenceSpaceType/"local-floor"}} reference space be [=limiting|limited=] to a distance of 15 meters from the {{XRReferenceSpace}}'s [=native origin=].
2358
2360
2359
2361
Note: Is is suggested that poses reported relative to a {{XRBoundedReferenceSpace}} be [=limiting|limited=] to a distance of 1 meter outside the {{XRBoundedReferenceSpace}}'s [=native bounds geometry=].
0 commit comments