API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classTiledTileset
@codexo/exojs-tiled / tiled / stable
A parsed Tiled tileset - either embedded inline in a map's `tilesets` array, or parsed from an external `.tsj` file referenced by it. firstGid and lastGid define the inclusive range of global tile ids (after masking flip/rotation flags via `maskTiledGid`) that this tileset owns within its owning TiledMap.
21
props
2
methods
0
events
Import
import { TiledTileset } from '@codexo/exojs-tiled'A parsed Tiled tileset - either embedded inline in a map's `tilesets` array, or parsed from an external `.tsj` file referenced by it.
firstGid and lastGid define the inclusive range of global tile ids (after masking flip/rotation flags via `maskTiledGid`) that this tileset owns within its owning TiledMap.
Constructors1
new(data: TiledTilesetDataA Tiled tileset, as the root of a standalone `.tsj` file or (minus `firstgid`) embedded inline in a map's `tilesets` array., firstGid: number, resources: TiledTilesetResourcesLoader-resolved resources for a TiledTileset: the absolute image URL(s) and the Texture instance(s) loaded for them. All textures are owned by the `Loader` cac…): TiledTilesetMethods2
Looks up a custom property by name.
Looks up a per-tile definition by local tile id.
Properties21
class: stringcolumns: numberfirstGid: numberFirst global tile id owned by this tileset.
imageHeight?: numberimageUrl?: stringResolved URL of the tileset's atlas image, or undefined for a collection-of-images tileset.
imageWidth?: numbermargin: numbername: stringWhere a tile object's stored position sits within its bounding box. undefined (and 'unspecified') means Tiled's orientation-dependent default - resolve it with import('./objectAlignment').resolveTiledObjectAlignment.
source?: stringResolved URL of the external .tsj file, or undefined for an embedded tileset.
spacing: numberTexture loaded for imageUrl. Loader-owned; not destroyed by TiledMap.destroy.
tileCount: numbertileHeight: numberTextures loaded for collection-of-images tiles, keyed by local tile id. Loader-owned.
tileWidth: numberWang sets (terrain/auto-tile definitions) declared on this tileset. Empty when none are defined.
lastGid: numberLast global tile id (inclusive) owned by this tileset. Empty (lastGid < firstGid) when tileCount is 0.
Source