pub struct Atlas {
pub texture: String,
pub size: (u32, u32),
pub frames: BTreeMap<String, AtlasFrame>,
pub animations: BTreeMap<String, AtlasAnimation>,
}Expand description
A parsed sheet: its texture file plus named frames and animations.
Fields§
§texture: String§size: (u32, u32)§frames: BTreeMap<String, AtlasFrame>§animations: BTreeMap<String, AtlasAnimation>Implementations§
Source§impl Atlas
impl Atlas
Sourcepub fn frame(&self, name: &str) -> Result<AtlasFrame>
pub fn frame(&self, name: &str) -> Result<AtlasFrame>
Frame lookup that names the alternatives instead of failing silently.
pub fn names(&self) -> Vec<&str>
Sourcepub fn animation(&self, name: &str) -> Result<&AtlasAnimation>
pub fn animation(&self, name: &str) -> Result<&AtlasAnimation>
Animation lookup that names the alternatives instead of failing silently.
pub fn animation_names(&self) -> Vec<&str>
Trait Implementations§
impl StructuralPartialEq for Atlas
Auto Trait Implementations§
impl Forget for Atlas
impl Freeze for Atlas
impl Move for Atlas
impl RefUnwindSafe for Atlas
impl Send for Atlas
impl Sync for Atlas
impl Unpin for Atlas
impl UnsafeUnpin for Atlas
impl UnwindSafe for Atlas
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