1681-engine / pixel / makeSheet
Function: makeSheet() ​
ts
function makeSheet(frames, maxWidth?): HTMLCanvasElement;Defined in: src/pixel/pixel.ts:410
Packs same-sized frames into rows no wider than maxWidth. A browser refuses a canvas past about 16k pixels on a side and hands back a blank one, and a player sheet of six hundred frames at twice the detail is wider than that, so it wraps. Readers work the row out from the canvas width.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
frames | PixelGrid[] | undefined |
maxWidth | number | 16384 |
Returns ​
HTMLCanvasElement