aframe
aframe copied to clipboard
Remove WebVR support and polyfill
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
controlscomponents to only support/use WebXR - Changed unit test to test WebXR behaviour, while removing ones the only applied to WebVR
Not sure if ready to remove WebVR yet because of Firefox.
firefox reality is now https://www.wolvic.com/en/ and they support webxr
firefox reality is now https://www.wolvic.com/en/ and they support webxr
Meant Firefox desktop
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.
This needs rebase. Also cardboard support is still around albeit disabled by default. Heard of some people still using it
This needs rebase
@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.
Let me know if you want me to split off a PR that focusses on removing the WebVR controller logic.
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]
Can I bump this PR? I believe I am currently experiencing issues where my Firefox (beta) for Android mobile is breaking because of the PolyFill.
Failed to recalculate device parameters. webvr-polyfill.js:1945:12
Aframe 7
recalculateDeviceParams_
ge
Xe
getPolyfillDisplays
getVRDisplays
c
5579
Webpack 5
n
<anonymous>
<anonymous>
<anonymous>
<anonymous>
@danineuss what A-Frame version?
Version 1.6.0 does still use the polyfills (or at least that is what the log says). But I believe I could fix the issue in the meantime. Thank you so much for your quick reply and continued effort in this wonderful framework 🙏🏽
On June 13, 2024, radioman85 @.***> wrote:
@danineuss https://github.com/danineuss what A-Frame version?
— Reply to this email directly, view it on GitHub https://github.com/aframevr/aframe/pull/5451#issuecomment-2165605727, or unsubscribe <https://github.com/notifications/unsubscribe- auth/ADUA74YHTHYG7Q3LMROLPRTZHGJ43AVCNFSM6AAAAABC7Z54JGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVGYYDKNZSG4>. You are receiving this because you were mentioned.Message ID: @.***>