VertexNormalsHelper constructor
VertexNormalsHelper(
- dynamic object, [
- dynamic size = 1,
- dynamic color = 0xff0000
Implementation
factory VertexNormalsHelper(object, [size = 1, color = 0xff0000]) {
var geometry = new BufferGeometry();
var nNormals = object.geometry.attributes["normal"].count;
var positions =
new Float32BufferAttribute(Float32Array(nNormals * 2 * 3), 3, false);
geometry.setAttribute('position', positions);
var vnh = VertexNormalsHelper.create(
geometry, new LineBasicMaterial({"color": color, "toneMapped": false}));
vnh.object = object;
vnh.size = size;
vnh.type = 'VertexNormalsHelper';
//
vnh.matrixAutoUpdate = false;
vnh.update();
return vnh;
}