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

Remove WebVR support and polyfill #5451

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Feb 8, 2024

Description:
This PR removes WebVR support and WebVR polyfill (#5447), leaving only the WebXR code paths. This allows quite a lot of code to be removed and simplified. Especially the various device-controls components. While making the adjustments to the controllers and their unit tests it became painfully clear that there are many inconsistencies in the way controllers are handled. Many of them also exhibit changed behaviour compared to WebVR (e.g. naming of buttons changed), which showed as regressions in the unit tests.

Marked as a draft as this PR will require extensive reviewing/testing. Seeing the poor state of the controller components and their associated tests, I'll probably create separate PRs that focus on moving the unit tests over to WebXR, followed by simplifying/fixing the controller components, which will leave this PR purely with the WebVR removal.

Changes proposed:

  • Remove WebVR polyfill
  • Remove WebVR code paths/support
  • Update all controls components to only support/use WebXR
  • Changed unit test to test WebXR behaviour, while removing ones the only applied to WebVR

@dmarcos
Copy link
Member

dmarcos commented Feb 8, 2024

Not sure if ready to remove WebVR yet because of Firefox.

@arpu
Copy link
Contributor

arpu commented Feb 9, 2024

firefox reality is now https://www.wolvic.com/en/ and they support webxr

@dmarcos
Copy link
Member

dmarcos commented Feb 9, 2024

firefox reality is now https://www.wolvic.com/en/ and they support webxr

Meant Firefox desktop

@mrxz
Copy link
Contributor Author

mrxz commented Feb 9, 2024

Meant Firefox desktop

@dmarcos Firefox desktop has WebVR disabled by default since 98 (link). It can be enabled by setting dom.vr.enabled and one of dom.vr.openvr/osvr.enabled manually. Though, personally whenever I do use Firefox for this I enable the (albeit somewhat incomplete) WebXR implementation (dom.vr.webxr) instead.

@dmarcos
Copy link
Member

dmarcos commented Feb 22, 2024

This needs rebase. Also cardboard support is still around albeit disabled by default. Heard of some people still using it

@dmarcos
Copy link
Member

dmarcos commented Feb 23, 2024

This needs rebase

@mrxz
Copy link
Contributor Author

mrxz commented Feb 24, 2024

@dmarcos Rebased.

Also cardboard support is still around albeit disabled by default. Heard of some people still using it

One option for cardboard users could be to use the webxr-polyfill, which uses the same underlying cardboard-vr library as the webvr-polyfill currently does. Should just be a matter of including and initializing it before A-Frame. Instructions for it could be included in the release notes and/or noted somewhere in the documentation.

In any case, cardboard doesn't need WebVR controller support, so those changes can be done regardless.

@mrxz
Copy link
Contributor Author

mrxz commented Feb 27, 2024

Let me know if you want me to split off a PR that focusses on removing the WebVR controller logic.

@arpu
Copy link
Contributor

arpu commented Mar 28, 2024

as reference Babylon removed it with 7.0.0 https://github.com/BabylonJS/Babylon.js/releases/tag/7.0.0
Remove deprecated WebVR - [Breaking Change]

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.

None yet

3 participants