Add interpolation 0.3 compatability feature.
This commit is contained in:
parent
9a464ceb4c
commit
1dce5a267e
|
@ -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"
|
||||
|
||||
|
|
18
src/lib.rs
18
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 {
|
||||
<Self as Lerp>::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 {
|
||||
<Self as Lerp>::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);
|
||||
|
|
Loading…
Reference in New Issue