generateVertexTexCoords method

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

Implementation

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

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

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

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

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

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