API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classTiledMap
A parsed and validated Tiled map (`.tmj`). `TiledMap` represents the parsed Tiled source format. `TileMap` is the format-independent ExoJS runtime map used for rendering, queries, and mutation. Construction validates that tilesets cover a non-overlapping, duplicate-free range of global tile ids, and that every GID referenced by layers (tile layer cells, infinite-map chunks, and tile object `gid`s) falls within one of those ranges. Both checks throw TiledFormatError on failure.
import { TiledMap } from '@codexo/exojs-tiled'A parsed and validated Tiled map (`.tmj`).
`TiledMap` represents the parsed Tiled source format. `TileMap` is the format-independent ExoJS runtime map used for rendering, queries, and mutation.
Construction validates that tilesets cover a non-overlapping, duplicate-free range of global tile ids, and that every GID referenced by layers (tile layer cells, infinite-map chunks, and tile object `gid`s) falls within one of those ranges. Both checks throw TiledFormatError on failure.
new(source: string, data: TiledMapDataThe root of a `.tmj` map file., tilesets: readonly TiledTilesetA 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 defi…[], imageTextures: ReadonlyMap<number, TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…>): TiledMapdestroy(): voidfindTilesetForGid(gid: number): TiledTilesetA 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 defi… | undefinedgetChunkSource(layerId: number): ChunkSourceSupplies chunk data for one import('./TileLayer').TileLayer on demand, keyed by signed chunk coordinates - the abstraction a import('./ChunkStreamer').ChunkStr… | undefinedbackgroundColor?: stringclass: stringheight: numberinfinite: booleansource: stringtileHeight: numbertileWidth: numberwidth: number