From e800d2854ae935de1146a6f675c2cdf92012218e Mon Sep 17 00:00:00 2001 From: Al McElrath Date: Thu, 12 Oct 2023 09:49:11 -0700 Subject: [PATCH] Add Lerp impl for BorderColor --- src/implemented.rs | 11 +++++++++++ src/plugin.rs | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/implemented.rs b/src/implemented.rs index 6e827e1..cfa2a49 100644 --- a/src/implemented.rs +++ b/src/implemented.rs @@ -36,6 +36,17 @@ impl Lerp for EaseValue { } } +#[cfg(all(feature = "ui", feature = "render"))] +impl Lerp for EaseValue { + type Scalar = f32; + + fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self { + EaseValue(BorderColor( + EaseValue(self.0 .0).lerp(&EaseValue(other.0 .0), scalar).0, + )) + } +} + impl Lerp for EaseValue { type Scalar = f32; diff --git a/src/plugin.rs b/src/plugin.rs index 85dbfa7..c34efeb 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -21,6 +21,8 @@ impl Plugin for EasingsPlugin { app.add_systems(Update, ease_system::