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

Polyfill returns too large eye dimensions (renderWidth/renderHeight) on Essential PH-1 #324

Open
drojdjou opened this issue Jun 1, 2018 · 2 comments

Comments

@drojdjou
Copy link

drojdjou commented Jun 1, 2018

Description:

When using the polyfill in Chrome on an Essential PH-1 phone (with webvr flag disabled) it doesn't find a match in the device db JSON file for that device.

1/ It would be awesome to add PH-1 into the db file. I can provide the data, though I'm not sure what those fields in the JSON mean, so I need some help with that.

2/ The polyfill falls back on some default Android settings in this case. But the eye dimensions calculated are larger than the actual screen size and the resulting WebVR viewport is too big. Would it be possible to derive those values from the screen.width and screen.height properties in case webvr is polyfilled and there is no match in the db file?

3/ If the device lookup in the JSON file fails, could you set a flag on the polyfill object? This way we could at least implement some fallback.

Additional Information:
  • webvr-polyfill version: latest (0.10.6)
  • Browser name/version/release channel: Chrome stable 66.0.3359.158
  • Operating System: Android 8.1.0 PH-1 Build / Essential
@jsantell
Copy link
Contributor

jsantell commented Jun 1, 2018

  1. Check out https://github.com/immersive-web/webvr-polyfill-dpdb -- if you add the device there, we can consume it in the polyfill. Instructions in the README
  2. Possible, to be honest I'm not terribly familiar with how these properties are calculated
  3. I'm not able to check right now, but I believe the resulting VRDisplay should have some private properties accessible to see which values are used, like display.deviceInfo_

@drojdjou
Copy link
Author

Thanks!

1/ I will do that

2/ Basically the problem is that if it is a polyfilled implementation, then the size of the screen is what it is, i.e. equal to window.innerWidth * window.devicePixelRatio and same for the height. The problem with the polyfill is that it comes with different numbers, unrelated to the actual size of the screen in those cases and it takes a lot of ugly patching in the code to make it scale right.

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

No branches or pull requests

2 participants