Skip to content

Commit

Permalink
Make AnimatableCurve::curve public (bevyengine#15831)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
mweatherley authored Oct 10, 2024
1 parent 922a25d commit a06802a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/bevy_animation/src/animation_curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ impl<T, C> AnimationCompatibleCurve<T> for C where C: Curve<T> + Debug + Clone +
#[derive(Reflect, FromReflect)]
#[reflect(from_reflect = false)]
pub struct AnimatableCurve<P, C> {
curve: C,
/// The inner [curve] whose values are used to animate the property.
///
/// [curve]: Curve
pub curve: C,
#[reflect(ignore)]
_phantom: PhantomData<P>,
}
Expand Down

0 comments on commit a06802a

Please sign in to comment.