Skip to content

1681-engine / index / LdtkEntity

Interface: LdtkEntity ​

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

Properties ​

cx ​

ts
cx: number;

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

The grid cell it stands in.


cy ​

ts
cy: number;

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


fields ​

ts
fields: Record<string, LdtkFieldValue>;

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

Every field instance by identifier, as exported (Points, arrays and entity refs included).


height ​

ts
height: number;

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


identifier ​

ts
identifier: string;

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

The entity definition's identifier (Player, Chest…).


iid ​

ts
iid: string;

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


layer ​

ts
layer: string;

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

The layer it was placed on.


pivotX ​

ts
pivotX: number;

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


pivotY ​

ts
pivotY: number;

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


tags ​

ts
tags: string[];

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


width ​

ts
width: number;

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


x ​

ts
x: number;

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

The pivot point in level px (the layer's offset included): where LDtk shows the entity standing.


y ​

ts
y: number;

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

Released under the MIT License.