Mesh constructor

Mesh({
  1. List<Vector3>? vertices,
  2. List<Offset>? texcoords,
  3. List<Polygon>? indices,
  4. List<Color>? colors,
  5. Image? texture,
  6. Rect? textureRect,
  7. String? texturePath,
  8. Material? material,
  9. String? name,
})

Implementation

Mesh({List<Vector3>? vertices, List<Offset>? texcoords, List<Polygon>? indices, List<Color>? colors, this.texture, Rect? textureRect, this.texturePath, Material? material, this.name}) {
  this.vertices = vertices ?? <Vector3>[];
  this.texcoords = texcoords ?? <Offset>[];
  this.colors = colors ?? <Color>[];
  this.indices = indices ?? <Polygon>[];
  this.material = material ?? Material();
  this.textureRect = textureRect ?? Rect.fromLTWH(0, 0, texture?.width.toDouble() ?? 1.0, texture?.height.toDouble() ?? 1.0);
}