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

Short circuit updateRenderState() if no render state is passed #1031

Merged
merged 2 commits into from
May 11, 2020

Conversation

Manishearth
Copy link
Contributor

@Manishearth Manishearth commented May 11, 2020

Fixes #880


Preview | Diff

@Manishearth Manishearth requested a review from toji May 11, 2020 21:45
1. If |newState|'s {{XRRenderStateInit/inlineVerticalFieldOfView}} is set and |session| is an [=immersive session=], throw an {{InvalidStateError}} and abort these steps.
1. If none of |newState|'s {{XRRenderStateInit/depthNear}}, {{XRRenderStateInit/depthFar}}, {{XRRenderStateInit/inlineVerticalFieldOfView}}, {{XRRenderStateInit/baseLayer}}, {{XRRenderStateInit/layers}} are set, abort these steps.
Copy link
Member

Choose a reason for hiding this comment

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

I'm slightly concerned that this lends itself to accidentally missing future additions to the dictionary, but given that partial dictionaries are apparently verboten I guess that's not as bad as it could be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was my concern as well, unfortunately since dictionaries aren't real you can't just "check if it's empty"

@Manishearth
Copy link
Contributor Author

Rebased

@Manishearth Manishearth merged commit fb2ff08 into immersive-web:master May 11, 2020
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.

Corrections and clarifications for description/steps for updateRenderState()
2 participants