How to use the FaceNormalsHelper function from three
Find comprehensive JavaScript three.FaceNormalsHelper code examples handpicked from public code repositorys.
GitHub: OpenSlicer/OpenSlicer
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()
2
14
0
+ 2 other calls in file
GitHub: Cherna/cherna.github.io
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);
0
1
0
GitHub: paulsuda/threejs-doodle
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 );
0
0
0
three.Vector3 is the most popular function in three (22341 examples)