Reputation: 32391
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);
Upvotes: 4
Views: 4406
Reputation: 5452
From the shape example:
var points = shape.createPointsGeometry();
var line = new THREE.Line( points, new THREE.LineBasicMaterial({
color: 0xffffff
}));
scene.add(line);
Upvotes: 1
Reputation: 19602
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 );
Upvotes: 9