Primitive3D constructor

Primitive3D({
  1. String material = '',
  2. Color color = defaultColor,
  3. double metallic = 0.0,
  4. double roughness = 0.75,
  5. Color emission = const Color(0xFF000000),
  6. double emissionStrength = 1.0,
  7. double opacity = 1.0,
  8. bool unlit = false,
  9. String texture = '',
  10. Vector2? tiling,
  11. bool tileInMetres = false,
  12. bool castShadows = true,
  13. bool visible = true,
})

A shape with the given look; the defaults are a light grey, slightly rough, untextured surface.

Implementation

Primitive3D({
  this.material = '',
  this.color = defaultColor,
  this.metallic = 0.0,
  this.roughness = 0.75,
  this.emission = const Color(0xFF000000),
  this.emissionStrength = 1.0,
  this.opacity = 1.0,
  this.unlit = false,
  this.texture = '',
  Vector2? tiling,
  this.tileInMetres = false,
  this.castShadows = true,
  this.visible = true,
}) : tiling = tiling ?? Vector2(1, 1);