MaterialData constructor

const MaterialData({
  1. String? name,
  2. (double, double, double, double) baseColor = (1.0, 1.0, 1.0, 1.0),
  3. TextureRef? baseColorTexture,
  4. double metallic = 1.0,
  5. double roughness = 1.0,
  6. TextureRef? metallicRoughnessTexture,
  7. TextureRef? normalTexture,
  8. double normalScale = 1.0,
  9. TextureRef? occlusionTexture,
  10. double occlusionStrength = 1.0,
  11. (double, double, double) emissive = (0.0, 0.0, 0.0),
  12. TextureRef? emissiveTexture,
  13. double emissiveStrength = 1.0,
  14. AlphaMode alphaMode = AlphaMode.opaque,
  15. double alphaCutoff = 0.5,
  16. bool doubleSided = false,
  17. bool unlit = false,
  18. UvMode uvMode = UvMode.natural,
  19. bool layered = false,
  20. (double, double, double, double) layerTiling = (1.0, 1.0, 1.0, 1.0),
})

A material; defaults are the glTF spec's.

Implementation

const MaterialData({
  this.name,
  this.baseColor = const (1.0, 1.0, 1.0, 1.0),
  this.baseColorTexture,
  this.metallic = 1.0,
  this.roughness = 1.0,
  this.metallicRoughnessTexture,
  this.normalTexture,
  this.normalScale = 1.0,
  this.occlusionTexture,
  this.occlusionStrength = 1.0,
  this.emissive = const (0.0, 0.0, 0.0),
  this.emissiveTexture,
  this.emissiveStrength = 1.0,
  this.alphaMode = AlphaMode.opaque,
  this.alphaCutoff = 0.5,
  this.doubleSided = false,
  this.unlit = false,
  this.uvMode = UvMode.natural,
  this.layered = false,
  this.layerTiling = const (1.0, 1.0, 1.0, 1.0),
});