SurfaceMaterial constructor

SurfaceMaterial({
  1. String? name,
  2. Vector4? baseColor,
  3. double metallic = 0.0,
  4. double roughness = 0.5,
  5. TextureBinding? baseColorTexture,
  6. TextureBinding? metallicRoughnessTexture,
  7. TextureBinding? normalTexture,
  8. double normalScale = 1.0,
  9. TextureBinding? occlusionTexture,
  10. double occlusionStrength = 1.0,
  11. TextureBinding? emissiveTexture,
  12. Vector3? emissive,
  13. double emissiveStrength = 1.0,
  14. SurfaceAlphaMode alphaMode = SurfaceAlphaMode.opaque,
  15. double alphaCutoff = 0.5,
  16. bool doubleSided = false,
  17. bool unlit = false,
  18. LightingModel? lightingModel,
  19. Map<String, Object?>? extras,
})

Implementation

SurfaceMaterial({
  this.name,
  Vector4? baseColor,
  this.metallic = 0.0,
  this.roughness = 0.5,
  this.baseColorTexture,
  this.metallicRoughnessTexture,
  this.normalTexture,
  this.normalScale = 1.0,
  this.occlusionTexture,
  this.occlusionStrength = 1.0,
  this.emissiveTexture,
  Vector3? emissive,
  this.emissiveStrength = 1.0,
  this.alphaMode = SurfaceAlphaMode.opaque,
  this.alphaCutoff = 0.5,
  this.doubleSided = false,
  this.unlit = false,
  this.lightingModel,
  this.extras,
}) : baseColor = baseColor ?? Vector4(1.0, 1.0, 1.0, 1.0),
     emissive = emissive ?? Vector3.zero();