diff --git a/index.bs b/index.bs
index 18f0ca7..756a37d 100644
--- a/index.bs
+++ b/index.bs
@@ -32,7 +32,7 @@ spec: WebXR Device API - Level 1; urlPrefix: https://www.w3.org/TR/webxr/#
type: interface; text: XRSession; url: xrsession-interface
for: XRSession;
type: dfn; text: ended; url: ended
- type: dfn; text: list of enabled features; url: xrsession-list-of-enabled-features
+ type: dfn; text: set of granted features; url: xrsession-set-of-granted-features
type: dfn; text: list of frame updates; url: xrsession-list-of-frame-updates
type: dfn; text: XR device; url: xrsession-xr-device
type: interface; text: XRFrame; url: xrframe-interface
@@ -47,7 +47,7 @@ spec: WebXR Device API - Level 1; urlPrefix: https://www.w3.org/TR/webxr/#
type: callback; text: XRFrameRequestCallback; url: callbackdef-xrframerequestcallback
type: dfn; text: capable of supporting; url: capable-of-supporting
type: dfn; text: feature descriptor; url: feature-descriptor
- type: dfn; text: feature policy; url: feature-policy
+ type: dfn; text: permissions policy; url: permissions-policy
type: dfn; text: identity transform; url: identity-transform
type: dfn; text: inline XR device; url: inline-xr-device
type: dfn; text: list of active XR input sources; url: list-of-active-xr-input-sources
@@ -141,7 +141,7 @@ In order for the applications to signal their interest in performing hit testing
A device is [=capable of supporting=] the hit test feature if the device exposes a [=native hit test=] capability. The [=inline XR device=] MUST NOT be treated as [=capable of supporting=] the hit test feature.
-The hit test feature is subject to [=feature policy=] and requires "xr-spatial-tracking"
policy to be allowed on the requesting document's origin.
+The hit test feature is subject to [=permissions policy=] and requires "xr-spatial-tracking"
policy to be allowed on the requesting document's origin.
Hit test options {#hit-test-options}
================
@@ -428,7 +428,7 @@ The application can request hit test using {{XRSession}}'s {{XRSessio
The requestHitTestSource(|options|) method, when invoked on an {{XRSession}} |session|, MUST run the following steps:
1. Let |promise| be [=a new Promise=].
- 1. If [=hit-test=] feature descriptor is not [=list/contain|contained=] in the |session|'s [=XRSession/list of enabled features=], [=/reject=] |promise| with {{NotSupportedError}} and abort these steps.
+ 1. If [=hit-test=] feature descriptor is not [=list/contain|contained=] in the |session|'s [=XRSession/set of granted features=], [=/reject=] |promise| with {{NotSupportedError}} and abort these steps.
1. If |session|’s [=XRSession/ended=] value is true
, throw an {{InvalidStateError}} and abort these steps.
1. The user agent MAY [=/reject=] |promise| with {{NotAllowedError}} and abort these steps if there is a [=unreasonable number of requests=].
1. Add [=compute all hit test results=] algorithm to |session|'s [=XRSession/list of frame updates=] if it is not already present there.
@@ -444,7 +444,7 @@ The requestHitTestSource(|options|) method, wh
The requestHitTestSourceForTransientInput(|options|) method, when invoked on an {{XRSession}} |session|, MUST run the following steps:
1. Let |promise| be [=a new Promise=].
- 1. If [=hit-test=] feature descriptor is not [=list/contain|contained=] in the |session|'s [=XRSession/list of enabled features=], [=/reject=] |promise| with {{NotSupportedError}} and abort these steps.
+ 1. If [=hit-test=] feature descriptor is not [=list/contain|contained=] in the |session|'s [=XRSession/set of granted features=], [=/reject=] |promise| with {{NotSupportedError}} and abort these steps.
1. If |session|’s [=XRSession/ended=] value is true
, throw an {{InvalidStateError}} and abort these steps.
1. The user agent MAY [=/reject=] |promise| with {{NotAllowedError}} and abort these steps if there is a [=unreasonable number of requests=].
1. Add [=compute all hit test results=] algorithm to |session|'s [=XRSession/list of frame updates=] if it is not already present there.
@@ -698,9 +698,23 @@ Native hit test result {#native-hit-test-result-section}
Native hit test results returned from XR device should contain the position of the intersection point with user's environment. Depending on the native entity type and the information available to the XR device, the result should also contain orientation defined in such a way to allow the user agent to compute a surface normal to the user's environment at the intersection point.
-The information about position and orientation of the intersection point should be contained in [=native hit test result=]'s native origin. Native origin defines a new coordinate system in such a way that its Y axis represents the surface's normal vector at the intersection point. If the orientation is not returned from the XR device, the user agent SHOULD set the native origin in such a way that Y axis of the coordinate system it defines is pointing up (towards negative gravity vector).
+The information about position and orientation of the intersection point should be contained in [=native hit test result=]'s native origin. Native origin defines a new coordinate system in such a way that its Y axis represents the surface's normal vector at the intersection point. If the orientation is not returned from the XR device, the user agent SHOULD set the native origin in such a way that Y axis of the coordinate system it defines is set to the normalized, negated gravity vector. Additionally, if possible, the Z axis of the returned native origin should be set so that it points towards the origin of the ray used to perform the native hit test (i.e. the ray's origin lies on the YZ plane). The exact steps to obtain the native origin are described in [=calculate the native origin=] algorithm.
-Issue: Decide if we need to specify other axes of the coordinate system defined by hit test result's native origin to maintain compatibility between different implementations & differrent AR frameworks.
+
{ x: 0.0, y: 1.0, z: 00, w: 0.0 }
.
+ 1. If |Z| and |normal| are parallel, set |Z| to { x: 1.0, y: 0.0, z: 0.0, w: 0.0 }
.
+ 1. Let |X| be a directonal vector resutling from normalizing |normal| x |Z|.
+ 1. Let |rotation| be a rotation that maps |X| to directional vector { x: 1.0, y: 0.0, z: 0.0, w: 0.0 }
, |normal| to directional vector { x: 0.0, y: 1.0, z: 0.0, w: 0.0 }
, and |Z| to directonal vector { x: 0.0, y: 0.0, z: 1.0, w: 0.0 }
.
+ 1. The resulting native origin expressed relative to |coordinates| thus is a rigid transform consisting of |p| and |rotation| as its position and orientation.
+coordinates
defined by that space.
Privacy & Security Considerations {#privacy-security}
=================================