Struct ldtk::Project [−][src]
pub struct Project {}Show fields
pub external_levels: bool, pub next_uid: i32, pub image_export_mode: Value, pub default_pivot_x: f32, pub default_level_bg_color: String, pub level_name_pattern: String, pub export_png: Option<bool>, pub png_file_pattern: Option<String>, pub backup_limit: i32, pub defs: Definitions, pub flags: Vec<Value>, pub world_grid_height: i32, pub export_tiled: bool, pub default_level_width: i32, pub default_level_height: i32, pub levels: Vec<Level>, pub world_grid_width: i32, pub bg_color: String, pub backup_on_save: bool, pub world_layout: Value, pub minify_json: bool, pub default_pivot_y: f32, pub json_version: String, pub default_grid_size: i32,
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
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.
next_uid: i32
Next Unique integer ID available
image_export_mode: Value
“Image export” option when saving project. Possible values: None
, OneImagePerLayer
, OneImagePerLevel
default_pivot_x: f32
Default X pivot (0 to 1) for new entities
default_level_bg_color: String
Default background color of levels
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
png_file_pattern: Option<String>
File naming pattern for exported PNGs
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
flags: Vec<Value>
An array containing various advanced flags (ie. options or other states). Possible values: DiscardPreCsvIntGrid
, IgnoreBackupSuggest
world_grid_height: i32
Height of the world grid in pixels.
export_tiled: bool
If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file (default is FALSE)
default_level_width: i32
Default new level width
default_level_height: i32
Default new level height
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.
world_grid_width: i32
Width of the world grid in pixels.
bg_color: String
Project background color
backup_on_save: bool
If TRUE, an extra copy of the project will be created in a sub folder, when saving.
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
minify_json: bool
If TRUE, the Json is partially minified (no indentation, nor line breaks, default is FALSE)
default_pivot_y: f32
Default Y pivot (0 to 1) for new entities
json_version: String
File format version
default_grid_size: i32
Default grid size for new layers
Trait Implementations
impl<'de> Deserialize<'de> for Project
[src]
impl<'de> Deserialize<'de> for Project
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Project
impl RefUnwindSafe for Project
impl UnwindSafe for Project
impl UnwindSafe for Project
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]