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

Add support for WebXR gamepads module (fix #4322) #4331

Merged
merged 14 commits into from
Dec 11, 2019

Conversation

dmarcos
Copy link
Member

@dmarcos dmarcos commented Nov 26, 2019

Work in progress with initial support for the gamepads module. @klausw What's the recommended way to identify the controller vendor to load the appropriate model? I see that the gamepad id is not populated and there's an entry in the XRInputSource .profiles that says oculus-touch for the Oculus Rift headset. Is there a list of vendor strings anywhere? Is the vendor name always guaranteed to be in the first position of the profiles array? Thank you very much.

@arpu
Copy link
Contributor

arpu commented Nov 26, 2019

squeeze* input events for WebVR and WebXR
mrdoob/three.js#17938

something aframe needs too?

@arpu
Copy link
Contributor

arpu commented Nov 26, 2019

on Samsung Odyssey i get this profiles:

length: 2
0: XRInputSource
handedness: "left"
profiles: Array(3)
0: "samsung-odyssey"
1: "windows-mixed-reality"
2: "generic-trigger-squeeze-touchpad-thumbstick"

@arpu
Copy link
Contributor

arpu commented Nov 26, 2019

@dmarcos
Copy link
Member Author

dmarcos commented Dec 4, 2019

@Artyom17 I'm testing WebXR gamepad module support on Quest and realized that the profile is not populated in the Oculus Browser beta as per the registry. Can we assume that it will have the correct values when WebXR ships? Thank you very much for your help

@Artyom17
Copy link
Contributor

Artyom17 commented Dec 4, 2019

@dmarcos Yes, it seems like we agreed to name Oculus Touch controllers using the following schema: "oculus-touch" - Rift
"oculus-touch-v2" - Quest and Rift S
"oculus-touch-v3", etc - Next gens

However, Oculus Browser 7.0 is already ALMOST shipped and this change won't make into it. Hopefully, it will be in 7.1.

@arpu
Copy link
Contributor

arpu commented Dec 4, 2019

and "oculus-go" - Oculus go

@Artyom17
Copy link
Contributor

Artyom17 commented Dec 4, 2019

@arpu Yes. https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/oculus/oculus-go.json

@Artyom17
Copy link
Contributor

Artyom17 commented Dec 4, 2019

Also, we are going to support "samsung-gearvr" (at least for some time).

@dmarcos
Copy link
Member Author

dmarcos commented Dec 9, 2019

This is ready to go. FYI, Oculus Browser 7 doesn't yet support the WebXR gamepad module. Interactions are limited to a single button (trigger) until Oculus Browser 7.1 ships. Logic is already wired (tested on Chrome with Rift) and should work with no additional changes.

@dmarcos
Copy link
Member Author

dmarcos commented Dec 9, 2019

I believe this is the last pending PR for 0.9.3 release. We have to do a last QA pass on all devices. Any help testing and filing issues will be appreciated.

@dmarcos
Copy link
Member Author

dmarcos commented Dec 10, 2019

This needs more QA. Chrome Canary and Beta have issues to enter VR today using WebXR and the latest Oculus Runtime and couldn't test thoroughly.

@klausw
Copy link
Contributor

klausw commented Dec 10, 2019

Work in progress with initial support for the gamepads module. @klausw What's the recommended way to identify the controller vendor to load the appropriate model? I see that the gamepad id is not populated and there's an entry in the XRInputSource .profiles that says oculus-touch for the Oculus Rift headset. Is there a list of vendor strings anywhere? Is the vendor name always guaranteed to be in the first position of the profiles array? Thank you very much.

Sorry, I had missed being pinged. I hope you got this sorted out in the meantime, but for the record the intent is that you should go through the profiles array in order, and use the first profile name for which you find a match in the registry. They are ordered from most-specific to least-specific, with middle entries being reasonably-compatible matches and the last one being a generic fallback with a standard naming scheme describing the available features.

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