API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

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?: string
defaultGridSize?: number
jsonVersion: string
LDtk JSON format version string (e.g. "1.5.3").
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?: number
worldGridWidth?: number
Worlds, 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