Skip to content

Commit f594a29

Browse files
committed
Add fast path at t=0
1 parent 17a6942 commit f594a29

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

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

2284+
// Fast path: when exactly at the source object, clone its geometry directly instead of
2285+
// extracting manipulator groups, subdividing, interpolating, and rebuilding the vector.
2286+
if time == 0. {
2287+
let mut vector = source_row.element.clone();
2288+
vector.upstream_data = Some(graphic_table_content);
2289+
2290+
return Table::new_from_row(TableRow {
2291+
element: vector,
2292+
transform: lerped_transform,
2293+
alpha_blending: *source_row.alpha_blending,
2294+
..Default::default()
2295+
});
2296+
}
2297+
22842298
let mut vector = Vector {
22852299
upstream_data: Some(graphic_table_content),
22862300
..Default::default()

0 commit comments

Comments
 (0)