8

Is there something as Stroke to draw the edges of a mesh?

I would like to have my object to look like this:

Black stroked, white filled object

WestLangley
  • 97,891
  • 9
  • 255
  • 258
Ph1
  • 331
  • 4
  • 12

1 Answers1

10

EDIT: This answer was outdated, and has been updated.


If you want to render only the edges of your mesh, you can use EdgesGeometry.

var geometry = new THREE.EdgesGeometry( mesh.geometry );

var material = new THREE.LineBasicMaterial( { color: 0xffffff } );

var wireframe = new THREE.LineSegments( geometry, material );

scene.add( wireframe );

You can also use THREE.WireframeGeometry.

For an example showing how to render both edges and faces, see this stackoverflow answer.

three.js r.94

WestLangley
  • 97,891
  • 9
  • 255
  • 258