SpriteSheet.fromColumnsAndRows constructor
SpriteSheet.fromColumnsAndRows({})
Implementation
SpriteSheet.fromColumnsAndRows({
required this.image,
required this.columns,
required this.rows,
this.spacing = 0,
this.margin = 0,
}) : srcSize = Vector2(
(image.width - 2 * margin - (columns - 1) * spacing) / columns,
(image.height - 2 * margin - (rows - 1) * spacing) / rows,
);