melonJS
    Preparing search index...

    Interface LDtkLoadOptions

    how a level or a world of an LDtk project is added to the game

    interface LDtkLoadOptions {
        collisionLayers?: string[];
        levels?: string[];
        objects?: boolean | ((settings: LDtkObjectSettings) => boolean);
        setViewportBounds?: boolean;
        showIntGrid?: boolean;
        solidValues?: number[];
    }
    Index
    collisionLayers?: string[]

    The IntGrid layers whose cells are solid, by their identifier in LDtk: each run of solid cells becomes one static body.

    the IntGrid layers whose identifier contains "collision", in any case
    
    levels?: string[]

    loading a whole world: the levels to start with, by their identifier. The others are added later with LDtkWorld#loadLevel or LDtkWorld#streamAround

    every level of the world
    
    objects?: boolean | ((settings: LDtkObjectSettings) => boolean)

    Build the objects LDtk's Entities layers place (its "entities"): all of them, none, or the ones a function says, given each one's settings as its class would be, as its level is built (and built again, in a world whose levels come and go). The way to leave out what the player took: (settings) => !taken.has(settings.id). The same option as for a Tiled map.

    true
    
    setViewportBounds?: boolean

    have the viewport follow the level's area: its bounds, and a level smaller than the viewport centred in it

    true
    
    showIntGrid?: boolean

    draw the IntGrid layers that have no tiles of their own, each value in the color it has in LDtk: to see a level that is not dressed yet

    false
    
    solidValues?: number[]

    the values of those layers that are solid

    every value but 0