API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfacePolylineObject
@codexo/exojs-tilemap / tilemap / stable
An open polyline; `points` are relative to the object origin.
14
props
0
methods
0
events
Import
import { PolylineObject } from '@codexo/exojs-tilemap'An open polyline; `points` are relative to the object origin.
Properties14
height: numberBounding height in px (0 for points).
id: numberSource-unique object id.
kind: "polyline"name: stringObject name (may be empty; not unique).
points: readonly ObjectPointA point in object-layer space (pixels, relative to the object).[]properties: PImmutable custom properties.
rotation: numberRotation 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?: unknownThe 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?: stringStable 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: stringObject class/type string (Tiled type/class; may be empty).
visible: booleanWhether the object is marked visible.
width: numberBounding width in px (0 for points).
x: numberX of the object origin in object-layer pixel space.
y: numberY of the object origin in object-layer pixel space.
Source