pub struct SpriteSpec {
pub name: Vec<u8>,
pub rect: [f32; 4],
pub settings: u32,
pub ppu: f32,
pub texture: (i32, i64),
pub alpha: (i32, i64),
pub mesh: Mesh,
pub atlas: (i32, i64),
pub key: ([u32; 4], i64),
pub tags: Vec<Vec<u8>>,
}Expand description
A Sprite: its name, textureRect and settingsRaw,
m_PixelsToUnits, its texture’s and alpha texture’s pointers and its
mesh.
Fields§
§name: Vec<u8>m_Name.
rect: [f32; 4]m_RD.textureRect: x, y, width, height.
settings: u32m_RD.settingsRaw.
ppu: f32m_PixelsToUnits.
texture: (i32, i64)m_RD.texture.
alpha: (i32, i64)m_RD.alphaTexture (null: none).
mesh: Meshm_RD’s mesh.
atlas: (i32, i64)m_SpriteAtlas (null: none).
key: ([u32; 4], i64)m_RenderDataKey: its GUID’s words and its id.
m_AtlasTags.
Implementations§
Source§impl SpriteSpec
impl SpriteSpec
Sourcepub fn rect(name: &str, rect: [f32; 4], texture: (i32, i64)) -> Self
pub fn rect(name: &str, rect: [f32; 4], texture: (i32, i64)) -> Self
A rectangle Sprite name of rect on the texture at texture, with
no alpha texture and no mesh, m_PixelsToUnits 1.
Trait Implementations§
Source§impl Clone for SpriteSpec
impl Clone for SpriteSpec
Source§impl Debug for SpriteSpec
impl Debug for SpriteSpec
Source§impl PartialEq for SpriteSpec
impl PartialEq for SpriteSpec
impl StructuralPartialEq for SpriteSpec
Auto Trait Implementations§
impl Forget for SpriteSpec
impl Freeze for SpriteSpec
impl Move for SpriteSpec
impl RefUnwindSafe for SpriteSpec
impl Send for SpriteSpec
impl Sync for SpriteSpec
impl Unpin for SpriteSpec
impl UnsafeUnpin for SpriteSpec
impl UnwindSafe for SpriteSpec
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