SpriteSheet constructor
SpriteSheet({})
Creates a sprite sheet given the image and the tile size.
Implementation
SpriteSheet({
required this.image,
required this.srcSize,
this.margin = 0,
this.spacing = 0,
}) : columns = (image.width - 2 * margin + spacing) ~/ (srcSize.x + spacing),
rows = (image.height - 2 * margin + spacing) ~/ (srcSize.y + spacing);