pub fn add_animation(&mut self, animation: Box<dyn Animation<InstanceParameter>>) {
		if let Some(old_animation) = self.animation.replace(animation) {
			let mut parameters = self.create_parameter();
			old_animation.finish(&mut parameters);
			self.update_with_parameter(parameters);
		}
	}
/// Adds an animation onto the Instance.
/// If an animation is already present, it is finished before the new one is applied.
Adds an animation onto the Instance.
If an animation is already present, it is finished before the new one is applied.
Adds an animation onto the Instance . If an animation is already present it is finished before the new one is applied .
pub fn add_animation(&mut self, animation: Box<dyn Animation<InstanceParameter>>) {
		if let Some(old_animation) = self.animation.replace(animation) {
			let mut parameters = self.create_parameter();
			old_animation.finish(&mut parameters);
			self.update_with_parameter(parameters);
		}
	}
pub fn add_animation ( & mut self , animation : Box < dyn Animation < InstanceParameter > > ) { if let Some ( old_animation ) = self . animation . replace ( animation ) { let mut parameters = self . create_parameter ( ) ; old_animation . finish ( & mut parameters ) ; self . update_with_parameter ( parameters ) ; } }
Adds an animation onto the Instance.
Adds an animation onto the Instance .
&mut self
animation
Box<dyn Animation<InstanceParameter>>
&mut self
animation
Box<dyn Animation<InstanceParameter>>