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

Conversation

AdaRoseCannon
Copy link
Member

@AdaRoseCannon AdaRoseCannon commented Sep 29, 2023

This PR is an attempt to add a new space to session as discussed in #1339
I was thinking it should probably be null if it's not something that makes sense for the platform. I am not sure if I got the syntax right for that.

What do people think?


Preview | Diff

@AdaRoseCannon
Copy link
Member Author

/agenda to get feedback

@probot-label probot-label bot added the agenda Request discussion in the next telecon/FTF label Oct 2, 2023
index.bs Outdated
@@ -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.

@Yonet Yonet removed the agenda Request discussion in the next telecon/FTF label Oct 31, 2023
@AdaRoseCannon AdaRoseCannon added the agenda Request discussion in the next telecon/FTF label Nov 7, 2023
@AdaRoseCannon
Copy link
Member Author

After the meeting today, the result of the discussion is that the space should clarify where the content should be placed in relation to the zero point. The change I will make (when I return from vacation) is to add a 6 item Array for the min-max 3D vectors of an AABB. The min-y value will always be 0 so effectively positive-y will be placed on top of a surface if the comfort space is aligned to a surface.

@Yonet Yonet removed the agenda Request discussion in the next telecon/FTF label Nov 28, 2023
@AdaRoseCannon
Copy link
Member Author

Does it need to follow the user??

I don't think so

@AdaRoseCannon
Copy link
Member Author

Thinking further I think the min-Y property should only be 0 if the user has the comfort space resting on a desk or similar surface. If it is free floating then it can be negative to let the origin on the space be used for the most comfortable place since for a device where the comfort space is tall developers could place the objects quite low down. Although this would let developers infer that there is a surface they can use which is information which would normally be exposed via the real-world-geometry API.

@AdaRoseCannon
Copy link
Member Author

Another question, if the user is only using a tracked controller in their left hand then swaps hand or activates a second tracked controller, should the bounding box update to reflect this change?

@AdaRoseCannon AdaRoseCannon marked this pull request as draft February 29, 2024 22:29
Copy link

@Misaksaksak Misaksaksak left a comment

Choose a reason for hiding this comment

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

This PR is an attempt to add a new space to session as discussed in #1339
I was thinking it should probably be null if it's not something that makes sense for the platform. I am not sure if I got the syntax right for that.

What do people think?


Preview | Diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants