From a53cb810eb646465218f4f3991c057e10f05188e Mon Sep 17 00:00:00 2001 From: Lynn <62256001+solis-lumine-vorago@users.noreply.github.com> Date: Fri, 22 Mar 2024 00:33:34 +0100 Subject: [PATCH] Implement MixedColor and CurvedColor for all applicable colors Co-authored-by: Zachary Harrold --- examples/animation/color_animation.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/animation/color_animation.rs b/examples/animation/color_animation.rs index cde5797b20385..813fcf4c72feb 100644 --- a/examples/animation/color_animation.rs +++ b/examples/animation/color_animation.rs @@ -7,15 +7,11 @@ use bevy::{ // We define this trait so we can reuse the same code for multiple color types that may be implemented using curves. trait CurveColor: Point + Into + Send + Sync + 'static {} -impl CurveColor for LinearRgba {} -impl CurveColor for Oklaba {} -impl CurveColor for Xyza {} +impl + Send + Sync + 'static> CurveColor for T {} // We define this trait so we can reuse the same code for multiple color types that may be implemented using mixing. trait MixedColor: Mix + Into + Send + Sync + 'static {} -impl MixedColor for Oklcha {} -impl MixedColor for Srgba {} -impl MixedColor for Hsla {} +impl + Send + Sync + 'static> MixedColor for T {} #[derive(Debug, Component)] struct Curve(CubicCurve);