Struct SpriteRef
pub struct SpriteRef {
pub array: u32,
pub layer: u32,
pub animated: bool,
pub cutout: bool,
}Expand description
A sprite: its array (0 for every vanilla texture on most GPUs; past the first array’s layers in 1 to 7) and its layer in that array.
Fields§
§array: u32§layer: u32§animated: boolIt animates (water, lava, fire, sea lanterns…): the arrays always hold the frame being shown.
cutout: boolSome of its pixels are clear (alpha 0): leaves, glass, flowers. Draw those as holes.
Trait Implementations§
impl Copy for SpriteRef
impl Eq for SpriteRef
impl StructuralPartialEq for SpriteRef
Auto Trait Implementations§
impl Freeze for SpriteRef
impl RefUnwindSafe for SpriteRef
impl Send for SpriteRef
impl Sync for SpriteRef
impl Unpin for SpriteRef
impl UnsafeUnpin for SpriteRef
impl UnwindSafe for SpriteRef
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