me.TMXTileset(tileset)

new TMXTileset(tileset)

a TMX Tile Set Object

Parameters:
Name Type Description
tileset Object

tileset data in JSON format (http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#tileset)

Extends

Members

isAnimated :Boolean

Tileset contains animated tiles

isCollection :Boolean

true if the tileset is a "Collection of Image" Tileset

Methods

contains(gid) → {Boolean}

return true if the gid belongs to the tileset

Parameters:
Name Type Description
gid Number
Returns:
Boolean

getTileImage(gid) → {Image}

return the tile image from a "Collection of Image" tileset

Parameters:
Name Type Description
gid Number
Returns:
Image -

corresponding image or undefined

getTileProperties(tileId) → {Object}

return the properties of the specified tile

Parameters:
Name Type Description
tileId Number
Returns:
Object

getViewTileId(gid) → {Number}

Get the view (local) tile ID from a GID, with animations applied

Parameters:
Name Type Description
gid Number

Global tile ID

Returns:
Number -

View tile ID