API reference

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

I

interfaceTextObject

@codexo/exojs-tilemap / tilemap / stable

A text object carrying styled text content within `[x, y, width, height]`.

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

A text object carrying styled text content within `[x, y, width, height]`.

Properties14
height: number
Bounding height in px (0 for points).
id: number
Source-unique object id.
kind: "text"
name: string
Object name (may be empty; not unique).
properties: P
Immutable custom properties.
rotation: number
Rotation in degrees, clockwise, about (x, y) - except on a TileObject, whose pivot stays at the source format's own anchor and is generally not (x, y). See TileObject for why.
source?: unknown
The raw source-format record this object was parsed from, for the rare case that needs a field this model does not carry. Adapters that keep their parsed document alive set it (LdtkEntityInstance for LDtk, TiledObject for Tiled); a procedurally built object has none. Reading it ties the code to one source format - prefer the typed fields.
sourceId?: string
Stable string identity assigned by the authoring format, when it has one. LDtk sets it to the entity iid, which is globally unique and survives re-ordering, re-export and level moves - the identity to persist in a savegame. Tiled has no such field and leaves this unset; there, id is the identity and it is unique only within its map.
type: string
Object class/type string (Tiled type/class; may be empty).
visible: boolean
Whether the object is marked visible.
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