Interface Tile

Tile definition.

interface Tile {
    animation?: Frame[];
    height?: number;
    id: number;
    image?: string;
    imageheight?: number;
    imagewidth?: number;
    objectgroup?: ObjectGroup;
    probability?: number;
    properties?: AnyProperty[];
    type?: string;
    width?: number;
    x?: number;
    y?: number;
}

Properties

animation?: Frame[]

Array of frames if tile is animated.

height?: number

The height of the sub-rectangle representing this tile. Default is the image height.

id: number

Local ID of the tile.

image?: string

Image representing this tile. Optional, used for image collection tilesets.

imageheight?: number

Height of the tile image in pixels. Only set when image is set.

imagewidth?: number

Width of the tile image in pixels. Only set when image is set.

objectgroup?: ObjectGroup

Optional object group layer when collision shapes are specified.

probability?: number

Percentage chance this tile is chosen when competing with others in the editor. Default is 1.

properties?: AnyProperty[]

Optional list of custom tile properties.

type?: string

Optional class of the tile (was saved as class in Tiled v1.9).

width?: number

The width of the sub-rectangle representing this tile. Default is the image width.

x?: number

The X position of the sub-rectangle representing this tile. Default is 0.

y?: number

The Y position of the sub-rectangle representing this tile. Default is 0.

Generated using TypeDoc