Create a tile info object
pos Vector2 optional, default vec2()Top left corner of tile in pixels
size Vector2 optionalSize of tile in pixels
textureInfo TextureInfo optionalTexture info to use
padding number optionalHow many pixels padding around all sides of each tile (increases grid size, does not affect tile size)
bleed number optionalHow many pixels smaller to shrink UVS of tiles (does not affect grid size, only UVs)
columns number optional, default 0How many frames per row for frame(), 0 to keep frames on a single row
Shrinks tile by this many pixels to prevent neighbors bleeding
How many frames per row for frame(), 0 to keep frames on a single row
How many pixels padding around tiles
Top left corner of tile in pixels
The texture info for this tile
A tile set's tiles, each wherever it was packed, as loadTiles makes
them: a tile layer given this tile info draws its tile n from tiles[n] and not from a grid on one sheet
Returns a copy of this tile offset by a number of animation frames
Frames wrap down to the next row if columns is set
frame numberOffset to apply in animation frames
Returns a tile info for an index using this tile's size, texture and padding as reference
- the index counts from the texture's origin like tile(), for a sprite packed in a texture sheet use frame()
index Vector2|number optional, default 0
Returns a copy of this tile offset by a vector
offset Vector2Offset to apply in pixels
Set how many frames per row this tile uses, so frame() can wrap
columns number optional, default 0Frames per row, 0 to keep frames on a single row
Set this tile to use a full image in a texture info
textureInfo TextureInfo optional