use std::collections::HashMap;
use std::future::Future;
use std::sync::Arc;
use bevy_math::Vec2;
pub use layer::Layer;
pub use map::Map;
pub use property::Property;
pub use texture::Texture;
#[cfg(feature = "plugin")]
pub(crate) use texture::TexturePtr;
pub use tile_type::TileType;
mod layer;
mod map;
mod parse;
mod property;
mod texture;
mod tile_type;
#[derive(Debug, Clone, Copy)]
#[allow(missing_docs)]
pub enum RenderOrder {
RightDown,
RightUp,
LeftDown,
LeftUp,
}
pub struct Tileset {
pub first_gid: u32,
pub source: String,
pub tiles: Vec<Option<Tile>>,
pub image: Option<Texture>,
pub tile_size: Vec2,
}
pub struct Tile {
pub image: Option<Texture>,
pub top_left: Vec2,
pub bottom_right: Vec2,
pub width: i32,
pub height: i32,
#[allow(missing_docs)]
pub animation: Vec<Frame>,
pub properties: HashMap<String, Property>,
pub object_group: Vec<Object>,
}
pub struct Frame {
pub tile: u32,
pub duration: u32,
}
#[derive(Clone, Debug)]
pub struct Object {
pub id: u32,
pub properties: HashMap<String, Property>,
pub tile: Option<u32>,
pub shape: Shape,
pub name: String,
pub ty: String,
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub rotation: f32,
pub visible: bool,
}
#[derive(Clone, Debug)]
pub struct Shape {
pub points: Vec<Vec2>,
pub closed: bool,
}