From fff12eb048d5e3461aad828d06bcc396203cd7d1 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 7 Aug 2020 14:19:44 -0700 Subject: [PATCH 1/4] Force all XRJointSpaces to exist; add iterable --- index.bs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 8dd6cda..b0cba15 100644 --- a/index.bs +++ b/index.bs @@ -204,8 +204,9 @@ XRHand {#xrhand-interface}
 interface XRHand {
+    iterable<XRJointSpace>;
     readonly attribute unsigned long length;
-    getter XRJointSpace? joint(unsigned long jointIndex);
+    getter XRJointSpace joint(unsigned long jointIndex);
 
     const unsigned long WRIST = 0;
 
@@ -242,16 +243,16 @@ interface XRHand {
 
 Every {{XRHand}} has an associated input source, which is the [=physical hand input source=] that it tracks.
 
-Each {{XRHand}} has a list of joint spaces which is a [=list=] of {{XRJointSpace}}s corresponding to each [=skeleton joint=] it supports tracking. These all will have their [=XRJointSpace/hand=] set to [=this=].
+Each {{XRHand}} has a list of joint spaces which is a [=list=] of {{XRJointSpace}}s corresponding to each [=skeleton joint=] defined in this specification. These all will have their [=XRJointSpace/hand=] set to [=this=].
 
-The [=list of joint spaces=] MUST NOT change over the course of a session, even if a [=skeleton joint=] is temporarily obscured.
+Note: If an individual device does not support a joint defined in this specification, it must emulate it instead.
 
-The length attribute MUST return a number greater than the maximum skeleton joint index supported by the {{XRHand}}.
+The [=list of joint spaces=] MUST NOT change over the course of a session.
 
-Note: It is possible for there to be gaps in skeleton joints supported; the {{XRHand/length}} attribute is necessary to make indexed getters work.
+The length attribute MUST return the number 25
 
 
-The joint(|jointIndex|) method when invoked runs the following steps: +The joint(|jointIndex|) getter when invoked runs the following steps: 1. Look for an {{XRJointSpace}} in [=this=]'s [=list of joint spaces=] with [=XRJointSpace/joint index=] corresponding to |jointIndex|. 1. Handle the result of the search as follows: From 71d7e371577d9082f1c4125401b87ebd72f6a5dd Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 7 Aug 2020 14:44:12 -0700 Subject: [PATCH 2/4] Force space poses to be all-or-nothing --- index.bs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.bs b/index.bs index b0cba15..a151871 100644 --- a/index.bs +++ b/index.bs @@ -275,6 +275,12 @@ interface XRJointSpace: XRSpace {}; The [=native origin=] of an {{XRJointSpace}} is the position and orientation of the underlying [=XRJointSpace/joint=]. +The [=native origin=] of the {{XRJointSpace}} may only be reported when [=native origins=] of all other {{XRJointSpace}}s on the same [=XRJointSpace/hand=] are being reported. When a hand is partially obscured the user agent MAY emulate the obscured joints, or it MAY report null poses for all of the joints. + +Note: This means that when fetching poses you will either get an entire hand or none of it. + +Issue: This by default precludes faithfully exposing polydactyl/oligodactyl hands, however for fingerprinting concerns it will likely need to be a separate opt-in, anyway. See Issue 11 for more details. + The [=native origin=] has its -Y direction pointing perpendicular to the skin, outwards from the palm, and -Z direction pointing along their associated bone, away from the wrist. For tip [=skeleton joints=] where there is no [=associated bone=], the -Z direction is the same as that for the associated distal joint, i.e. the direction is along that of the previous bone. For wrist [=skeleton joints=] the -Z direction SHOULD point roughly towards the center of the palm. From 0f8f1d85cf48cf587a15928f3635dcf04e123faf Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 7 Aug 2020 14:44:26 -0700 Subject: [PATCH 3/4] Fix bikeshed --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index a151871..fd581c2 100644 --- a/index.bs +++ b/index.bs @@ -131,7 +131,7 @@ Physical Hand Input Sources {#physical-hand} An {{XRInputSource}} is a physical hand input source if it tracks a physical hand. A [=physical hand input source=] supports hand tracking if it supports reporting the poses of one or more [=skeleton joint=]s defined in this specification. -[=Physical hand input sources=] MUST include the [=XRInputSource/input profile name=] of "generic-hand-select" in their {{XRInputSource/profile}}. +[=Physical hand input sources=] MUST include the [=XRInputSource/input profile name=] of "generic-hand-select" in their {{XRInputSource/profiles}}. XRInputSource {#xrinputsource-interface} ------------- From b898870dcd190e94678d71a06521d9e6f728b0e2 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 7 Aug 2020 21:41:19 -0700 Subject: [PATCH 4/4] Review fixes --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index fd581c2..7e699e6 100644 --- a/index.bs +++ b/index.bs @@ -245,7 +245,7 @@ Every {{XRHand}} has an associated input source, which is Each {{XRHand}} has a list of joint spaces which is a [=list=] of {{XRJointSpace}}s corresponding to each [=skeleton joint=] defined in this specification. These all will have their [=XRJointSpace/hand=] set to [=this=]. -Note: If an individual device does not support a joint defined in this specification, it must emulate it instead. +If an individual device does not support a joint defined in this specification, it MUST emulate it instead. The [=list of joint spaces=] MUST NOT change over the course of a session.