-
Notifications
You must be signed in to change notification settings - Fork 324
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
Fix UI in iOS #46
Comments
I noticed these other issues:
Not sure whether you want to cover all of those issues in this one or file separate ones. Let me know - I can do that. |
Thanks for testing more. Are you using webvr-samples, or using the latest On Wed, Mar 23, 2016 at 3:24 AM chris van wiemeersch <
|
Latest polyfill |
Things are looking a little bit better here: http://borismus.github.io/webvr-polyfill/examples/basic/. There's still a problem on iOS, which manifests when you exit VR mode. I'm not sure how to best fix it... Problem is the following: When we go into VR mode, we redefine canvas.width and canvas.height using cc: @toji |
I noticed the exact same thing; spent a few hours last night trying to fix but I was unsuccessful. maybe y'all have better luck. |
Testing against |
@cvan Yes, that's because iOS fails to reset the redefined width & height properties. So far my workaround attempts have not succeeded and I'm open to suggestions. |
Looks like the problem is that get and set are undefined on realCanvasWidth/Height. Furthermore, A workaround could be to use a proxy wrapper to wrap around the Canvas element, but that seems really bad. Maybe there's a way to create a JS-based getter/setter that resets the underlying canvas element? |
Can we instead assume that the canvas will be resized when the window gets resized and/or there's an orientation change? That way, we could just add event listeners. Thoughts? |
Not as clean, since canvas might not be fullscreen by default. We should support canvas getting resized even when the window remains fixed. |
Ok, fixed part of the problem by making a JS getter setter if getOwnPropertyDescriptor fails. But on iOS initial sizing is still wrong on requestPresent/exitPresent. 0d933e2 |
so far, I've seen |
It returns an object but get/set are undefined. |
Spent a while researching this myself, and I'm not convinced the Width/height patch we're doing it feasible on Safari (iOS or OSX). So after giving it some thought I've got an alternate proposal: We should keep doing what we're doing on Android, but on Safari we simply don't install the width/height patch and instead check the width and height on every submitFrame. If it differs from the last values we saw resize the false backbuffer to match (after rendering the current distortion frame.) The real backbuffer will also be resized, since that's the default width/height behavior. This means that if they set the size to larger than the physical screen res (to try and get a 1:1 pixel ratio post-distortion) the real backbuffer will be too large and downscale when rendered to the screen, wasting fill rate and somewhat defeating the purpose of trying for a 1:1 ratio in the first place. Fortunately most iOS don't seem as fillrate sensitive as their contemporary android devices, so it's more of a quality issue than a performance or correctness issue. At least the resize won't break when we exit VR mode at that point, though. |
Some UI glitches in iOS.
cc: @toji
The text was updated successfully, but these errors were encountered: