Rename the repeat nodes to replace "Instance" terminology with "Repeat"#3794
Rename the repeat nodes to replace "Instance" terminology with "Repeat"#3794
Conversation
Keavon
commented
Feb 20, 2026
- Repeat -> Repeat Array
- Circular Repeat -> Repeat Radial
- Instance on Points -> Repeat on Points
- Instance Repeat -> Repeat
Summary of ChangesHello @Keavon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant refactoring effort to enhance the organization and clarity of repeat-related functionalities within the node graph system. By introducing a dedicated Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors several nodes related to repeating elements, renaming them from "Instance" to "Repeat" and moving them into a new repeat-nodes crate. The changes are generally well-executed, but I've found a few issues, including a critical division-by-zero bug in the new repeat_array node, a broken test that was not moved with its corresponding code, an unnecessary dependency, and an opportunity to improve code clarity in the moved mirror node. Please see my detailed comments for suggestions.
| ) -> Table<T> { | ||
| let angle = angle.to_radians(); | ||
| let count = count.max(1); | ||
| let total = (count - 1) as f64; |
There was a problem hiding this comment.
When count is 1, total becomes 0, which will cause a division by zero on lines 69 and 70. This can result in NaN values in the transformation matrix. This should be handled to avoid undefined behavior. A simple fix is to ensure total is at least 1.
| let total = (count - 1) as f64; | |
| let total = (count - 1).max(1) as f64; |
| async fn repeat_radial() { | ||
| let repeated = super::repeat_radial(Footprint::default(), vector_node_from_bezpath(Rect::new(-1., -1., 1., 1.).to_path(DEFAULT_ACCURACY)), 45., 4., 8).await; |
There was a problem hiding this comment.
| for instance in content.clone().into_iter() { | ||
| result_table.push(instance); | ||
| } |
|
|
||
| # Workspace dependencies | ||
| glam = { workspace = true } | ||
| rand = { workspace = true } |
Performance Benchmark Results
|
Performance Benchmark Results
|
Performance Benchmark Results
|
Fix tests
5dc6ca5 to
d54d6ac
Compare
Performance Benchmark Results
|