pub struct Flipbook {
pub name: String,
pub frames: Vec<FlipbookFrame, Global>,
}
Expand description
Defines a flipbook-style movie, typically created from a spritesheet. Use
Library.fromFlipbooks()
to create a Library from a list of Flipbooks.
Fields
name: String
frames: Vec<FlipbookFrame, Global>
Implementations
sourceimpl Flipbook
impl Flipbook
sourcepub fn new<A>(name: String, textures: Vec<Rc<A>, Global>) -> Flipbook where
A: 'static + Texture,
pub fn new<A>(name: String, textures: Vec<Rc<A>, Global>) -> Flipbook where
A: 'static + Texture,
@param name The name of the symbol that will be placed in the library. @param textures The frames of the flipbook animation.
sourcepub fn set_duration(&mut self, duration: f32) -> &Flipbook
pub fn set_duration(&mut self, duration: f32) -> &Flipbook
Uniformly sets the duration for all frames in this flipbook, so that the entire movie takes the given duration.
@param duration The movie duration, in seconds. @returns This instance, for chaining.
sourcepub fn set_anchor(&mut self, x: f32, y: f32) -> &Flipbook
pub fn set_anchor(&mut self, x: f32, y: f32) -> &Flipbook
Sets the anchor point for all frames in this flipbook.
@returns This instance, for chaining.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Flipbook
impl !Send for Flipbook
impl !Sync for Flipbook
impl Unpin for Flipbook
impl !UnwindSafe for Flipbook
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.