Replace the 'Vec2 to Point' node with automatic conversion machinery#4236
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the "Vec2 to Point" node with an automatic type conversion from DVec2 to List<Vector> using a new FromAnchorPosition trait and Convert trait implementations. It also renames several type-assertion nodes from "To [Type]" to "As [Type]" (such as as_u32, as_u64, as_f64, and as_string), updates the document migration logic to handle these renames, and adjusts left_apply_transform for DVec2 to apply the transform directly rather than its inverse. I have no feedback to provide as there are no review comments to assess.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| } | ||
| } | ||
|
|
||
| // Identity item conversion so `List<Vector>` satisfies the blanket `Convert<List<U>, ()> for List<T>`, letting its |
There was a problem hiding this comment.
Could we make this less verbose?
…4236) * Replace the 'Vec2 to Point' node with an 'As Vector' node and automatic conversion * Accept a Vec2 as content for the Wrap Graphic node * Rename the type-assertion nodes from 'To' to 'As' * Fix the Transform node reversing a Vec2 input's direction * Fix text migration bug
This removes the 'Vec2 to Point' node and it now auto-converts where possible (when it feeds a concrete, single-type input connector). If users need to plug a Vec2 into a generic (multi-type) input, they can also now pass it through the 'As Vector' type assertion node. Also, the generic (multi-type) 'Wrap Graphic' node, which is used by the Merge layer node subgraph, also now takes Vec2 (Rust type
DVec2) since it's a common case. And this PR also renames 'To String' -> 'As String', 'To f64' -> 'As f64', 'To u32' -> 'As u32', and 'To u64' -> 'As u64' type assertion nodes for consistency with the new 'As Vector'.