normalizeNormals method

void normalizeNormals()
inherited

Every normal vector in a geometry will have a magnitude of 1. This will correct lighting on the geometry surfaces.

Implementation

void normalizeNormals() {
  final normals = attributes["normal"];

  for (int i = 0, il = normals.count; i < il; i++) {
    _bufferGeometryvector.fromBuffer(normals, i);
    _bufferGeometryvector.normalize();
    normals.setXYZ(i, _bufferGeometryvector.x, _bufferGeometryvector.y,_bufferGeometryvector.z);
  }
}