Struct FaceSprite
pub struct FaceSprite {
pub sprite: SpriteRef,
pub rect: [f32; 4],
pub inset: f32,
pub uv: [f32; 6],
pub tint: Option<TintSource>,
pub translucent: bool,
}Expand description
One face of a block’s model on one of its sides.
Fields§
§sprite: SpriteRef§rect: [f32; 4]Where the face lies on the side, in the side’s two axes (side_axes), from 0 to 1 across the block:
[a0, b0, a1, b1]. [0, 0, 1, 1] for a whole face.
inset: f32How deep into the block the face lies from the side’s own plane (0 for a cube’s face, 0.5 for a slab’s top).
uv: [f32; 6]The texture across the side: the point (a, b) on it shows uv = [u0, v0] + a * [du_u, du_v] + b * [dv_u, dv_v] of the sprite, [u0, v0, du_u, du_v, dv_u, dv_v]. Rotations and mirrors (a log on its side, a
model’s rotation and uvlock) are in it.
tint: Option<TintSource>Its colour source, none for an untinted face: multiply the texture by the source’s colour.
translucent: boolIt has partly clear pixels: drawn sorted and blended.
Trait Implementations§
§impl Clone for FaceSprite
impl Clone for FaceSprite
§fn clone(&self) -> FaceSprite
fn clone(&self) -> FaceSprite
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 Copy for FaceSprite
§impl Debug for FaceSprite
impl Debug for FaceSprite
§impl PartialEq for FaceSprite
impl PartialEq for FaceSprite
impl StructuralPartialEq for FaceSprite
Auto Trait Implementations§
impl Freeze for FaceSprite
impl RefUnwindSafe for FaceSprite
impl Send for FaceSprite
impl Sync for FaceSprite
impl Unpin for FaceSprite
impl UnsafeUnpin for FaceSprite
impl UnwindSafe for FaceSprite
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