Skip to content

Conversation

@tomegz
Copy link
Contributor

@tomegz tomegz commented Aug 4, 2019

Description:
Initial pixel ratio is set when setting up the renderer. After exiting VR mode it somehow gets reset. Additional setPixelRatio call on exiting VR mode fixes this issue.

Changes proposed:

  • set correct pixel ratio on exiting VR mode

@tomegz tomegz force-pushed the aframe-3592-resolution-drop-on-mobile-fix branch from 041fe35 to 7a1f02f Compare August 4, 2019 10:24
@tomegz
Copy link
Contributor Author

tomegz commented Aug 4, 2019

I see that the tests are failing. I need to check why I can't access self.renderer.setPixelRatio. It is undefined which is not what I expected

@dmarcos
Copy link
Member

dmarcos commented Aug 5, 2019

@tomegz Thanks. To fix the test you have to mock setPixelRatio method here https://github.com/aframevr/aframe/blob/master/tests/__init.test.js#L32

@tomegz
Copy link
Contributor Author

tomegz commented Aug 11, 2019

Done, sorry it took me so long. Please review @dmarcos

Copy link
Member

@dmarcos dmarcos left a comment

Choose a reason for hiding this comment

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

Thanks!

@dmarcos dmarcos merged commit 9785b6c into aframevr:master Aug 11, 2019
@tomegz tomegz deleted the aframe-3592-resolution-drop-on-mobile-fix branch August 11, 2019 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants