pub trait Animate: Send + Sync {
// Required method
fn animate(&mut self, elapsed: Duration) -> ControlFlow<Duration>;
}
Expand description
A type that can animate.
Required Methods§
sourcefn animate(&mut self, elapsed: Duration) -> ControlFlow<Duration>
fn animate(&mut self, elapsed: Duration) -> ControlFlow<Duration>
Update the animation by progressing the timeline by elapsed
.
When the animation is complete, return ControlFlow::Break
with the
remaining time that was not needed to complete the animation. This is
used in multi-step animation processes to ensure time is accurately
tracked.