Closed
Bug 1621369
Opened 4 years ago
Closed 4 years ago
Mapping OpenVR/Oculus controllers to WebXR spec and giving conversion for WebVR
Categories
(Core :: WebVR, task, P1)
Core
WebVR
Tracking
()
RESOLVED
FIXED
mozilla76
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: daoshengmu, Assigned: daoshengmu)
References
Details
Attachments
(4 files)
We currently follow button and axis order for WebVR. Due to the migration from WebVR to WebXR is happening, we wanna support WebXR controllers in more efficient ways. Therefore, we would support WebXR button/axis order by default in all VR sessions. Then, considering to do our conversation in VRDisplayClient::FireGamepadEvents (Because WebXR will be no longer to handle these Gamepad events.)
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D66677
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D66678
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D66679
Assignee | ||
Comment 5•4 years ago
•
|
||
There are several goals for this bug.
- Refactoring OpenVR controller module. We have too much redundant code and most of them can use macro preprocessor to generate.
- Due to we need to convert WebXR btn/axis order to WebVR based on controller's id. To avoid inefficient strcmp(), we would have to store a ControllerType flag in VRShmem, so we would like to reuse OpenVRControllerType to be VRControllerType, and we can consider to remove this flag once we decide to remove WebVR support.
- Adjust Oculus controller btn/axis order to WebXR rules.
- Giving a convert function to map WebXR btn/axis order to WebVR. After digging it into a bit, I find VRDisplayClient::FireGamepadEvents() only will be called in WebVR because WebXR will not add gamepad objects into GamepadManager. Doing this conversion in Gamepadpad is possible, but we have to add variables in PGamepadEventChannel, like ControllerType, and general gampads don't need this variable actually.
Pushed by dmu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/17182dacd40f Part 1: Refactor OpenVR controller and adjust its button/axis order for WebXR. r=kip https://hg.mozilla.org/integration/autoland/rev/a7b839503f7a Part 2: Replace OpenVRControllerType with VRControllerType in IPC. r=kip https://hg.mozilla.org/integration/autoland/rev/2174a2a5ece7 Part 3: Adjust Oculus controller button/axis order for WebXR. r=kip https://hg.mozilla.org/integration/autoland/rev/4e4156f53e24 Part 4: Support WebXR to WebVR gamepad button/axis re-mapping. r=kip
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/17182dacd40f
https://hg.mozilla.org/mozilla-central/rev/a7b839503f7a
https://hg.mozilla.org/mozilla-central/rev/2174a2a5ece7
https://hg.mozilla.org/mozilla-central/rev/4e4156f53e24
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox76:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in
before you can comment on or make changes to this bug.
Description
•