TiledTileset

Extends: roAssociativeArray

A tileset, embedded in the map or loaded from an external .tsj. Spritesheet tilesets have an image cut into a grid; image collections have no image and one image per tile.

Properties

  • firstGid (integer)
  • name (string)
  • tileCount (integer)
  • columns (integer) — 0 for an image collection
  • tileWidth (integer)
  • tileHeight (integer)
  • margin (integer)
  • spacing (integer)
  • image (string) — Full path to a spritesheet's image; "" for an image collection
  • imageWidth (integer)
  • imageHeight (integer)
  • tileOffsetX (integer) — Pixel offset to draw every tile at (Tiled's tileoffset; +y is down, as in Tiled)
  • tileOffsetY (integer)
  • tileRenderSize (string) — "tile" draws each tile at its own size; "grid" stretches it to the map's cell size
  • fillMode (string) — How a "grid"-sized tile fills its cell: "stretch", or "preserve-aspect-fit" (scaled
  • tiles (roAssociativeArray) — Local id (as a string) -> TiledTile, for tiles that have one
  • properties (roAssociativeArray)