3
votes

I have just upgraded from r59 to r62 and noticed that the wireframe CubeGeometry has now rendered an extra diagonal line on each face. Is there a way to fix this?

volumeGeometry = new THREE.CubeGeometry(w, h, depth);
volumeMaterial = new THREE.MeshBasicMaterial({
      color : 0x0099ff,
      wireframe : true
    });
volumeMesh = new THREE.Mesh(volumeGeometry, volumeMaterial);
scene.add(volumeMesh);
2

2 Answers

9
votes

If all you want is a simple wireframe cube you can do this:

var cube = new THREE.BoxHelper();
cube.material.color.setRGB( 1, 0, 0 );
cube.scale.set( 10, 10, 10 );
scene.add( cube );
1
votes

From the shape example:

var points = shape.createPointsGeometry();
var line = new THREE.Line( points, new THREE.LineBasicMaterial({
            color: 0xffffff
        }));
scene.add(line);