Skip to main content

Function: createSpriteSheet()

createSpriteSheet(image, rows, columns): SpriteSheet

Defined in: animations/utilities/create-sprite-sheet.ts:23

Slices an image into a row-major grid of equally sized animation frames.

Parameters

image

The source image (or its dimensions) to slice.

height

number

width

number

rows

number

The number of rows in the sprite sheet.

columns

number

The number of columns in the sprite sheet.

Returns

SpriteSheet

A SpriteSheet containing the generated frames.