How to use the FaceNormalsHelper function from three

Find comprehensive JavaScript three.FaceNormalsHelper code examples handpicked from public code repositorys.

199
200
201
202
203
204
205
206
207
208

group.add(wireframeObj)
group.add(mainObj)

let bb = new THREE.Box3().setFromObject(mainObj)
normalsHelper = new THREE.FaceNormalsHelper(mainObj, bb.getSize(new THREE.Vector3()).length() / 20, 0x0000ff, 1)
group.add(normalsHelper)

mainGeom.computeBoundingSphere()
computeObjectHeight()
fork icon2
star icon14
watch icon0

+ 2 other calls in file

190
191
192
193
194
195
196
197
198
199

scene.add(mainObject);

recognizeVertex('mainObject');

var facesNormals = new THREE.FaceNormalsHelper(mainObject, 0.2, 0xff0000, 0.2);
var vertexNormals = new THREE.VertexNormalsHelper(mainObject, 0.2, 0x000000, 0.2);
var wireframe = new THREE.WireframeGeometry(mainObject);
facesNormals.name = 'facesNormals';
// scene.add(facesNormals);
fork icon0
star icon1
watch icon0

27
28
29
30
31
32
33
34
35
   light.position.set( 200, -650, 100 );
   scene.add( light );
 }

const mesh = new THREE.Mesh( geometry, material );
 const helper = new THREE.FaceNormalsHelper( mesh, 20, 0x3366ff, 5 );

scene.add( mesh );
 scene.add( helper );
fork icon0
star icon0
watch icon0

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)