Skip to content

simulo.Material

Base material class.

The base type carries the visual attributes (color/opacity) common to every concrete material the backend understands. Subclasses extend with their own properties (e.g. SurfaceMaterial.roughness). Hoisting color/opacity to the base keeps the backend’s item.material.color access type-safe without forcing each call site to narrow to the subclass.

Attributes:

  • color — RGB color as (r, g, b) in [0, 1]
  • opacity — Opacity in [0, 1]
simulo.Material(color: Tuple[float, float, float] = (0.8, 0.8, 0.8), opacity: float = 1.0)