Adds serde derives to CubicCurve behind feature flag

This commit is contained in:
mnmaita 2024-06-15 23:09:43 +02:00
parent aaccbe88aa
commit 11500a3b6c

View file

@ -810,6 +810,11 @@ impl CubicSegment<Vec2> {
/// [`CubicBezier`].
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug))]
#[cfg_attr(
feature = "serialize",
derive(serde::Serialize, serde::Deserialize),
reflect(Serialize, Deserialize)
)]
pub struct CubicCurve<P: VectorSpace> {
/// Segments of the curve
pub segments: Vec<CubicSegment<P>>,