TileSprite#addChildAt()

addChildAt(child, index) → {DisplayObject} Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown Parameters Name Type Description child DisplayObject The child to add index Number The index to place the child in Returns DisplayObject - The child that was added. Inherited From PIXI.DisplayObjectContainer#addChildAt Source code: pixi/display/DisplayObjectContainer.js (Line 55)

TileSprite#addChild()

addChild(child) → {DisplayObject} Adds a child to the container. Parameters Name Type Description child DisplayObject The DisplayObject to add to the container Returns DisplayObject - The child that was added. Inherited From PIXI.DisplayObjectContainer#addChild Source code: pixi/display/DisplayObjectContainer.js (Line 42)

Tileset#total

[readonly] total : integer The total number of tiles in the tileset. Source code: tilemap/Tileset.js (Line 109)

Tileset#tileWidth

[readonly] tileWidth : integer The width of each tile (in pixels). Source code: tilemap/Tileset.js (Line 47)

Tileset#tileSpacing

[readonly] tileSpacing : integer The spacing between each tile in the sheet (in pixels).Use setSpacing to change. Source code: tilemap/Tileset.js (Line 71)

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

Tileset#tileMargin

[readonly] tileMargin The margin around the tiles in the sheet (in pixels).Use setSpacing to change. Properties: Name Type Description tileMarge integer Source code: tilemap/Tileset.js (Line 63)

Tileset#tileHeight

[readonly] tileHeight : integer The height of each tile (in pixels). Source code: tilemap/Tileset.js (Line 54)

Tileset#setSpacing()

setSpacing(margin, spacing) Sets tile spacing and margins. Parameters Name Type Argument Default Description margin integer <optional> 0 The margin around the tiles in the sheet (in pixels). spacing integer <optional> 0 The spacing between the tiles in the sheet (in pixels). Source code: tilemap/Tileset.js (Line 185)

Tileset#setImage()

setImage(image) Set the image associated with this Tileset and update the tile data. Parameters Name Type Description image Image The image that contains the tiles. Source code: tilemap/Tileset.js (Line 171)