Interface BaseMapObject

Base data for map objects.

interface BaseMapObject {
    ellipse?: boolean;
    gid?: number;
    height?: number;
    id: number;
    name?: string;
    point?: boolean;
    polygon?: Point[];
    polyline?: Point[];
    properties?: AnyProperty[];
    rotation?: number;
    template?: string;
    text?: Text;
    type?: string;
    visible?: boolean;
    width?: number;
}

Hierarchy (view full)

Properties

ellipse?: boolean

True if object is an ellipse. False or undefined if not.

gid?: number

Global tile ID, only if object represents a tile.

height?: number

Height in pixels. Always 0 for points. Default is 0.

id: number

Incremental ID, unique across all objects.

name?: string

The name assigned to this object. Default is empty.

point?: boolean

True if object is a point. False or undefined if not.

polygon?: Point[]

Array of points if object is a polygon.

polyline?: Point[]

Array of points if object is a polyline.

properties?: AnyProperty[]

Array of object properties.

rotation?: number

Rotation angle in degrees clockwise. Default is 0.

template?: string

Reference to a template file, in case object is a template instance.

text?: Text

Text data if object is a text.

type?: string

The class of the object. Was saved as class in older Tiled v1.9. Default is empty.

visible?: boolean

Whether object is shown in editor. Default is true.

width?: number

Width in pixels. Always 0 for points. Default is 0.

Generated using TypeDoc