Skip to content

hm5-types (source format) / SpriteSheet

Interface: SpriteSheet ​

a bitmap asset cut into equal cells (AssetMeta.sheet)

Properties ​

PropertyTypeDescription
cellHeightnumber-
cells?SheetCell[]IRREGULAR cells (TexturePacker JSON): cell i = cells[i], in order; the grid fields (cellWidth / cellHeight = the first cell's size, margin, spacing) are then only informative
cellWidthnumber-
count?numbercells actually used (the last row may be partly empty); absent = every whole cell of the grid
margin?numberpx kept free round the whole grid (left / top / right / bottom)
spacing?numberpx between neighbouring cells (both directions)

HereSplash — 2D animation for the web