Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial attempt at a comfortSpace #1349

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ enum XRVisibilityState {
[SameObject] readonly attribute XRInputSourceArray inputSources;
readonly attribute FrozenArray<DOMString> enabledFeatures;
readonly attribute boolean isSystemKeyboardSupported;
readonly attribute XRSpace? comfortSpace;

// Methods
undefined updateRenderState(optional XRRenderStateInit state = {});
Expand Down Expand Up @@ -660,6 +661,8 @@ The <dfn attribute for="XRSession">enabledFeatures</dfn> attribute returns the f

The <dfn attribute for="XRSession">isSystemKeyboardSupported</dfn> attribute indicates that the {{XRSystem}} has the ability to display the system keyboard while the {{XRSession}} is active. If {{XRSession/isSystemKeyboardSupported}} is <code>true</code>, Web APIs that would trigger the overlay keyboard (such as [=focus=]) will show the system keyboard. The {{XRSession}} MUST set the [=visibility state=] of the {{XRSession}} to {{XRVisibilityState/"visible-blurred"}} while the keyboard is shown.

The <dfn attribute for="XRSession">comfortSpace</dfn> attribute is an {{XRSpace}} which represents a space which will be a sensible place to put content which is designed to be physically interacted with. Most platforms have a limited space in which the user can do interactions, these limits come from the limits of the user's reach and height and also the tracking capabilities of the hardware. Ideally this space can be used by the developer to adjust their experiences to keep the interactive objects in reach. This can be null when hand based interactions don't make sense for the platform e.g. handheld WebXR experiences. This should have some fuzz applied to it each session so that it cannot be used to fingerprint users.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be expressed in terms of native origins, "putting an object in a space" has no meaning, all objects live in all spaces.

We may also wish to discuss if this should be session.comfortSpace or session.getAuxiliarySpace("comfort"), mirroring the XRReferenceSpace APIs.. I'm fine with the former, but I want to flag this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback, I like getAuxiliarySpace since I don’t want to clutter up session although it would be awkward if we can’t envisage any others.


<div class="algorithm" data-algorithm="initialize-session">

To <dfn>initialize the session</dfn>, given |session|, |mode|, |granted|, and |device|, the user agent MUST run the following steps:
Expand Down
Loading