pub struct Region {
pub x: u16,
pub y: u16,
pub w: u16,
pub h: u16,
pub seed: u32,
pub chaos_level: u8,
pub scale: u8,
pub persistence: u8,
pub noise_type: NoiseType,
pub base_color: [u8; 3],
pub amplitude: u8,
}Expand description
Texture region descriptor
Fields§
§x: u16X coordinate (top-left corner)
y: u16Y coordinate (top-left corner)
w: u16Width in pixels
h: u16Height in pixels
seed: u32Deterministic noise seed
chaos_level: u8Number of octaves (1-8)
scale: u8Base frequency scale (log₂, 0-7)
persistence: u8Amplitude decay between octaves (0-255 → 0.0-1.0)
noise_type: NoiseTypeType of noise function
base_color: [u8; 3]RGB base color
amplitude: u8Noise amplitude (0-255)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Region
impl<'de> Deserialize<'de> for Region
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
impl Copy for Region
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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 more