Skip to content

Commit a06802a

Browse files
authored
Make AnimatableCurve::curve public (#15831)
# Objective The other `Curve -> AnimationCurve` wrappers allow public access to the inner curve, so this one should as well. ## Solution Made the field public. Instances will still need to be constructed using the (more ergonomic) `from_curve` method, which infers the phantom type for the user.
1 parent 922a25d commit a06802a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/bevy_animation/src/animation_curves.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ impl<T, C> AnimationCompatibleCurve<T> for C where C: Curve<T> + Debug + Clone +
187187
#[derive(Reflect, FromReflect)]
188188
#[reflect(from_reflect = false)]
189189
pub struct AnimatableCurve<P, C> {
190-
curve: C,
190+
/// The inner [curve] whose values are used to animate the property.
191+
///
192+
/// [curve]: Curve
193+
pub curve: C,
191194
#[reflect(ignore)]
192195
_phantom: PhantomData<P>,
193196
}

0 commit comments

Comments
 (0)