melonJS
    Preparing search index...

    Interface LDtkLayerDef

    the definition of a layer

    interface LDtkLayerDef {
        __type: string;
        autoSourceLayerDefUid?: number | null;
        displayOpacity?: number;
        gridSize: number;
        identifier: string;
        intGridValues: LDtkIntGridValueDef[];
        intGridValuesGroups?: LDtkIntGridValueGroupDef[];
        parallaxFactorX?: number;
        parallaxFactorY?: number;
        parallaxScaling?: boolean;
        pxOffsetX?: number;
        pxOffsetY?: number;
        tilesetDefUid?: number | null;
        uid: number;
    }
    Index
    __type: string

    IntGrid, Entities, Tiles or AutoLayer

    autoSourceLayerDefUid?: number | null

    for an auto-layer, the IntGrid layer its rules read

    displayOpacity?: number

    its opacity, from 0 to 1: a layer instance's __opacity

    gridSize: number
    identifier: string
    intGridValues: LDtkIntGridValueDef[]

    in no particular order: find a value by its value, not by its place

    intGridValuesGroups?: LDtkIntGridValueGroupDef[]
    parallaxFactorX?: number

    how much of the camera's movement the layer's tiles follow, from -1 to 1, 0 for a layer that scrolls with its level: the layers built from it carry 1 minus it as their ratio

    parallaxFactorY?: number
    parallaxScaling?: boolean

    whether a layer with a parallax factor is scaled by it too

    pxOffsetX?: number

    the definition's offset: a layer instance's __pxTotalOffsetX holds it, with the instance's own

    pxOffsetY?: number
    tilesetDefUid?: number | null

    the tileset the layer draws with, unless a layer instance overrides it

    uid: number