Struct KeyframeAnimation
pub struct KeyframeAnimation { /* private fields */ }Expand description
An animation baked against a model (KeyframeAnimation): each channel holds the path to its
part, so playing it walks no names.
Implementations§
§impl KeyframeAnimation
impl KeyframeAnimation
pub fn apply(
&self,
root: &mut ModelPart,
state: &AnimationState,
age_in_ticks: f32,
)
pub fn apply( &self, root: &mut ModelPart, state: &AnimationState, age_in_ticks: f32, )
KeyframeAnimation.apply(state, ageInTicks): while state is started, the pose
age_in_ticks gives, added to root’s parts.
pub fn apply_scaled(
&self,
root: &mut ModelPart,
state: &AnimationState,
age_in_ticks: f32,
speed_factor: f32,
)
pub fn apply_scaled( &self, root: &mut ModelPart, state: &AnimationState, age_in_ticks: f32, speed_factor: f32, )
KeyframeAnimation.apply(state, ageInTicks, speedFactor): as Self::apply, played
speed_factor times as fast.
pub fn apply_walk(
&self,
root: &mut ModelPart,
walk_pos: f32,
walk_speed: f32,
speed_factor: f32,
scale_factor: f32,
)
pub fn apply_walk( &self, root: &mut ModelPart, walk_pos: f32, walk_speed: f32, speed_factor: f32, scale_factor: f32, )
KeyframeAnimation.applyWalk(walkAnimationPos, walkAnimationSpeed, speedFactor, scaleFactor): the animation timed by a walk cycle, its strength by the walk speed.
pub fn apply_static(&self, root: &mut ModelPart)
pub fn apply_static(&self, root: &mut ModelPart)
KeyframeAnimation.applyStatic(): the first frame only.
Trait Implementations§
§impl Clone for KeyframeAnimation
impl Clone for KeyframeAnimation
§fn clone(&self) -> KeyframeAnimation
fn clone(&self) -> KeyframeAnimation
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 more§impl Debug for KeyframeAnimation
impl Debug for KeyframeAnimation
§impl PartialEq for KeyframeAnimation
impl PartialEq for KeyframeAnimation
impl StructuralPartialEq for KeyframeAnimation
Auto Trait Implementations§
impl Freeze for KeyframeAnimation
impl RefUnwindSafe for KeyframeAnimation
impl Send for KeyframeAnimation
impl Sync for KeyframeAnimation
impl Unpin for KeyframeAnimation
impl UnsafeUnpin for KeyframeAnimation
impl UnwindSafe for KeyframeAnimation
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