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

WebXR XRSession.enabledFeatures missing workaround #6181

Merged
merged 4 commits into from Mar 18, 2024

Conversation

Maksims
Copy link
Contributor

@Maksims Maksims commented Mar 18, 2024

WebXR Specs are updated periodically and it is up to vendors to keep up with updates.
Despite that, XRSession.enabledFeatures was introduced in the 24 August 2022 spec update, but not all platforms have updated their implementations since, leading to that property missing on some platforms.

This is an unfortunate reality of the web, but we can use alternative paths where it is not available.

This PR does exactly that. Instead of using the enabledFetaures list, when it is not available we have to detect if a feature is available in different ways, depending on a specific feature's capabilities. Docs already mention that the availability flag on a feature - does not necessarily available on the session start.

Fixes #6045

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks!

@willeastcott willeastcott self-assigned this Mar 18, 2024
@willeastcott willeastcott added bug area: xr XR related issue labels Mar 18, 2024
@willeastcott willeastcott merged commit 81bb830 into playcanvas:main Mar 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: xr XR related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebXR issue on PICO Neo 3
3 participants