Tileset#Tileset

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)
doc_phaser
2017-02-14 11:16:53
Comments
Leave a Comment

Please login to continue.