pub struct Playback {
pub clip: usize,
pub elapsed: i64,
pub sample_time: i64,
pub sample_delta: i64,
pub speed: f32,
}Expand description
Single, unique animation playback. Tree expiry starts from an empty animation state. Blended stacks and AnimationManager’s shared instances require their separate lifecycle port.
Fields§
§clip: usizeThe clip.
elapsed: i64The time played so far.
sample_time: i64UpdateNodes publishes the pose at the OLD clock, then Update advances elapsed.
sample_delta: i64The time step of the last sample.
speed: f32The playback speed.
Implementations§
Source§impl Playback
impl Playback
Sourcepub fn new(clip: usize, start: i64) -> Self
pub fn new(clip: usize, start: i64) -> Self
A clip that starts playing at start, at speed 1. Tree removal starts at time zero.
Original: FUN_14012a5c0; AnimationState::PlayAnimation, Runtime 0x1801007e0.
Sourcepub fn is_animating(&self, clip: &AnimationClip) -> bool
pub fn is_animating(&self, clip: &AnimationClip) -> bool
Whether the clip is still playing. The end comes from the clip’s stored duration (with its rounded value), not from frames and rate.
Original: MeshInstance::IsAnimating, Runtime 0x180102060.
Sourcepub fn update(&mut self, clip: &AnimationClip, dt: i64) -> Vec<usize>
pub fn update(&mut self, clip: &AnimationClip, dt: i64) -> Vec<usize>
Port of AnimationState::Update’s unique-state clock and ApplyEvents interval. Returns indices of callbacks in resource order; effect dispatch remains the caller’s responsibility.
Sourcepub fn pose(&self, clip: &AnimationClip) -> Vec<Transform>
pub fn pose(&self, clip: &AnimationClip) -> Vec<Transform>
The pose of the clip at the current time.