diff --git a/crates/bevy_animation/src/animation_curves.rs b/crates/bevy_animation/src/animation_curves.rs index 746b6f8b9d..c7825e9066 100644 --- a/crates/bevy_animation/src/animation_curves.rs +++ b/crates/bevy_animation/src/animation_curves.rs @@ -65,7 +65,6 @@ //! - [`TranslationCurve`], which uses `Vec3` output to animate [`Transform::translation`] //! - [`RotationCurve`], which uses `Quat` output to animate [`Transform::rotation`] //! - [`ScaleCurve`], which uses `Vec3` output to animate [`Transform::scale`] -//! - [`TransformCurve`], which uses `Transform` output to animate the entire `Transform` //! //! ## Animatable properties //! @@ -370,45 +369,6 @@ where } } -/// This type allows a [curve] valued in `Transform` to become an [`AnimationCurve`] that animates -/// a transform. -/// -/// This exists primarily as a convenience to animate entities using the entire transform at once -/// instead of splitting it into pieces and animating each part (translation, rotation, scale). -/// -/// [curve]: Curve -#[derive(Debug, Clone, Reflect, FromReflect)] -#[reflect(from_reflect = false)] -pub struct TransformCurve(pub C); - -impl AnimationCurve for TransformCurve -where - C: AnimationCompatibleCurve, -{ - fn clone_value(&self) -> Box { - Box::new(self.clone()) - } - - fn domain(&self) -> Interval { - self.0.domain() - } - - fn apply<'a>( - &self, - t: f32, - transform: Option>, - _entity: AnimationEntityMut<'a>, - weight: f32, - ) -> Result<(), AnimationEvaluationError> { - let mut component = transform.ok_or_else(|| { - AnimationEvaluationError::ComponentNotPresent(TypeId::of::()) - })?; - let new_value = self.0.sample_clamped(t); - *component = ::interpolate(&component, &new_value, weight); - Ok(()) - } -} - /// This type allows an [`IterableCurve`] valued in `f32` to be used as an [`AnimationCurve`] /// that animates [morph weights]. ///