Skip to content

Commit

Permalink
Merge pull request #1352 from AdaRoseCannon/visibleInputs
Browse files Browse the repository at this point in the history
First draft for adding a property to XRInputSource to say it's visible elsewhere
  • Loading branch information
cabanier authored Apr 16, 2024
2 parents 7d851ba + db2ad46 commit 3dec73d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,7 @@ interface XRInputSource {
[SameObject] readonly attribute XRSpace targetRaySpace;
[SameObject] readonly attribute XRSpace? gripSpace;
[SameObject] readonly attribute FrozenArray<DOMString> profiles;
[SameObject] readonly attribute boolean skipRendering;
};
</pre>

Expand All @@ -1864,6 +1865,14 @@ For input sources with a {{targetRayMode}} of {{XRTargetRayMode/"transient-point

The <dfn attribute for="XRInputSource">gripSpace</dfn> attribute is an {{XRSpace}} that has a [=native origin=] tracking to the pose that should be used to render virtual objects such that they appear to be held in the user's hand. If the user were to hold a straight rod, this {{XRSpace}} places the [=native origin=] at the centroid of their curled fingers and where the `-Z` axis points along the length of the rod towards their thumb. The `X` axis is perpendicular to the back of the hand being described, with the back of the user's right hand pointing towards `+X` and the back of the user's left hand pointing towards `-X`. The `Y` axis is implied by the relationship between the `X` and `Z` axis, with `+Y` roughly pointing in the direction of the user's arm.

The <dfn attribute for="XRInputSource">skipRendering</dfn> attribute indicates that this input is visible and MAY NOT need to be rendered by the current session. If {{XRInputSource/skipRendering}} is true and the targetRayMode is "tracked-pointer", the user agent MUST ensure that a representation of the [=XR input source=] is always shown to the user.

<p class="note">
Examples of the controller being shown to the user include the controller is in between the display and the user, the display is transparent or the controller is rendered by the operating system.

{{XRInputSource/skipRendering}} is a hint to developers about not rendering input sources such as controllers. Pick rays and cursor should still be rendered.
</p>

For input sources with a {{targetRayMode}} of {{XRTargetRayMode/"transient-pointer"}} the {{gripSpace}} should be the associated user gesture if there is one, otherwise it should be another space the user controls such as the ViewerSpace or the gripSpace or the targetRaySpace of another XRInput. This is to allow user the user to still manipulate the targetRaySpace.

The {{gripSpace}} MUST be `null` if the input source isn't inherently trackable such as for input sources with a {{targetRayMode}} of {{XRTargetRayMode/"gaze"}} or {{XRTargetRayMode/"screen"}}.
Expand Down

0 comments on commit 3dec73d

Please sign in to comment.