退出 VR 模式时,Aframe 分辨率在移动设备上下降
Aframe resolution drops on mobile when exiting VR-mode
当从 VR 模式切换回 'normal' 模式时,单帧场景的分辨率从大约全高清急剧下降到大约 360p。
不确定这是 Aframe 的核心问题,Three.js 还是一般的 WebVR 问题,但似乎每个 AFRAME 应用程序都会出现这种情况,但其他 WebVR 应用程序不会出现。在下面提到的 android 设备以及至少一台其他 android 移动设备和一台 iphone 设备上会遇到此问题,但不会在桌面浏览器上遇到。
Image when entered into VR mode: resolution is 1820x1080
Image when exited VR mode: resolution changed to 640x360
请注意,上述分辨率是使用以下方法获得的:
AFRAME.scenes[0].renderer.getSize().width + "," + AFRAME.scenes[0].renderer.getSize().height + ", canvas: " + AFRAME.scenes[0].canvas.width + "," + AFRAME.scenes[0].canvas.height
虽然我经常遇到这个问题,但我在网上找不到任何提及它的地方。欢迎任何建议(以及确认或拒绝)!
设备信息
AFRAME: 0.8.2
Browsers: Firefox and Chrome for android
Phone: Huawei P10 lite
Android: 7.0 (Nougat)
在这里找到了我的解决方案; https://github.com/aframevr/aframe/issues/3592 这似乎类似于@Tostifrosti 在同一回购协议的第 3354 期中的解决方案(尽管该解决方案不涉及更改 aframe 库中的代码)。
解决方案是在 line 479 in a-scene.js
之后添加以下行
this.renderer.setPixelRatio(window.devicePixelRatio);
当从 VR 模式切换回 'normal' 模式时,单帧场景的分辨率从大约全高清急剧下降到大约 360p。
不确定这是 Aframe 的核心问题,Three.js 还是一般的 WebVR 问题,但似乎每个 AFRAME 应用程序都会出现这种情况,但其他 WebVR 应用程序不会出现。在下面提到的 android 设备以及至少一台其他 android 移动设备和一台 iphone 设备上会遇到此问题,但不会在桌面浏览器上遇到。
Image when entered into VR mode: resolution is 1820x1080
Image when exited VR mode: resolution changed to 640x360
请注意,上述分辨率是使用以下方法获得的:
AFRAME.scenes[0].renderer.getSize().width + "," + AFRAME.scenes[0].renderer.getSize().height + ", canvas: " + AFRAME.scenes[0].canvas.width + "," + AFRAME.scenes[0].canvas.height
虽然我经常遇到这个问题,但我在网上找不到任何提及它的地方。欢迎任何建议(以及确认或拒绝)!
设备信息
AFRAME: 0.8.2
Browsers: Firefox and Chrome for android
Phone: Huawei P10 lite
Android: 7.0 (Nougat)
在这里找到了我的解决方案; https://github.com/aframevr/aframe/issues/3592 这似乎类似于@Tostifrosti 在同一回购协议的第 3354 期中的解决方案(尽管该解决方案不涉及更改 aframe 库中的代码)。
解决方案是在 line 479 in a-scene.js
之后添加以下行this.renderer.setPixelRatio(window.devicePixelRatio);