A sheet cut from one image as a grid of frames of one size, as most
pixel packs ship.
| Type Parameter |
Clip extends string |
| Property |
Type |
Default value |
Description |
clips? |
Readonly<Record<Clip, SpriteGridClipOptions>> |
undefined |
The clips, which type Sprite’s clip. Left out, the sheet is one clip, all, of frameCount frames of durationSeconds each. |
columns |
number |
undefined |
Frames across the image, Godot’s hframes: a room cuts the grid with no image to measure. |
data? |
undefined |
undefined |
- |
durationSeconds? |
number |
undefined |
Seconds each frame of the all clip shows. |
filter? |
"nearest" | "linear" | TextureFilter |
TextureFilter.Nearest |
How its image is sampled: Linear for art that is not pixel art. |
frameCount? |
number |
undefined |
The grid’s frames: the most its clips name, unless set. |
frameSize |
readonly [number, number] |
undefined |
A frame’s width and height in pixels. |
image |
string | PixelTexture |
undefined |
The image’s URL: an import of the PNG, such as import heroImage from "../sprites/hero.png". Or a painted definePixelTexture, which a view paints on first use from the game’s texture seed and a room never paints: Unity’s Sprite.Create over a Texture2D filled with SetPixels, Godot’s SpriteFrames over an ImageTexture of a painted Image. |
margin? |
number |
0 |
Pixels round the grid’s edge, and between two frames, Godot’s margin and separation. |
pixelsPerMetre? |
number |
a painted image’s own, otherwise 16 |
How many of the art’s pixels make a metre, the scene’s Camera2D’s. |
spacing? |
number |
undefined |
- |