I am attempting to utilize FaceNormalsHelper
from the file
three.js/src/extras/helpers/FaceNormalsHelper.js
, but it is producing an error:
TypeError: this.update is not a function
this.update();
The error is occurring at line 32 in the specified file. Here is how I am making the call (pay attention to the last line):
var customMesh = function createCustomMesh(aGeometry, position, color, name, woodTexture, debug) {
var texture,
material,
mesh;
if (woodTexture) {
texture = THREE.ImageUtils.loadTexture( 'crate.gif' );
texture.anisotropy = makeRenderer.renderer.getMaxAnisotropy();
material = new THREE.MeshBasicMaterial( { map: texture } );
} else {
material = new THREE.MeshBasicMaterial( { color: color, wireframe: true, side: THREE.DoubleSide } );
}
mesh = new THREE.Mesh(aGeometry, material);
if (debug) {
var normals = THREE.FaceNormalsHelper( mesh );
console.log("normals: ", normals);
}
mesh.position.set = position;
mesh.name = name;
mesh.callback = function() { makeDOMelements.info.innerHTML = name; };
makeScene.scene.add( mesh );
};
Object.freeze(customMesh);
return customMesh;
}
customMesh( myBox3, new THREE.Vector3( 0, 0, 0 ), 0x3bf5de, "my test Box3", true, true );