[−][src]Trait polyhorn_ui::animation::Animatable
This trait is implemented by types that can be animated.
Associated Types
type Animator: Animator
[src]
This is the type that can schedule new animations for this object.
type CommandBuffer
[src]
This is the command buffer that this object can piggy-back on.
Required methods
pub fn animate<F>(&mut self, animations: F) where
F: FnOnce(&mut Self::Animator) + Send + 'static,
[src]
F: FnOnce(&mut Self::Animator) + Send + 'static,
This function should invoke the given callback with a mutable reference to (a new instance of) this object's animator.
pub fn animate_with_buffer<F>(
&mut self,
buffer: &mut Self::CommandBuffer,
animations: F
) where
F: FnOnce(&mut Self::Animator) + Send + 'static,
[src]
&mut self,
buffer: &mut Self::CommandBuffer,
animations: F
) where
F: FnOnce(&mut Self::Animator) + Send + 'static,
This function should invoke the given callback with a mutable reference to (a new instance of) this object's animator that piggy-backs on the given command buffer. Explicitly passing a command buffer ensures that the animations are started in the same UI event loop iteration as the current render itself.