【发布时间】:2017-12-28 08:20:12
【问题描述】:
我真的不知道如何提出这个问题,但我得到了一些可能会让事情变得清晰的图片。在我方便地称为“坏方面”的视频中,您可以看到出价歪斜/扭曲/拉伸的视频。 好的和坏的都基于同一个演示项目:https://github.com/google-ar/three.ar.js/blob/master/examples/spawn-at-surface.html 我在我的智能手机上用两个应用程序制作了打印屏幕,我将手机保持在纵向模式,然后对角转动。
它将drawingbufferheight变成4096,我认为它应该是5661,就像viewportheight一样。尝试手动更改它,但我似乎无法使其工作。有什么想法或线索吗?
(使用 three.js、three.ar.js 和 webVR API)
编辑:一些代码:
this.renderer = new THREE.WebGLRenderer({ alpha: true});
this.renderer.setPixelRatio(window.devicePixelRatio);
this.renderer.setSize(window.innerWidth, window.innerHeight);
this.renderer.autoClear = false;
this.canvas = this.renderer.domElement;
document.body.appendChild(this.canvas);
this.scene = new THREE.Scene();
// Creating the ARView, which is the object that handles
// the rendering of the camera stream behind the three.js
// scene
this.arView = new THREE.ARView(this.vrDisplay, this.renderer);
【问题讨论】:
-
可能得到-1,因为我没有添加一些代码,我会添加它。它与演示项目基本相同,但不同之处在于它是从远程服务器作为类启动的
标签: javascript android three.js webvr arcore