Struct ldtk::Project[][src]

pub struct Project {
Show fields pub default_level_bg_color: String, pub default_pivot_y: f32, pub world_layout: Value, pub image_export_mode: Value, pub export_png: Option<bool>, pub backup_on_save: bool, pub level_name_pattern: String, pub flags: Vec<Value>, pub world_grid_height: i32, pub bg_color: String, pub png_file_pattern: Option<String>, pub levels: Vec<Level>, pub default_pivot_x: f32, pub default_level_width: i32, pub backup_limit: i32, pub default_level_height: i32, pub world_grid_width: i32, pub export_tiled: bool, pub next_uid: i32, pub external_levels: bool, pub minify_json: bool, pub json_version: String, pub default_grid_size: i32, pub defs: Definitions,
}

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

default_level_bg_color: String

Default background color of levels

default_pivot_y: f32

Default Y pivot (0 to 1) for new entities

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

image_export_mode: Value

“Image export” option when saving project. Possible values: None, OneImagePerLayer, OneImagePerLevel

export_png: Option<bool>

WARNING: this deprecated value is no longer exported since version 0.9.3 Replaced by: imageExportMode

backup_on_save: bool

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

level_name_pattern: String

The default naming convention for level identifiers.

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.

bg_color: String

Project background color

png_file_pattern: Option<String>

File naming pattern for exported PNGs

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

default_level_width: i32

Default new level width

backup_limit: i32

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

default_level_height: i32

Default new level height

world_grid_width: i32

Width 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)

next_uid: i32

Next Unique integer ID available

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)

json_version: String

File format version

default_grid_size: i32

Default grid size for new layers

defs: Definitions

A structure containing all the definitions of this project

Trait Implementations

impl Clone for Project[src]

impl Debug for Project[src]

impl<'de> Deserialize<'de> for Project[src]

impl Serialize for Project[src]

Auto Trait Implementations

impl RefUnwindSafe for Project

impl Send for Project

impl Sync for Project

impl Unpin for Project

impl UnwindSafe for Project

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.