pub struct Project {Show 24 fields
pub backup_on_save: bool,
pub default_pivot_y: f32,
pub level_name_pattern: String,
pub export_png: Option<bool>,
pub world_grid_width: i32,
pub default_level_height: i32,
pub world_grid_height: i32,
pub world_layout: Value,
pub flags: Vec<Value>,
pub image_export_mode: Value,
pub default_level_bg_color: String,
pub json_version: String,
pub default_level_width: i32,
pub levels: Vec<Level>,
pub default_pivot_x: f32,
pub png_file_pattern: Option<String>,
pub default_grid_size: i32,
pub next_uid: i32,
pub backup_limit: i32,
pub defs: Definitions,
pub external_levels: bool,
pub minify_json: bool,
pub bg_color: String,
pub export_tiled: bool,
}
Expand description
This is the root of any Project JSON file. It contains: - the project settings, - an array of levels, - a group of definitions (that can probably be safely ignored for most users).
Fields§
§backup_on_save: bool
If TRUE, an extra copy of the project will be created in a sub folder, when saving.
default_pivot_y: f32
Default Y pivot (0 to 1) for new entities
level_name_pattern: String
The default naming convention for level identifiers.
export_png: Option<bool>
WARNING: this deprecated value is no longer exported since version 0.9.3 Replaced by: imageExportMode
world_grid_width: i32
Width of the world grid in pixels.
default_level_height: i32
Default new level height
world_grid_height: i32
Height of the world grid in pixels.
world_layout: Value
An enum that describes how levels are organized in this project (ie. linearly or in a 2D space). Possible values: Free
, GridVania
, LinearHorizontal
, LinearVertical
flags: Vec<Value>
An array containing various advanced flags (ie. options or other states). Possible values: DiscardPreCsvIntGrid
, IgnoreBackupSuggest
image_export_mode: Value
“Image export” option when saving project. Possible values: None
, OneImagePerLayer
, OneImagePerLevel
default_level_bg_color: String
Default background color of levels
json_version: String
File format version
default_level_width: i32
Default new level width
levels: Vec<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.
default_pivot_x: f32
Default X pivot (0 to 1) for new entities
png_file_pattern: Option<String>
File naming pattern for exported PNGs
default_grid_size: i32
Default grid size for new layers
next_uid: i32
Next Unique integer ID available
backup_limit: i32
Number of backup files to keep, if the backupOnSave
is TRUE
defs: Definitions
A structure containing all the definitions of this project
external_levels: bool
If TRUE, one file will be saved for the project (incl. all its definitions) and one file in a sub-folder for each level.
minify_json: bool
If TRUE, the Json is partially minified (no indentation, nor line breaks, default is FALSE)
bg_color: String
Project background color
export_tiled: bool
If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file (default is FALSE)