Line

FaceNormalsHelper

Renders arrows to visualize an object's face normals. Requires that the object's geometry be an instance of Geometry (does not work with BufferGeometry), and that face normals have been specified on all faces or calculated with computeFaceNormals.

Example

geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 ); material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); object = new THREE.Mesh( geometry, material ); edges = new THREE.FaceNormalsHelper( object, 2, 0x00ff00, 1 ); scene.add( object ); scene.add( edges ); Example using various helpers

Constructor

FaceNormalsHelper( object, size, color, linewidth )

object -- object for which to render face normals
size -- size (length) of the arrows
color -- color of the arrows
linewidth -- width of the arrow lines

Properties

.object

The attached object

Methods

.update ()

Updates the face normal preview based on movement of the object.

Source

src/extras/helpers/FaceNormalsHelper.js
Edit