Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface World

This is the root of any Project JSON file.

It contains:

  • the project settings,
  • an array of levels,
  • and a definition object (that can probably be safely ignored for most users).

Hierarchy

  • World

Index

Properties

backupLimit

backupLimit: number

Number of backup files to keep, if the "backupOnSave" is TRUE

backupOnSave

backupOnSave: boolean

If TRUE, an extra copy of the project will be created in a sub folder, when saving.

bgColor

bgColor: string

Project background color

defaultGridSize

defaultGridSize: number

Default grid size for new layers

defaultLevelBgColor

defaultLevelBgColor: string

Default background color of levels

defaultPivotX

defaultPivotX: number

Default X pivot (0 to 1) for new entities

defaultPivotY

defaultPivotY: number

Default Y pivot (0 to 1) for new entities

defs

A interfaceure containing all the definitions of this project

exportPng

exportPng: boolean

If TRUE, all layers in all levels will also be exported as PNG along with the project file (default is FALSE)

exportTiled

exportTiled: boolean

If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file (default is FALSE)

externalLevels

externalLevels: boolean

If TRUE, one file will be saved the project (incl. all its definitions) and one file per-level in a sub-folder.

jsonVersion

jsonVersion: string

File format version

levels

levels: Level[]

All levels.

The order of this array is only relevant in "LinearHorizontal" and "linearVertical" world layouts (see "worldLayout" value).

Otherwise, you should refer to the "worldX","worldY" coordinates of each Level.

minifyJson

minifyJson: boolean

If TRUE, the Json is partially minified (no indentation, nor line breaks, default is FALSE)

nextUid

nextUid: number

pngFilePattern

pngFilePattern: null | string

File naming pattern for exported PNGs

worldGridHeight

worldGridHeight: number

Height of the world grid in pixels.

worldGridWidth

worldGridWidth: number

Width of the world grid in pixels.

worldLayout

worldLayout: WorldLayout

An enum that describes how levels are organized in this project (ie. linearly or in a 2D space).

Possible values: "Free", "GridVania", "LinearHorizontal", "LinearVertical"

Generated using TypeDoc