Skip to content

Commit c55afa3

Browse files
committed
Add fast path at t=0
1 parent 254b50b commit c55afa3

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
@@ -2373,6 +2373,20 @@ async fn morph<I: IntoGraphicTable + 'n + Send + Clone>(
23732373
}
23742374
}
23752375

2376+
// Fast path: when exactly at the source object, clone its geometry directly instead of
2377+
// extracting manipulator groups, subdividing, interpolating, and rebuilding the vector.
2378+
if time == 0. {
2379+
let mut vector = source_row.element.clone();
2380+
vector.upstream_data = Some(graphic_table_content);
2381+
2382+
return Table::new_from_row(TableRow {
2383+
element: vector,
2384+
transform: lerped_transform,
2385+
alpha_blending: *source_row.alpha_blending,
2386+
..Default::default()
2387+
});
2388+
}
2389+
23762390
let mut vector = Vector {
23772391
upstream_data: Some(graphic_table_content),
23782392
..Default::default()

0 commit comments

Comments
 (0)