generateVertexTexCoords method Null safety

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

Implementation

void generateVertexTexCoords(
    Vector2List texCoords, Vector3List positions, Uint16List indices) {
  for (var i = 0; i < positions.length; ++i) {
    final p = positions[i];

    // These are TERRIBLE texture coords, but it's better than nothing.
    // Override this function and put better ones in place!
    texCoords[i] = Vector2(p.x + p.z, p.y + p.z);
  }
}