generateVertexTexCoords method

  1. @override
void generateVertexTexCoords(
  1. Vector2List texCoords,
  2. Vector3List positions,
  3. Uint16List indices
)
override

Implementation

@override
void generateVertexTexCoords(
    Vector2List texCoords, Vector3List positions, Uint16List indices) {
  // Front
  texCoords[0] = Vector2(1.0, 0.0);
  texCoords[1] = Vector2(0.0, 0.0);
  texCoords[2] = Vector2(0.0, 1.0);
  texCoords[3] = Vector2(1.0, 1.0);

  // Back
  texCoords[4] = Vector2(0.0, 1.0);
  texCoords[5] = Vector2(1.0, 1.0);
  texCoords[6] = Vector2(1.0, 0.0);
  texCoords[7] = Vector2(0.0, 0.0);

  // Right
  texCoords[8] = Vector2(0.0, 1.0);
  texCoords[9] = Vector2(1.0, 1.0);
  texCoords[10] = Vector2(1.0, 0.0);
  texCoords[11] = Vector2(0.0, 0.0);

  // Left
  texCoords[12] = Vector2(1.0, 0.0);
  texCoords[13] = Vector2(0.0, 0.0);
  texCoords[14] = Vector2(0.0, 1.0);
  texCoords[15] = Vector2(1.0, 1.0);

  // Top
  texCoords[16] = Vector2(1.0, 1.0);
  texCoords[17] = Vector2(1.0, 0.0);
  texCoords[18] = Vector2(0.0, 0.0);
  texCoords[19] = Vector2(0.0, 1.0);

  // Bottom
  texCoords[20] = Vector2(0.0, 0.0);
  texCoords[21] = Vector2(0.0, 1.0);
  texCoords[22] = Vector2(1.0, 1.0);
  texCoords[23] = Vector2(1.0, 0.0);
}