API reference

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

I

interfaceMapObjectDescriptor

@codexo/exojs-tilemap / tilemap / stable

A format-neutral view of one map object, as handed to a import('./MapObjectSpawner').MapObjectFactory. The descriptor is what game code writes against: it resolves the two things that differ between authoring formats - stable identity and the dispatch key - and pairs the object with the layer it came from. The parsed object itself stays reachable through object, and the untouched source record through TileMapObject.source.

11
props
0
methods
0
events
Import
import { MapObjectDescriptor } from '@codexo/exojs-tilemap'

A format-neutral view of one map object, as handed to a import('./MapObjectSpawner').MapObjectFactory.

The descriptor is what game code writes against: it resolves the two things that differ between authoring formats - stable identity and the dispatch key - and pairs the object with the layer it came from. The parsed object itself stays reachable through object, and the untouched source record through TileMapObject.source.

Properties11
height: number
Bounding height in px (0 for points).
id: string
Stable identity for this object. Uniqueness domain is **one TileMap**: Tiled object ids are unique within a map, and LDtk entity iids are unique globally, so an LDtk-sourced id keeps that stronger guarantee. Combine with the owning level's id if a world-wide key is needed. Derived from TileMapObject.sourceId when the format supplies one, otherwise from the numeric TileMapObject.id.
kind: null | string
Canonical dispatch key - the object's class/type string, or null when the source declares none. LDtk fills it with the entity definition identifier, Tiled with the object's class. A import('./MapObjectSpawner').MapObjectSpawner uses it to pick a factory unless an identify strategy overrides that.
name: string
Object name; may be empty and is not unique.
rotation: number
Rotation in degrees, clockwise. See TileMapObject for the pivot.
width: number
Bounding width in px (0 for points).
x: number
X of the object origin in object-layer pixel space.
y: number
Y of the object origin in object-layer pixel space.
Source