TMXTileset
class TMXTileset
a TMX Tile Set Object
Constructor
new TMXTileset(tileset: object) → {}
Name | Type | Description |
---|---|---|
tileset | object |
tileset data in JSON format (http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#tileset) |
Summary
Properties from TMXTileset
boolean |
|
boolean |
|
boolean |
|
Methods from TMXTileset
boolean |
|
Image |
|
object |
|
number |
|
Public Properties
isCollection: boolean = false
boolean
true if the tileset is a "Collection of Image" Tileset
Public Methods
contains(gid: number) → {boolean}
return true if the gid belongs to the tileset
Name | Type | Description |
---|---|---|
gid | number |
Type | Description |
---|---|
boolean |
getTileImage(gid: number) → {Image}
return the tile image from a "Collection of Image" tileset
Name | Type | Description |
---|---|---|
gid | number |
Type | Description |
---|---|
Image |
corresponding image or undefined |
getTileProperties(tileId: number) → {object}
return the properties of the specified tile
Name | Type | Description |
---|---|---|
tileId | number |
Type | Description |
---|---|
object |
getViewTileId(gid: number) → {number}
Get the view (local) tile ID from a GID, with animations applied
Name | Type | Description |
---|---|---|
gid | number |
Global tile ID |
Type | Description |
---|---|
number |
View tile ID |