Face3 constructor

Face3(
  1. dynamic a,
  2. dynamic b,
  3. dynamic c,
  4. dynamic normal,
  5. dynamic color, {
  6. int materialIndex = 0,
})

Implementation

Face3(a, b, c, normal, color, {int materialIndex = 0}) {
  this.a = a;
  this.b = b;
  this.c = c;

  this.normal = (normal != null && normal.runtimeType == THREE.Vector3)
      ? normal
      : new THREE.Vector3.init();
  this.vertexNormals = normal != null ? normal : [];

  this.color = (color != null && color.runtimeType == THREE.Color)
      ? color
      : new THREE.Color(0, 0, 0);
  this.vertexColors = color != null ? color : [];

  this.materialIndex = materialIndex;
}