generateTopUV static method

dynamic generateTopUV(
  1. dynamic geometry,
  2. dynamic vertices,
  3. num indexA,
  4. num indexB,
  5. num indexC,
)

Implementation

static generateTopUV(geometry, vertices, num indexA, num indexB, num indexC) {
  var aX = vertices[indexA.toInt() * 3];
  var aY = vertices[indexA.toInt() * 3 + 1];
  var bX = vertices[indexB.toInt() * 3];
  var bY = vertices[indexB.toInt() * 3 + 1];
  var cX = vertices[indexC.toInt() * 3];
  var cY = vertices[indexC.toInt() * 3 + 1];

  return [
    Vector2(aX, aY), Vector2(bX, bY), Vector2(cX, cY)
  ];
}