3

我刚刚从r59to升级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);
4

2 回答 2

9

如果你想要的只是一个简单的线框立方体,你可以这样做:

var cube = new THREE.BoxHelper();
cube.material.color.setRGB( 1, 0, 0 );
cube.scale.set( 10, 10, 10 );
scene.add( cube );
于 2013-11-07T11:14:38.473 回答
1

形状示例

var points = shape.createPointsGeometry();
var line = new THREE.Line( points, new THREE.LineBasicMaterial({
            color: 0xffffff
        }));
scene.add(line);
于 2013-11-08T15:17:52.420 回答