A sprite sheet: one image, its frames and its clips, which
defineSpriteSheet returns. A room reads its frames and clips and never
loads its image.
| Type Parameter |
Default type |
Clip extends string |
string |
| Property |
Type |
Description |
clips |
Readonly<Record<Clip, SpriteClip>> |
- |
filter |
"nearest" | "linear" |
- |
frames |
readonly SpriteSheetFrame[] |
- |
image |
string | PixelTexture |
The image’s URL, as the game’s import of it gives it, or the pixel texture a view paints it from. |
imageHeight |
number |
- |
imageWidth |
number |
The image’s size in pixels as the data gives it; for a grid, the least size its frames need. The image is checked against it when it loads. |
name |
string |
What errors name it by, such as “the sprite sheet hero.png”. |
pixelsPerMetre |
number |
- |