我刚刚从r59
升级到r62
并注意到线框CubeGeometry
现在在每张脸上都渲染了一条额外的对角线。有办法解决这个问题吗?
volumeGeometry = new THREE.CubeGeometry(w, h, depth);
volumeMaterial = new THREE.MeshBasicMaterial({
color : 0x0099ff,
wireframe : true
});
volumeMesh = new THREE.Mesh(volumeGeometry, volumeMaterial);
scene.add(volumeMesh);
答案 0 :(得分:9)
如果你想要的只是一个简单的线框立方体,你可以这样做:
var cube = new THREE.BoxHelper();
cube.material.color.setRGB( 1, 0, 0 );
cube.scale.set( 10, 10, 10 );
scene.add( cube );
答案 1 :(得分:1)
var points = shape.createPointsGeometry();
var line = new THREE.Line( points, new THREE.LineBasicMaterial({
color: 0xffffff
}));
scene.add(line);