the project
the world
Readonlybackgroundcolorthe project's background color, as #rrggbb
its width in cells of the project's default grid
the container it was added to, while it is loaded
Readonlyformatthe format's name, as registered with the level director
its height, in pixels
Readonlyinfothe world: its layout, its levels and the area they cover
its tile layers, once it is loaded: TileLayer and PlacedTileLayer
Readonlynamethe id it is loaded by: level.load(name)
Readonlyorientationthe grid is square
Readonlyprojectthe project the level or the world belongs to
its height in cells of the project's default grid
Protectedstayedthe persistent entities that stayed when their level was taken out, by their unique id in LDtk
Readonlytileheightthe size of a cell of the project's default grid, in pixels
Readonlytilewidththe size of a cell of the project's default grid, in pixels
its width, in pixels
its left edge in the container it is added to, in pixels: 0 for a level, LDtk's world coordinate for a world
its top edge in the container it is added to, in pixels
add the world to a container: called by the level director
the container, emptied
Optionaloptions: LDtkLoadOptions
the options given to level.load
let go of what loading built: called by the level director when another level is loaded
the area it covers, in the container it is added to: from 0 for a level, in LDtk's world coordinates for a world
the bounds
the values of an IntGrid layer of a level in the game
the level's identifier in LDtk, or its iid
the layer's identifier in LDtk
the grid, or undefined if the level is not in the game or has no such layer
its tile layers, as a Tiled map gives them: what layers holds
the tile layers in the world now, bottom-most first
the renderer of the project's default grid: cells to pixels and back
an orthogonal renderer
whether a level of the world is in the game now
the level's identifier in LDtk, or its iid
true if it is
the levels of the world an area touches
the area's left edge, in pixels
the area's top edge, in pixels
the area's width (0 for a point)
the area's height (0 for a point)
Optionaldepth: number
only the levels of this depth: in a world whose levels are stacked (LDtk's "world depth"), the ones the player is among
the levels
the levels of the world in the game now
their identifiers
add a level of the world to the game, where LDtk puts it
the level's identifier in LDtk, or its iid
false if it was there already, or the world is not loaded
Protectedpopulateadd the level or the world to the container, as a Tiled map is
the container
LDtk's load options
the color behind it
adds its layers, bodies and entities
Keep in the game the levels within reach of an area, and only those:
the ones the area touches once grown by margin are added, the others
taken out. Call it as the player moves, with the camera's view or the
player's own box, for a world too large to hold at once.
the area's left edge, in pixels
the area's top edge, in pixels
the area's width
the area's height
how far past the area a level is kept, in pixels
Optionaldepth: number
keep the levels of this depth only: the levels of the other depths are taken out, which is how a world whose levels are stacked shows the ones the player is among
the identifiers of the levels added and of those taken out
Take a level of the world out of the game: its layers, its bodies and its entities. An entity that is persistent (Renderable#isPersistent), as a player is, stays in the game, and is not built again when its level comes back.
the level's identifier in LDtk, or its iid
false if it was not there
A world of an LDtk project, as the level director holds it: its levels, each where LDtk puts it. It is loaded by the project's name,
level.load("world"), with every level or with the ones asked for; the others are added and removed while the game runs.