Interface ImageLayer

Image layer.

interface ImageLayer {
    class?: string;
    id: number;
    image: string;
    locked?: boolean;
    name: string;
    offsetx?: number;
    offsety?: number;
    opacity: number;
    parallaxx?: number;
    parallaxy?: number;
    properties?: AnyProperty[];
    repeatx?: boolean;
    repeaty?: boolean;
    tintcolor?: string;
    transparentcolor?: string;
    type: "imagelayer";
    visible: boolean;
    x: number;
    y: number;
}

Hierarchy (view full)

  • Layer<"imagelayer">
    • ImageLayer

Properties

class?: string

The class of the layer.

id: number

Incremental ID. Unique across all layers.

image: string

Image used by this layer.

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.

repeatx?: boolean

Whether the image drawn by this layer is repeated along the X axis. Default is false.

repeaty?: boolean

Whether the image drawn by this layer is repeated along the Y axis. Default is false.

tintcolor?: string

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

transparentcolor?: string

Optional transparent color.

type: "imagelayer"

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