API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classMapWorld
A format-neutral description of how levels are laid out in a world. A `MapWorld` holds metadata only - no tiles, no textures, no runtime maps. It is what a game reads to decide which levels it needs; loading them is import('./MapWorldRuntime').MapWorldRuntime's job. Adapters build one from their source document (`@codexo/exojs-ldtk` does so from a `.ldtk` project). A format with no world concept of its own - Tiled, today - can be described by constructing one directly from whatever placement data the game keeps.
import { MapWorld } from '@codexo/exojs-tilemap'A format-neutral description of how levels are laid out in a world.
A `MapWorld` holds metadata only - no tiles, no textures, no runtime maps. It is what a game reads to decide which levels it needs; loading them is import('./MapWorldRuntime').MapWorldRuntime's job.
Adapters build one from their source document (`@codexo/exojs-ldtk` does so from a `.ldtk` project). A format with no world concept of its own - Tiled, today - can be described by constructing one directly from whatever placement data the game keeps.
new(options: MapWorldOptionsConstruction options for a MapWorld.): MapWorldgetLevel(id: string): MapLevelImmutable metadata for one level of a MapWorld - everything needed to decide whether to load it, without loading it. | undefinedgetLevelByName(name: string): MapLevelImmutable metadata for one level of a MapWorld - everything needed to decide whether to load it, without loading it. | undefinedgetNeighbours(id: string): readonly MapLevelImmutable metadata for one level of a MapWorld - everything needed to decide whether to load it, without loading it.[]name: string