MozillaReality / WebXR-emulator-extension

WebXR emulator extension
Mozilla Public License 2.0
454 stars 55 forks source link

Auto generate buttons and joystick from WebXR Input Profiles #278

Open felixtrz opened 2 years ago

felixtrz commented 2 years ago

This PR makes the following changes:

  1. Fixed incorrect button mapping for Oculus Quest and HTC Vive.
  2. Add support for all buttons on oculus devices. Instead of hard code the buttons for all headsets in devices.json, load the input configuration from WebXR Input Profile, and auto generate buttons accordingly. This change is not unique to oculus devices, by adding the proper input configuration to WebXR Input Profiles and correct input mapping to WebXR Polyfill, the added inputs will automatically appear for the device. The same has been done to HTC Vive.
  3. Add joystick UI for headsets that implements xr-standard-thumbstick (oculus headsets, windows mixed reality devices, htc vive, etc.)
  4. Update webxr-polyfill to update and add support for new oculus headsets, fixing the issue where selecting oculus quest headset makes the emulator give incorrect profile name (oculus-touch instead of oculus-touch-v2), adding support for quest 2 and oculus rift s. The PR to webxr-polyfill can be found here When this is merged, I will update the dependency source in package.json

Please refer to this quick demo for the changes:

https://user-images.githubusercontent.com/11973041/141720218-328c49a1-9ccd-4b6d-a1c7-d7d29e10598a.mov

arpu commented 2 years ago

Hey, can you share a build chrome extentions from this?

takahirox commented 2 years ago

Hi @fe1ixz, thanks for the amazing work!

Is it possible to break down the PR to multiple PRs? I'm on parental leave now and it's very hard to make time to review a single big PR. Breaking down to small PRs will help me do review.

felixtrz commented 2 years ago

Hi @takahirox,

Thank you very much for taking time out of your parental leave to review these changes, I will have the PR split into smaller PRs by the end of next week.

Felix Zhang

On Dec 3, 2021, at 3:47 AM, Takahiro @.***> wrote:

parental

felixtrz commented 2 years ago

extentions

Hi @arpu,

Thank you for your interest, this is still something that we are actively building, so we don't have a build to share yet. But you can download the source code and try it out with Load Unpacked in chrome extension tab, see this instruction

BlackBes commented 2 years ago

Hi @fe1ixz, thanks for the amazing work!

Is it possible to break down the PR to multiple PRs? I'm on parental leave now and it's very hard to make time to review a single big PR. Breaking down to small PRs will help me do review.

Hello, how is review going? A lot of guys is interested in this features!

felixtrz commented 2 years ago

Hi @fe1ixz, thanks for the amazing work!

Is it possible to break down the PR to multiple PRs? I'm on parental leave now and it's very hard to make time to review a single big PR. Breaking down to small PRs will help me do review.

Hello, how is review going? A lot of guys is interested in this features!

Hey Anton, thanks for the interest. I am in the process of breaking down the PR into smaller ones. Planning for the new year has been keeping me a little busy, I will continue this work asap.

SrinivasPrabhu794 commented 2 years ago

Hi @fe1ixz

Thanks for this amazing work. Was this PR divided into smaller chunks ? Can I create a chrome extension from this ?

niccolofanton commented 1 year ago

Hi @fe1ixz

Thanks for this amazing work. Was this PR divided into smaller chunks ? Can I create a chrome extension from this ?

Hi, yes you can clone the PR, npm install, npm run build and then visit chrome://extensions/ (if you're using chrome). Click on "Load unpacked" and select the cloned folder

kylebakerio commented 1 year ago

thanks! just loaded it in locally, it seems to be a huge improvement over what we currently have in the chrome web store. great work!

takahirox commented 1 year ago

@felixtrz Friendly ping for the follow up PRs after #280

kylebakerio commented 1 year ago

The default branch available in chrome web store is barely usable--I've been instead using this PR and advocating for this for two months now with no issues, for what it's worth, and tested against it heavily, i.e. developing new models that directly replicate the real world controller interactions--joystick movement matched by virtual joystick movement, button movement likewise--and testing against the input of this extension correctly matched what I then experienced in the quest 2 itself. The other controllers all behaved correctly to the extent I was able to test them as well.

yuripourre commented 1 year ago

This feature would be very welcome!