0

In Three.js is there a simple way of adding a wireframe on top of a geometry? I want it to be able to go on/off, and move with the original geometry. Thanks in advance.

CoderMuffin
  • 519
  • 1
  • 10
  • 21

1 Answers1

1

Yes, you can use THREE.WireframeGeometry for this. A WireframeGeometry can be used to create an instance of THREE.LineSegments that can be added as a child to your actual 3D object. In this way, it keeps the transformation of its parent. Check out the following demo to see this approach in action:

https://jsfiddle.net/y1v2q4p6/2/

Mugen87
  • 28,829
  • 4
  • 27
  • 50