Struct ldtk2::Coordinate[][src]

pub struct Coordinate {
Show 24 fields pub backup_limit: i64, pub backup_on_save: bool, pub bg_color: String, pub default_grid_size: i64, pub default_level_bg_color: String, pub default_level_height: i64, pub default_level_width: i64, pub default_pivot_x: f64, pub default_pivot_y: f64, pub defs: Definitions, pub export_png: Option<bool>, pub export_tiled: bool, pub external_levels: bool, pub flags: Vec<Flag>, pub image_export_mode: ImageExportMode, pub json_version: String, pub level_name_pattern: String, pub levels: Vec<Level>, pub minify_json: bool, pub next_uid: i64, pub png_file_pattern: Option<String>, pub world_grid_height: i64, pub world_grid_width: i64, pub world_layout: WorldLayout,
}
Expand description

This file is a JSON schema of files created by LDtk level editor (https://ldtk.io).

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_limit: i64

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

backup_on_save: bool

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

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_level_height: i64

Default new level height

default_level_width: i64

Default new level width

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: Definitions

A structure containing all the definitions of this project

export_png: Option<bool>

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

export_tiled: bool

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

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.

flags: Vec<Flag>

An array containing various advanced flags (ie. options or other states). Possible values: DiscardPreCsvIntGrid, IgnoreBackupSuggest

image_export_mode: ImageExportMode

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

json_version: String

File format version

level_name_pattern: String

The default naming convention for level identifiers.

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.

minify_json: bool

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

next_uid: i64

Next Unique integer ID available

png_file_pattern: Option<String>

File naming pattern for exported PNGs

world_grid_height: i64

Height of the world grid in pixels.

world_grid_width: i64

Width of the world grid in pixels.

world_layout: 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

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.