TextureAtlas constructor
TextureAtlas({})
Creates an atlas of columns x rows tiles, each tileSize texels
square, separated by padding texels of gutter. The PBR maps are
optional so the UV math can be used (and unit tested) on its own.
Implementation
TextureAtlas({
required this.columns,
required this.rows,
required this.tileSize,
this.padding = 0,
this.baseColor,
this.metallicRoughness,
this.normal,
this.occlusion,
}) : assert(columns > 0),
assert(rows > 0),
assert(tileSize > 0),
assert(padding >= 0);