pub struct TilemapGenerationConfig {
pub asset_patterns: Vec<String>,
pub output_path: String,
pub format: Option<SaveImageFormat>,
pub size: Option<u32>,
pub texture_padding: Option<u32>,
pub border_padding: Option<u32>,
pub working_dir: Option<PathBuf>,
}Fields§
§asset_patterns: Vec<String>§output_path: String§format: Option<SaveImageFormat>Image format, png by default
size: Option<u32>Size of the tilemap texture. Default value is 2048.
texture_padding: Option<u32>Size of the padding between frames in pixel. Default value is 2
border_padding: Option<u32>Size of the padding on the outer edge of the packed image in pixel. Default value is 0.
working_dir: Option<PathBuf>Implementations§
Source§impl TilemapGenerationConfig
impl TilemapGenerationConfig
pub fn read_from_file<P>(path: P) -> Result<TilemapGenerationConfig>
pub fn generate(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for TilemapGenerationConfig
impl Clone for TilemapGenerationConfig
Source§fn clone(&self) -> TilemapGenerationConfig
fn clone(&self) -> TilemapGenerationConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TilemapGenerationConfig
impl Default for TilemapGenerationConfig
Source§fn default() -> TilemapGenerationConfig
fn default() -> TilemapGenerationConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TilemapGenerationConfig
impl<'de> Deserialize<'de> for TilemapGenerationConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TilemapGenerationConfig
impl RefUnwindSafe for TilemapGenerationConfig
impl Send for TilemapGenerationConfig
impl Sync for TilemapGenerationConfig
impl Unpin for TilemapGenerationConfig
impl UnwindSafe for TilemapGenerationConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().