/** * a TMX Tile Set Object * @category Tilemap */ export default class TMXTileset { /** * @param {object} tileset - tileset data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#tileset}) * @param {number} [mapTilewidth] - the map's tile grid width in pixels * @param {number} [mapTileheight] - the map's tile grid height in pixels */ constructor(tileset: object, mapTilewidth?: number, mapTileheight?: number); /** * the first global tile ID of this tileset * @type {number} */ firstgid: number; /** * the last global tile ID of this tileset * @type {number} */ lastgid: number; /** * the tileset name * @type {string} */ name: string; /** * the width of each tile in pixels * @type {number} */ tilewidth: number; /** * the height of each tile in pixels * @type {number} */ tileheight: number; /** * the spacing between tiles in pixels * @type {number} * @default 0 */ spacing: number; /** * the margin around tiles in pixels * @type {number} * @default 0 */ margin: number; /** * tile drawing offset * @type {Vector2d} */ tileoffset: Vector2d; /** * Tileset contains animated tiles * @type {boolean} */ isAnimated: boolean; /** * true if the tileset is a "Collection of Image" Tileset * @type {boolean} */ isCollection: boolean; /** * the tileset class (since Tiled 1.9, renamed back to type on tile/object in 1.10) * @type {string} */ class: string; /** * how tiles render relative to the grid (since Tiled 1.9) * @type {string} * @default "tile" */ tilerendersize: string; /** * fill mode when tiles are not rendered at native size (since Tiled 1.9) * @type {string} * @default "stretch" */ fillmode: string; /** * Tileset animations * @private * @type {Map} */ private animations; image: any; texture: any; atlas: any; /** * return the tile image from a "Collection of Image" tileset * @param {number} gid * @returns {HTMLImageElement|HTMLCanvasElement|undefined} corresponding image or undefined */ getTileImage(gid: number): HTMLImageElement | HTMLCanvasElement | undefined; /** * return true if the gid belongs to the tileset * @param {number} gid * @returns {boolean} */ contains(gid: number): boolean; /** * Get the view (local) tile ID from a GID, with animations applied * @param {number} gid - Global tile ID * @returns {number} View tile ID */ getViewTileId(gid: number): number; /** * return the properties of the specified tile * @param {number} tileId - global tile ID * @returns {object|undefined} tile properties or undefined */ getTileProperties(tileId: number): object | undefined; } import { Vector2d } from "../../math/vector2d.ts"; //# sourceMappingURL=TMXTileset.d.ts.map