Struct TerrainUvShift
#[non_exhaustive]pub struct TerrainUvShift<'a> {
pub source_sprite: &'a str,
pub target_sprite: &'a str,
pub scale: [f32; 2],
pub offset: [f32; 2],
}Expand description
Faces textured by source_sprite drawn with target_sprite instead, their unit UVs
multiplied by scale then moved by offset: a belt’s or a scrolling screen’s texture.
Only faces of that exact sprite change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_sprite: &'a strThe sprite the model’s faces name (mymod:block/belt).
target_sprite: &'a strThe sprite drawn in its place (mymod:block/belt_scroll).
scale: [f32; 2]Multiplies each UV, in sprite units (1 is the whole sprite).
offset: [f32; 2]Added to each UV after scale, in sprite units.
Implementations§
§impl<'a> TerrainUvShift<'a>
impl<'a> TerrainUvShift<'a>
Trait Implementations§
§impl<'a> Clone for TerrainUvShift<'a>
impl<'a> Clone for TerrainUvShift<'a>
§fn clone(&self) -> TerrainUvShift<'a>
fn clone(&self) -> TerrainUvShift<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for TerrainUvShift<'a>
§impl<'a> Debug for TerrainUvShift<'a>
impl<'a> Debug for TerrainUvShift<'a>
§impl<'a> PartialEq for TerrainUvShift<'a>
impl<'a> PartialEq for TerrainUvShift<'a>
impl<'a> StructuralPartialEq for TerrainUvShift<'a>
Auto Trait Implementations§
impl<'a> Freeze for TerrainUvShift<'a>
impl<'a> RefUnwindSafe for TerrainUvShift<'a>
impl<'a> Send for TerrainUvShift<'a>
impl<'a> Sync for TerrainUvShift<'a>
impl<'a> Unpin for TerrainUvShift<'a>
impl<'a> UnsafeUnpin for TerrainUvShift<'a>
impl<'a> UnwindSafe for TerrainUvShift<'a>
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