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

Best practices for headset and handset AR #96

Closed
AdaRoseCannon opened this issue Nov 13, 2020 · 5 comments
Closed

Best practices for headset and handset AR #96

AdaRoseCannon opened this issue Nov 13, 2020 · 5 comments

Comments

@AdaRoseCannon
Copy link
Member

It seems to me the way to go is

  • Default to hit-test from viewer space to support selecting from a phone before you touch the screen
  • When XRInputSource added then use that to hit-test from the targetRaySpace

This would work really well to listen for selectstart and do hit testing on whatever input source you get, unfortunately transient input sources are indistinguishable from regular input sources and need to use requestHitTestSourceForTransientInput and have slightly different options.

@Manishearth
Copy link
Contributor

Currently the spec mandates that all transient sources have targetRayMode = "screen", but not vice versa (even though that is true in practice). It's worth considering making that always true, but we can also add a transient bool.

My understanding is that the API is intended to be used by registering against all normal input sources and also adding a transient source listener. Perhaps this can be added to the explainer.

/agenda to discuss how authors should be writing this and to see if we need spec or explainer changes to support that

@probot-label probot-label bot added the agenda label Nov 13, 2020
@Manishearth
Copy link
Contributor

Another thing to note is that transient sources will most likely be generic-touchscreen

@AdaRoseCannon
Copy link
Member Author

Here is what I am currently doing, this really does not feel neat.

  • What if something comes up as a more generic than "generic-touchscreen"
  • What if there are other transient inputs which are not "generic-touchscreen" so go down the wrong path
  • What if weird hardware happens that is not a transient input but for some bizarre reason has "generic-touchscreen" as it's most generic profile

image

@bialpio
Copy link
Contributor

bialpio commented Nov 13, 2020

Seems like we need at least the following for it to be usable:

  1. A way of asking a session about profile names of possible transient input sources so that the application knows what it needs to pre-subscribe to. For now this would effectively return only ["generic-touchscreen"].
  2. Expose whether a specific hit test source is transient or not so that the code snipped above can be made more neat. :)

The 1. is a bit concerning from privacy standpoint, but it may be fine (we need to see whether it'd expose more information about the UA / device than the sites already have).

(...) and to see if we need spec or explainer changes to support that

Spec changes are definitely needed - the algorithms for hit test source creation do not take into account whether the input source is transient or not. I don't really want to have 2 different APIs that allow the site to do the same thing (i.e. I want to forbid creating a regular hit test subscription from a transient input source), but that means that unfortunately we'd need to special-case the algorithm for requestHitTestSource() method to treat some XRSpaces differently.

@Yonet Yonet removed the agenda label Nov 17, 2020
@AdaRoseCannon
Copy link
Member Author

Discussed during the 17/11/2020 call created this issue as an action:

#97

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

No branches or pull requests

4 participants