-
-
Notifications
You must be signed in to change notification settings - Fork 382
feat(XR): Handle WebXR XRInputSourceEvents #2221
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
Note that XR events seem at the moment to be the best way to handle mobile AR events, which will usually be simpler (i.e. touching the screen). VR events may be more complicated due to different controller inputs/configurations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. Just a small comment on capitalization.
'StartXrSelect', | ||
'XrSelect', | ||
'EndXrSelect', | ||
'StartXrSqueeze', | ||
'XrSqueeze', | ||
'EndXrSqueeze', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think capitalizing the 'R' in 'XR' for consistency is a good idea here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still relevant?
Note that I do not expect to be able to revisit this PR. Will leave open in case others would like to take up this development, otherwise project maintainers are welcome to close it. |
this PR is probably useful so we should just merge it someday imo |
PR and Code Checklist
npm run reformat
to have correctly formatted codeContext
The WebXR API exposes a limited number of user input events, which we expose to the user here through
RenderWindowInteractor
alongside other typical browser events.Note that the granularity offered through XR events does not match that of the XR gamepad API, through which we can query continuous values such as touchpad or joystick position through our
updateXRGamepads
method. Developers should take both approaches into account.Changes
RenderWindowInteractor
.Results
Exposes six new events ("select"/start/end, "squeeze"/start/end) that developers can choose to handle.
Testing
master