new Tileset(name, firstgid, width, height, margin, spacing, properties)
A Tile set is a combination of an image containing the tiles and collision data per tile.
Tilesets are normally created automatically when Tiled data is loaded.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
name | string | The name of the tileset in the map data. | ||
firstgid | integer | The first tile index this tileset contains. | ||
width | integer | <optional> | 32 | Width of each tile (in pixels). |
height | integer | <optional> | 32 | Height of each tile (in pixels). |
margin | integer | <optional> | 0 | The margin around all tiles in the sheet (in pixels). |
spacing | integer | <optional> | 0 | The spacing between each tile in the sheet (in pixels). |
properties | object | <optional> | {} | Custom Tileset properties. |
- Source code: tilemap/Tileset.js (Line 22)
Please login to continue.