Fix interpolation of enabled flag.
This commit is contained in:
parent
7b5650fbdb
commit
c70c3d3b76
@ -113,10 +113,12 @@ impl Lerp for OutlineVolume {
|
|||||||
|
|
||||||
fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self {
|
fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self {
|
||||||
OutlineVolume {
|
OutlineVolume {
|
||||||
visible: if *scalar >= 0.5 {
|
visible: if *scalar <= 0.0 {
|
||||||
|
self.visible
|
||||||
|
} else if *scalar >= 1.0 {
|
||||||
other.visible
|
other.visible
|
||||||
} else {
|
} else {
|
||||||
self.visible
|
self.visible | other.visible
|
||||||
},
|
},
|
||||||
width: self.width.lerp(&other.width, scalar),
|
width: self.width.lerp(&other.width, scalar),
|
||||||
colour: {
|
colour: {
|
||||||
|
Loading…
Reference in New Issue
Block a user