New node: Morph (#1576)

* Add morph node

* Range slider time parameter, better lerping

* Lerp more fill and stroke parameters

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2024-01-14 07:35:40 +00:00
committed by GitHub
parent 768bbe820d
commit 484acbcde3
10 changed files with 240 additions and 29 deletions

View File

@@ -853,7 +853,7 @@ impl Color {
///
/// T must be between 0 and 1.
#[inline(always)]
pub fn lerp(self, other: Color, t: f32) -> Self {
pub fn lerp(&self, other: &Color, t: f32) -> Self {
assert!((0. ..=1.).contains(&t));
Color::from_rgbaf32_unchecked(
self.red + ((other.red - self.red) * t),