Three.js - Issue to render objects using CanvasRenderer

自古美人都是妖i 提交于 2019-12-12 04:55:38

问题


I'm facing a issue to render cubes using CanvasRenderer, depends the camera position any cubes lost same parts and show a part of face other cube, as the below images:

In this example, there are two cubes, when the camera in front there aren't problem:

But, when I change de camera:

To render I use a array of materials, this is one of:

  new THREE.MeshLambertMaterial({ color: 0x006600, ambient: 0xffff00, side: THREE.DoubleSide, overdraw: 0.5 }),

回答1:


What you are seeing is an artifact of CanvasRenderer. The best you can do is tessellate your geometry. For example,

var geometry = new THREE.BoxGeometry( 100, 100, 100, 4, 4, 4 );

Or better yet, switch to WebGLRenderer.

three.js r.70



来源:https://stackoverflow.com/questions/29020613/three-js-issue-to-render-objects-using-canvasrenderer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!