diff --git a/Cargo.toml b/Cargo.toml index 1526758..02297e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ bevy = { version = "0.12", default-features = false, features = [ ] } bitfield = "0.14" interpolation = "0.2" +interpolation_03 = { package = "interpolation", version = "0.3", optional = true } thiserror = "1.0" wgpu-types = "0.17" diff --git a/src/lib.rs b/src/lib.rs index ea15eb6..63b9cd3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -113,6 +113,15 @@ impl Lerp for OutlineStencil { } } +#[cfg(feature = "interpolation_03")] +impl interpolation_03::Lerp for OutlineStencil { + type Scalar = f32; + + fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self { + ::lerp(self, other, scalar) + } +} + /// A component for rendering outlines around meshes. #[derive(Clone, Component, Default)] pub struct OutlineVolume { @@ -142,6 +151,15 @@ impl Lerp for OutlineVolume { } } +#[cfg(feature = "interpolation_03")] +impl interpolation_03::Lerp for OutlineVolume { + type Scalar = f32; + + fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self { + ::lerp(self, other, scalar) + } +} + /// A component for specifying what layer(s) the outline should be rendered for. #[derive(Component, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Deref, DerefMut, Default)] pub struct OutlineRenderLayers(pub RenderLayers);