API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceLdtkData
@codexo/exojs-ldtk / ldtk / stable
Root LDtk JSON document (`*.ldtk`).
8
props
0
methods
0
events
Import
import { LdtkData } from '@codexo/exojs-ldtk'Root LDtk JSON document (`*.ldtk`).
Properties8
bgColor?: stringdefaultGridSize?: numberjsonVersion: stringLDtk JSON format version string (e.g. "1.5.3").
levels: readonly LdtkLevelA level in the LDtk world.[]Levels not organised into worlds. Always populated for pre-multi-world documents; kept EMPTY (per the LDtk spec's backward-compatibility rule) when worlds is used instead - read levels via worlds[].levels in that case, or use import('./ldtkLevelEntries').getLdtkLevelEntries (or simply import('./LdtkMap').LdtkMap.levels / import('./LdtkMap').LdtkMap.getLevelByName) to get "all levels, in order" regardless of which shape the document uses.
worldGridHeight?: numberworldGridWidth?: numberWorlds, present and non-empty only when the project has "Multi-Worlds" enabled in its advanced settings. Absent or empty for the (overwhelmingly common) single-world case, in which levels live directly in the root levels array instead. defs is NOT duplicated per-world - it stays declared once at the document root regardless of this field.
Source