Constructor


Tileset(data: any, path: any, base_dir: any)

Arguments:

data: any
path: any
base_dir: any




Methods


Tileset:addTileToBatch(batch: love.SpriteBatch, id: any, x: any, y: any, gw: any, gh: any, flip_x: any, flip_y: any, flip_diag: any)

Arguments:

batch: love.SpriteBatch

Using a single image, draw any number of identical copies of the image using a single call to love.graphics.draw(). This can be used, for example, to draw repeating copies of a single background image with high performance.

A SpriteBatch can be even more useful when the underlying image is a texture atlas (a single image file containing many independent images); by adding Quads to the batch, different sub-images from within the atlas can be drawn.

Open in Browser

id: any
x: any
y: any
gw: any
gh: any
flip_x: any
flip_y: any
flip_diag: any




Tileset:drawGridTile(id: any, x: any, y: any, gw: any, gh: any, flip_x: any, flip_y: any, flip_diag: any)

Arguments:

id: any
x: any
y: any
gw: any
gh: any
flip_x: any
flip_y: any
flip_diag: any


Tileset:drawTile(id: any, x: any, y: any, ...: unknown)

Arguments:

id: any
x: any
y: any
...: unknown


Tileset:getAnimation(id: any)

Arguments:

id: any

Returns:

1: unknown


Tileset:getDrawTile(id: any)

Arguments:

id: any

Returns:

1: unknown


Tileset:getGridTile(id: any, x: any, y: any, gw: any, gh: any, flip_x: any, flip_y: any, flip_diag: any)

Arguments:

id: any
x: any
y: any
gw: any
gh: any
flip_x: any
flip_y: any
flip_diag: any

Returns:

quad: love.Quad
x: number
y: number
rotation_radians: number
scale_x: number
scale_y: number
ox: number
oy: number


Tileset:getTileSize(id: any)

Arguments:

id: any

Returns:

1: integer
2: integer


Tileset:loadTextureFromImagePath(filename: any)

Arguments:

filename: any

Returns:

1: boolean
2: string|"not under prefix"|"path outside root"



Fields




Undocumented