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

Expose XRSession's granted features #1296

Merged
merged 2 commits into from
Aug 24, 2022
Merged

Expose XRSession's granted features #1296

merged 2 commits into from
Aug 24, 2022

Conversation

alcooper91
Copy link
Contributor

@alcooper91 alcooper91 commented Aug 16, 2022

Per Issue #1205, this proposal makes the following changes:

  1. Exposes the XRSession's set of granted features as a FrozenArray attribute enabledFeatures
  2. Requires feature descriptors to be represented by DOMStrings, with any additional initialization being added as an extended member on XRSessionInit.

Note that this second change is consistent with how feature descriptors have currently been extended by the various other specs. It essentially requires that we have a string representation of the feature and can then further configure the feature as needed.


Preview | Diff

@alcooper91
Copy link
Contributor Author

I weighed adding a change event but opted not to at this time since we don't currently have any mechanisms/algorithm's/language about changing the set of enabled features mid session; but it should be fairly straightforward to add if we want to either pre-emptively add support, or if I just missed that.

index.bs Outdated Show resolved Hide resolved
Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for putting this together!

@alcooper91 alcooper91 merged commit a493dd5 into immersive-web:main Aug 24, 2022
@alcooper91 alcooper91 deleted the add_enabledFeatures branch August 24, 2022 21:00
github-actions bot added a commit that referenced this pull request Aug 24, 2022
SHA: a493dd5
Reason: push, by @alcooper91

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 1, 2024
… type sequence<DOMString>. r=mccr8

This was changed in the spec here: immersive-web/webxr#1296

Differential Revision: https://phabricator.services.mozilla.com/D201336
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 2, 2024
… type sequence<DOMString>. r=mccr8

This was changed in the spec here: immersive-web/webxr#1296

Differential Revision: https://phabricator.services.mozilla.com/D201336
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Mar 4, 2024
… type sequence<DOMString>. r=mccr8

This was changed in the spec here: immersive-web/webxr#1296

Differential Revision: https://phabricator.services.mozilla.com/D201336
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Mar 4, 2024
… type sequence<DOMString>. r=mccr8

This was changed in the spec here: immersive-web/webxr#1296

Differential Revision: https://phabricator.services.mozilla.com/D201336
josephrocca added a commit to josephrocca/three.js that referenced this pull request Mar 11, 2024
…sion.requestLightProbe`

The double-negative here is unfortunate, but currently `session.enabledFeatures` is only available in Chromium-based browsers, so we can't always *positively* know that the feature is supported.

Another approach would be to wrap `session.requestLightProbe` in try/catch, or add `.catch` after the `.then`, but for whatever reason, those don't seem to actually catch the error for me.

Related: immersive-web/webxr#1296
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.

3 participants