[−][src]Module rs_tiled_json::map
The Map struct is the primary interface to the rest of the library's data.
Through it, one can access tilesets and layers (among the rest of map's data). All variable names are the same as those listed in the documentation of Tiled JSON format:
https://doc.mapeditor.org/en/stable/reference/json-map-format/#map
The most valuable functions beside the standard getters will be:
tiled_json::Map::layers(&self) -> &Vec<tiled_json::Layer>; tiled_json::Map::layer_by_name(&self, &str) -> Option<&Layer>; tiled_json::Map::tilesets(&self) -> &Vec<tiled_json::Tileset>; tiled_json::Map::tileset_by_gid(&self, gid: u32) -> Option<&Tileset>;
This struct implements the trait HasProperty, which enables easy access of Tiled properties for maps. The relevant functions are:
tiled_json::Map::get_property(&self, name: &str) -> Option<&tiled_json::Property>; tiled_json::Map::get_property_vector(&self) -> &Vec<tiled_json::Property>; tiled_json::Map::get_property_value(&self, name: &str) -> Option<&tiled_json::PropertyValue>; // See the tiled_json::Property struct to see functionality offered.
Structs
Map | The primary structure of all modules. |
Enums
MapOrientation | MapOrientation is an enum with 4 values: |
RenderOrder | RenderOrder is an enum with 4 values: |
StaggerAxis | StaggerAxis is an enum with 2 values: |
StaggerIndex | StaggerIndex is an enum with 2 values: |