Skip to content

Commit 5707317

Browse files
Keavontimon-schelling
authored andcommitted
Add fast path at t=0
1 parent d6f5782 commit 5707317

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

node-graph/nodes/vector/src/vector_nodes.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,6 +2298,20 @@ async fn morph<I: IntoGraphicTable + 'n + Send + Clone>(
22982298
}
22992299
}
23002300

2301+
// Fast path: when exactly at the source object, clone its geometry directly instead of
2302+
// extracting manipulator groups, subdividing, interpolating, and rebuilding the vector.
2303+
if time == 0. {
2304+
let mut vector = source_row.element.clone();
2305+
vector.upstream_data = Some(graphic_table_content);
2306+
2307+
return Table::new_from_row(TableRow {
2308+
element: vector,
2309+
transform: lerped_transform,
2310+
alpha_blending: *source_row.alpha_blending,
2311+
..Default::default()
2312+
});
2313+
}
2314+
23012315
let mut vector = Vector {
23022316
upstream_data: Some(graphic_table_content),
23032317
..Default::default()

0 commit comments

Comments
 (0)