pub enum Rotate {
Static(usize, i32, Number),
Dynamic(usize, Easing, i32, i32, Number, Number),
}Expand description
Rotate event
Variants§
Trait Implementations§
Source§impl<T> Into<Rotate> for (i32, T)
Creates a static Rotate event with the timestamp and the rotation of the element
impl<T> Into<Rotate> for (i32, T)
Creates a static Rotate event with the timestamp and the rotation of the element
Uses a Linear easing
Example:
use osb::Sprite;
let time = 0;
let rotation = 1;
let mut sprite = Sprite::new("res/sprite.png");
sprite.rotate_((time, rotation));Source§impl<T, U> Into<Rotate> for (i32, i32, T, U)
Creates a dynamic Rotate event with the timestamps and the rotations of the element
impl<T, U> Into<Rotate> for (i32, i32, T, U)
Creates a dynamic Rotate event with the timestamps and the rotations of the element
Uses a Linear easing
Example:
use osb::Sprite;
let start_time = 0;
let end_time = 1000;
let start_rotation = 0;
let end_rotation = 1;
let mut sprite = Sprite::new("res/sprite.png");
sprite.rotate_((start_time, end_time, start_rotation, end_rotation));Source§impl<T, U> Into<Rotate> for (Easing, i32, i32, T, U)
Creates a dynamic Rotate event with the easing, the timestamps and the rotations of the element
impl<T, U> Into<Rotate> for (Easing, i32, i32, T, U)
Creates a dynamic Rotate event with the easing, the timestamps and the rotations of the element
Example:
use osb::{Easing, Sprite};
let easing = Easing::Out;
let start_time = 0;
let end_time = 1000;
let start_rotation = 0;
let end_rotation = 1;
let mut sprite = Sprite::new("res/sprite.png");
sprite.rotate_((easing, start_time, end_time, start_rotation, end_rotation));Auto Trait Implementations§
impl Freeze for Rotate
impl RefUnwindSafe for Rotate
impl Send for Rotate
impl Sync for Rotate
impl Unpin for Rotate
impl UnsafeUnpin for Rotate
impl UnwindSafe for Rotate
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