Clarify that minimum viewport scale may change by klausw · Pull Request #1134 · immersive-web/webxr · GitHub
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

Clarify that minimum viewport scale may change #1134

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

klausw
Copy link
Contributor

@klausw klausw commented Sep 29, 2020

The minimum viewport scale must ensure that the viewport has a nonzero
size, and this may in theory require an adjustment if the session's
baseLayer is changed during a session to use a very small
framebufferScaleFactor.

Change the wording to clarify that it's not necessarily constant for an
entire session.


Preview | Diff

The minimum viewport scale must ensure that the viewport has a nonzero
size, and this may in theory require an adjustment if the session's
baseLayer is changed during a session to use a very small
framebufferScaleFactor.

Change the wording to clarify that it's not necessarily constant for an
entire session.
@klausw
Copy link
Contributor Author

klausw commented Sep 29, 2020 via email

@cabanier
Copy link
Member

On second thought, I think it would be easier to enforce the nonzero size in getViewport, then this change isn't needed and there's less ambiguity about baseLayer changes.

Yes, you can update getViewPort to make that adjustment.
Are there UA that require a certain minimum size for the viewport? If so, you could make the adjustment in that function as well.

Add the nonzero viewport size and optional UA minimum viewport
scale constraints to the getViewport algorithm instead.
@klausw
Copy link
Contributor Author

klausw commented Sep 30, 2020

On second thought, I think it would be easier to enforce the nonzero size in getViewport, then this change isn't needed and there's less ambiguity about baseLayer changes.

Yes, you can update getViewPort to make that adjustment.

I've moved the logic there.

Are there UA that require a certain minimum size for the viewport? If so, you could make the adjustment in that function as well.

I'm not aware of a specific UA requirement (beyond ensuring nonzero size), but I added an optional adjustment there where the UA could clamp to a minimum viewport scale.

@Manishearth Manishearth merged commit ca0a933 into immersive-web:master Oct 2, 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.

4 participants