Skip to content

Replace the 'Vec2 to Point' node with automatic conversion machinery#4236

Merged
Keavon merged 5 commits into
masterfrom
convert-vec2-to-vector
Jun 15, 2026
Merged

Replace the 'Vec2 to Point' node with automatic conversion machinery#4236
Keavon merged 5 commits into
masterfrom
convert-vec2-to-vector

Conversation

@Keavon

@Keavon Keavon commented Jun 14, 2026

Copy link
Copy Markdown
Member

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'.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

}
}

// Identity item conversion so `List<Vector>` satisfies the blanket `Convert<List<U>, ()> for List<T>`, letting its

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make this less verbose?

@Keavon Keavon merged commit 6968cd9 into master Jun 15, 2026
10 of 13 checks passed
@Keavon Keavon deleted the convert-vec2-to-vector branch June 15, 2026 02:35
Keavon added a commit that referenced this pull request Jun 15, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants