Interface Layer<T>

Map layer.

interface Layer<T> {
    class?: string;
    id: number;
    locked?: boolean;
    name: string;
    offsetx?: number;
    offsety?: number;
    opacity: number;
    parallaxx?: number;
    parallaxy?: number;
    properties?: AnyProperty[];
    tintcolor?: string;
    type: T;
    visible: boolean;
    x: number;
    y: number;
}

Type Parameters

  • T extends string = string

Hierarchy (view full)

Properties

class?: string

The class of the layer.

id: number

Incremental ID. Unique across all layers.

locked?: boolean

Whether layer is locked in the editor. Default is false.

name: string

The layer's name.

offsetx?: number

Optional horizontal layer offset in pixels. Default is 0.

offsety?: number

Optional vertical layer offset in pixels. Default is 0.

opacity: number

Layer opacity between 0 and 1.

parallaxx?: number

Horizontal parallax factor. Default is 1.

parallaxy?: number

Vertical parallax factor. Default is 1.

properties?: AnyProperty[]

Array of properties. Empty if not set.

tintcolor?: string

Optional tint color that is multiplied with any graphics drawn by this layer or any child layer.

type: T

The layer type.

visible: boolean

Whether layer is shown or hidden in editor.

x: number

Horizontal layer offset in tiles. Always 0.

y: number

Vertical layer offset in tiles. Always 0.

Generated using TypeDoc