Comments (15)
I noticed these other issues:
- The back button is too large on Android (not as large as on iOS). At least on my devices, the button obscures the top corner of the left viewport.
- The gear icon is noticeably larger on iOS than on Android.
- Clicking on the gear icon doesn't do anything on Android (or anywhere where the Fullscreen API is supported). When I exit VR, for a few milliseconds before it disappears, I can see that the Cardboard settings modal was behind the fullscreened canvas. On iOS the menu appears because WebKit doesn't support Fullscreen.
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.
from webvr-polyfill.
Thanks for testing more. Are you using webvr-samples, or using the latest
polyfill? I thought I fixed the gear issue (your #3) but I don't think
@toji updated to latest polyfill yet.
On Wed, Mar 23, 2016 at 3:24 AM chris van wiemeersch <
[email protected]> wrote:
I noticed these other issues:
- The back button is too large on Android (not as large as on iOS). At
least on my devices, the button obscures the top corner of the left
viewport.- The gear icon is noticeably larger on iOS than on Android.
- Clicking on the gear icon doesn't do anything on Android (or
anywhere where the Fullscreen API is supported). When I exit VR, for a few
milliseconds before it disappears, I can see that the Cardboard settings
modal was behind the fullscreened canvas. On iOS the menu appears because
WebKit doesn't support Fullscreen.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.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#46 (comment)
from webvr-polyfill.
Latest polyfill
from webvr-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 Object.defineProperty
(https://github.com/borismus/webvr-polyfill/blob/master/src/cardboard-distorter.js#L238). When exiting VR mode, we restore canvas.width and canvas.height with its original values, which we capture using Object.getOwnPropertyDescriptor
(https://github.com/borismus/webvr-polyfill/blob/master/src/cardboard-distorter.js#L68). However on iOS, these values never really get set back properly, so changing canvas.width/height values has no effect.
cc: @toji
from webvr-polyfill.
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.
from webvr-polyfill.
Testing against examples/basic/
, I noticed that the back button is smaller, but it's still visible within the left viewport. And the back button on iOS seems to make the screen turn black and rotating the phone back to portrait doesn't seem to resize things correctly.
from webvr-polyfill.
@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.
from webvr-polyfill.
Looks like the problem is that get and set are undefined on realCanvasWidth/Height. Furthermore, renderer.domElement.__lookupGetter__('width')
doesn't work in Safari at all (same for setter).
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?
from webvr-polyfill.
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?
from webvr-polyfill.
Not as clean, since canvas might not be fullscreen by default. We should support canvas getting resized even when the window remains fixed.
from webvr-polyfill.
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
from webvr-polyfill.
so far, I've seen Object.getOwnPropertyDescriptor
always return the correct object. you saw otherwise? is this a known WebKit bug?
from webvr-polyfill.
It returns an object but get/set are undefined.
from webvr-polyfill.
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.
from webvr-polyfill.
This is fixed, except for weird button sizing. I've worked around this for now, but the workaround is ugly and wrong: 17dc3c8. Logged a new bug to track it: #57
from webvr-polyfill.
Related Issues (20)
- Customize controls design + autohide function HOT 2
- mimeType is not defined HOT 5
- Customizing visor profile? HOT 5
- is webvr-polyfill compatible with the newest versions of THREE.js? HOT 5
- black screen is rendered when VREffects script is not used with webvr-polyfill HOT 3
- Markerless AR for web using WebVR HOT 2
- Stopped working on IOS version 12.2 HOT 2
- On Chrome 74, Enter VR Mode on mobile stops working with http:// protocol.
- devicemotion event support is removed from chrome 74 on using http:// protocol. works fine with https:// HOT 1
- "View in VR" does not remove the address bar on iOS HOT 5
- Does this still work and maybe I'm using it wrong? HOT 1
- screen.orientation.lock() failed
- Pose sensor on Android 9 in webview stopped to work HOT 2
- Is wake lock base64 video required ? HOT 3
- [QUESTION] Doesn't work with Angular in production mode HOT 1
- Remove Cardboard middle white line
- Touch doesn't work HOT 1
- The polyfill broke down on iOS? HOT 1
- host-provided navigator.getVRDIsplays returns an empty list. how does one force the polyfill to populate the list?
- Polifyll wont work on iOS - Reproducible example inside HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webvr-polyfill.