API reference

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

C

classTiledObject

@codexo/exojs-tiled / tiled / stable

A parsed Tiled object, placed in an TiledObjectLayer or a tile's collision `objectgroup`. The shape of the object is determined by which of point, ellipse, polygon, polyline, text, or gid is set; if none are set, the object is a plain rectangle spanning `[x, y, width, height]`.

17
props
1
methods
0
events
Import
import { TiledObject } from '@codexo/exojs-tiled'

A parsed Tiled object, placed in an TiledObjectLayer or a tile's collision `objectgroup`.

The shape of the object is determined by which of point, ellipse, polygon, polyline, text, or gid is set; if none are set, the object is a plain rectangle spanning `[x, y, width, height]`.

Constructors1
Methods1
Properties17
ellipse: boolean
gid?: number
height: number
id: number
name: string
point: boolean
rotation: number
template?: string
type: string
The object's class, normalised across Tiled versions: 1.9 wrote it as class, every other version as type. A file carries one of the two, so class wins when present and non-empty and type is used otherwise. Empty when the object has no class.
visible: boolean
width: number
x: number
y: number
Source