[][src]Struct ldtk::Project

pub struct Project {
    pub bg_color: String,
    pub default_grid_size: i64,
    pub default_level_bg_color: String,
    pub default_pivot_x: f64,
    pub default_pivot_y: f64,
    pub defs: Option<Definitions>,
    pub export_tiled: bool,
    pub json_version: String,
    pub levels: Vec<Option<Level>>,
    pub minify_json: bool,
    pub next_uid: i64,
    pub world_grid_height: i64,
    pub world_grid_width: i64,
    pub world_layout: String,
}

An LDtk project, representing the whole .ldtk file

Fields

bg_color: String

Project background color

default_grid_size: i64

Default grid size for new layers

default_level_bg_color: String

Default background color of levels

default_pivot_x: f64

Default X pivot (0 to 1) for new entities

default_pivot_y: f64

Default Y pivot (0 to 1) for new entities

defs: Option<Definitions>

A structure containing all the definitions of this project

export_tiled: bool

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

json_version: String

File format version

levels: Vec<Option<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.

minify_json: bool

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

next_uid: i64world_grid_height: i64

Height of the world grid in pixels.

world_grid_width: i64

Width of the world grid in pixels.

world_layout: String

An enum that describes how levels are organized in this project (ie. linearly or in a 2D space). Possible values are: Free, GridVania, LinearHorizontal and LinearVertical;

Trait Implementations

impl Debug for Project[src]

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

impl Serialize for Project[src]

Auto Trait Implementations

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, 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.