Skip to content

1681-engine / index / LdtkLevel

Interface: LdtkLevel ​

Defined in: src/tilemap/ldtk.ts:51

Properties ​

bgColor ​

ts
bgColor: string;

Defined in: src/tilemap/ldtk.ts:61


entities ​

ts
entities: LdtkEntity[];

Defined in: src/tilemap/ldtk.ts:70


externalRelPath? ​

ts
optional externalRelPath?: string;

Defined in: src/tilemap/ldtk.ts:72

The separate .ldtkl file this level lives in, relative to the project, when the project saves levels apart.


fields ​

ts
fields: Record<string, LdtkFieldValue>;

Defined in: src/tilemap/ldtk.ts:62


identifier ​

ts
identifier: string;

Defined in: src/tilemap/ldtk.ts:52


iid ​

ts
iid: string;

Defined in: src/tilemap/ldtk.ts:53


intGrids ​

ts
intGrids: Map<string, LdtkIntGrid>;

Defined in: src/tilemap/ldtk.ts:69


loaded ​

ts
loaded: boolean;

Defined in: src/tilemap/ldtk.ts:74

False for an external level whose file was not handed to parseLdtk: everything but its layers is known.


map ​

ts
map: TileMap;

Defined in: src/tilemap/ldtk.ts:68

The level as a TileMap: one tile layer per Tiles, AutoLayer and auto-tiled IntGrid layer (a layer stacking several tiles in a cell is split into name, name#1… drawn above it), one object layer per Entities layer, in draw order (LDtk lists its layers top first; here the bottom comes first, as in Tiled).


pxHeight ​

ts
pxHeight: number;

Defined in: src/tilemap/ldtk.ts:60


pxWidth ​

ts
pxWidth: number;

Defined in: src/tilemap/ldtk.ts:59


uid ​

ts
uid: number;

Defined in: src/tilemap/ldtk.ts:54


worldDepth ​

ts
worldDepth: number;

Defined in: src/tilemap/ldtk.ts:58


worldX ​

ts
worldX: number;

Defined in: src/tilemap/ldtk.ts:56

The level's top-left corner in world px (worked out for the Linear* layouts, which store -1).


worldY ​

ts
worldY: number;

Defined in: src/tilemap/ldtk.ts:57

Released under the MIT License.