Documentation
¶
Overview ¶
Package spritesheet builds asset.Sheet region maps from texture bounds. It describes slicing without loading, saving, or modifying image pixels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Grid ¶
func Grid(texture asset.ID, bounds image.Rectangle, tileWidth, tileHeight int, prefix string) (*asset.Sheet, error)
Grid creates a sheet of equally sized regions within bounds, named prefix_0, prefix_1, and so on in row-major order. Bounds must be non-empty and non-negative, tile dimensions positive and evenly divide bounds, and prefix non-empty. Texture is a root-relative asset path; Grid performs no I/O.
Types ¶
This section is empty.