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-13 23:35:40 -08:00
committed by GitHub
co-authored by Keavon Chambers
parent 768bbe820d
commit 484acbcde3
10 changed files with 240 additions and 29 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ impl<ManipulatorGroupId: crate::Identifier> Subpath<ManipulatorGroupId> {
&self.manipulator_groups
}
/// Returns a mutable vec of the [ManipulatorGroup]s in the `Subpath`.
/// Returns a mutable reference to the [ManipulatorGroup]s in the `Subpath`.
pub fn manipulator_groups_mut(&mut self) -> &mut Vec<ManipulatorGroup<ManipulatorGroupId>> {
&mut self.manipulator_groups
}
@@ -111,6 +111,12 @@ impl<ManipulatorGroupId: crate::Identifier> ManipulatorGroup<ManipulatorGroupId>
pub fn is_finite(&self) -> bool {
self.anchor.is_finite() && self.in_handle.map_or(true, |handle| handle.is_finite()) && self.out_handle.map_or(true, |handle| handle.is_finite())
}
/// Reverse directions of handles
pub fn flip(mut self) -> Self {
std::mem::swap(&mut self.in_handle, &mut self.out_handle);
self
}
}
#[derive(Copy, Clone)]