我正在尝试制作尺寸为600X600像素的飞机,但我只是设法获得非对称平面,如图所示为黑色:asymmetric plane
我试图切换到组合相机并使用这样的正交模式:
signals.windowResize.add( function () {
if (camera.inPerspectiveMode) {
camera.cameraP.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
camera.cameraP.updateProjectionMatrix();
}
else {
camera.cameraO.left = window.innerWidth / -2;
camera.cameraO.right = window.innerWidth / 2;
camera.cameraO.top = window.innerHeight / 2;
camera.cameraO.bottom = window.innerHeight / -2;
camera.cameraO.updateProjectionMatrix();
}
renderer.setSize(container.dom.offsetWidth, container.dom.offsetHeight);
render();
} );
但它仍无效。我也试图改变pixelRatio而没有成功。 我应该更换相机FOV吗?相机方面?画布的尺寸?任何想法如何解决? 谢谢Dan,
答案 0 :(得分:0)
溶液:
signals.windowResize.add( function () {
if (camera.inPerspectiveMode) {
camera.cameraP.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
camera.cameraP.updateProjectionMatrix();
}
else {
camera.cameraP.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
camera.cameraO.updateProjectionMatrix();
camera.toOrthographic();
}
renderer.setSize(container.dom.offsetWidth, container.dom.offsetHeight);
render();
} );