melonJS
    Preparing search index...

    Interface LevelLoadOptions

    interface LevelLoadOptions {
        async?: boolean;
        castGroundShadow?: boolean;
        collisionLayers?: string[];
        container?: Container;
        crossfade?: number;
        flatten?: boolean;
        levels?: string[];
        lightIntensityScale?: number;
        lights?: boolean;
        objects?: boolean | Function;
        onLoaded?: Function;
        outlineColor?: string | number[] | Color;
        outlineMode?: string;
        outlineWidth?: number;
        pickable?: boolean;
        rightHanded?: boolean;
        rimColor?: string | number[] | Color;
        rimLight?: number;
        scale?: number;
        setViewportBounds?: boolean;
        shadowDirectionX?: number;
        shadowDirectionZ?: number;
        shadowGroundNormal?: number[] | Vector3d;
        shadowGroundY?: number;
        shadowLight?: Light3d;
        shadowOffset?: number;
        shadowOpacity?: number;
        shadowScale?: number;
        shadowStretch?: number;
        showIntGrid?: boolean;
        solidValues?: number[];
        toonBands?: number;
    }
    Index
    async?: boolean

    return a promise that settles once the level is in the world, instead of a boolean

    castGroundShadow?: boolean

    (glTF/GLB only) give every mesh in the scene a ground shadow; omit to inherit the application's castGroundShadow setting (on by default)

    collisionLayers?: string[]

    (LDtk only) the IntGrid layers whose cells are solid, by their identifier; by default the ones whose identifier contains "collision"

    container?: Container

    container in which to load the specified level

    crossfade?: number

    (glTF/GLB only) for an animated or skinned asset, the default crossfade between its clips, in milliseconds (GLTFModel#crossfade)

    flatten?: boolean

    (tile maps: "tmx", "tilemap", "spritefusion") if true, flatten all objects into the given container

    levels?: string[]

    (LDtk only, loading a whole world) the levels to start with, by their identifier; by default every level

    lightIntensityScale?: number

    (glTF/GLB only) multiply each light's authored physical intensity by this factor instead of normalizing it to 1

    lights?: boolean

    (glTF/GLB only) add the scene's authored KHR_lights_punctual lights (plus a soft ambient fill) as Light3d world children

    objects?: boolean | Function

    (tile maps and LDtk) build the objects the level places: all of them, none, or the ones a function says, given each object's settings as its class would be ((settings) => !taken.has(settings.id) leaves out what the player took)

    onLoaded?: Function

    callback for when the level is fully loaded, called in both forms

    outlineColor?: string | number[] | Color

    (glTF/GLB only) the outline colour (Mesh#outlineColor)

    outlineMode?: string

    (glTF/GLB only) what outlineWidth is measured in, world units or "screen" pixels (Mesh#outlineMode)

    outlineWidth?: number

    (glTF/GLB only) outline every mesh this many world units wide (Mesh#outlineWidth)

    pickable?: boolean

    (glTF/GLB only) set false to have Camera3d#pick pass over the scene's meshes (Mesh#pickable)

    rightHanded?: boolean

    (glTF/GLB only) convert the right-handed (Y-up) source to the engine's Y-down via a rotation rather than a mirror

    rimColor?: string | number[] | Color

    (glTF/GLB only) the rim light's colour (Mesh#rimColor)

    rimLight?: number

    (glTF/GLB only) a rim light on every lit mesh, this strong (Mesh#rimLight)

    scale?: number

    (glTF/GLB only) pixels per glTF unit applied to the whole scene

    setViewportBounds?: boolean

    (tile maps and LDtk) if true, set the viewport bounds to the map size

    shadowDirectionX?: number

    (glTF/GLB only) x of the ground direction they are cast along

    shadowDirectionZ?: number

    (glTF/GLB only) z of that direction

    shadowGroundNormal?: number[] | Vector3d

    (glTF/GLB only) up normal of the floor, for a scene that is not level

    shadowGroundY?: number

    (glTF/GLB only) world Y the ground shadows land on

    shadowLight?: Light3d

    (glTF/GLB only) a Light3d to take the shadow direction from, re-read every draw

    shadowOffset?: number

    (glTF/GLB only) how far to slide them along the light, in blob radii (Mesh#shadowOffset)

    shadowOpacity?: number

    (glTF/GLB only) how dark the blobs are (Mesh#shadowOpacity)

    shadowScale?: number

    (glTF/GLB only) blob footprint multiplier (Mesh#shadowScale)

    shadowStretch?: number

    (glTF/GLB only) how much longer they are along it (Mesh#shadowStretch)

    showIntGrid?: boolean

    (LDtk only) draw the IntGrid layers that have no tiles of their own, each value in its LDtk color

    solidValues?: number[]

    (LDtk only) the values of those layers that are solid; by default every value but 0

    toonBands?: number

    (glTF/GLB only) cel-shade every lit mesh into this many bands (Mesh#toonBands)