2
votes

I want to be able to show or hide the diagonal lines in the wireframe of my PlaneGeometry mesh, as well as being able to show or hide vertical or horizontal lines. Is there a way to do this and retain the triangles in my mesh? I already have 'wireframe: true' set on the material and can color it. I've been able to do this in the past with OpenGL, is it possible with Three.js?

1
One option is to use a THREE.Line to manually draw the wireframe you want. You can start with your existing geometry and just put the vertices into a path in the appropriate order.IceCreamYou

1 Answers

2
votes

You can use, or modify to your liking, src/extras/helpers/GridHelper.js.

There is also src/extras/helpers/WireframeHelper.js.

See http://threejs.org/examples/webgl_helpers.html

EDIT: THREE.EdgesHelper has been added to the library. It will not render the diagonal lines of flat faces.

three.js. r.65