TileSetOptions
What defineTileSet takes.
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
animations? |
Readonly<Record<number, TileAnimationOptions>> |
undefined |
Hand-written animations by tile: { 40: { frames: [40, 41, 42], durationSeconds: 0.2 } }. |
colliderHeight? |
number |
4 |
How far each collider stands out of the plane, in metres: up from the ground on Plane2D.Ground, and deep on Plane2D.Side. |
data? |
unknown |
undefined |
A Tiled tile set, as a .tsj import gives it: its tile size, margin, spacing, animations, collision shapes and properties. |
filter? |
"nearest" | "linear" | TextureFilter |
TextureFilter.Nearest |
How its image is sampled: Linear for art that is not pixel art. |
image |
string |
undefined |
The image’s URL, as the game’s import of its PNG gives it. |
margin? |
number |
0, or the data file’s |
- |
pixelsPerMetre? |
number |
16, the camera's |
- |
solid? |
readonly number[] |
undefined |
The tiles a body cannot pass. Left out, the tiles the data file gives a collision shape. |
spacing? |
number |
0, or the data file’s |
- |
tileSize? |
number | readonly [number, number] |
undefined |
A tile’s size in pixels, one number for a square tile. A Tiled data file gives its own, which this must match where both do. Godot’s TileSet takes 16 by 16 unless set. |