-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add individual corner radius support #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @MinCrohn, 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 significantly enhances the Highlights
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.
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 introduces support for individual corner radii, which is a great enhancement. The changes to the data schema, texture caching, and mixin are well-implemented. However, I've identified two high-severity issues in the rect.js texture creation logic that could lead to rendering errors. Specifically, the calculation for the 9-slice metadata can produce NaN values, and the logic for drawing rounded rectangles doesn't correctly use the parsed radius values, potentially leading to errors when partial radius objects are provided. Please address these points to ensure the new feature is robust.
|
/gemini review |
There was a problem hiding this comment.
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 introduces a valuable enhancement by adding support for individual corner radii on rect textures. The changes are well-structured, touching upon the data schema, texture generation logic, and cache key creation. The modification in Sourceable.js to automatically apply 9-slice metadata is a nice touch. I've identified one high-severity issue in the calculation of the slice dimensions that could lead to visual glitches with borders. My feedback includes a specific suggestion to address this.
|
/gemini review |
There was a problem hiding this comment.
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 introduces a valuable enhancement by adding support for individual corner radii on rect textures. The implementation is well-executed, with necessary updates to the data schema, texture creation logic, and caching mechanism. The code is clear and the changes are logically structured. I have one minor suggestion to improve code clarity and correctness.
|
/gemini review |
There was a problem hiding this comment.
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 introduces support for individual corner radii on rect textures, which is a great enhancement. The implementation is solid, covering schema updates, texture creation, caching, and application to display objects. I've identified a few areas for improvement, primarily concerning input validation for radius values to prevent negative numbers and a more precise calculation of the 9-slice dimensions to better match PixiJS's default stroke behavior. These changes will improve the robustness and accuracy of the new feature.
|
/gemini review |
There was a problem hiding this comment.
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 introduces support for individual corner radii in the TextureStyle for rect types. The changes include modifications to rect.js, utils.js, primitive-schema.js, and Sourceable.js to accommodate the new feature. The cacheKey function in utils.js is updated to stringify the config values, and the TextureStyle schema in primitive-schema.js is updated to allow for individual radius values. The createRect function in rect.js is modified to handle both uniform and individual corner radii. The Sourceable mixin is updated to assign texture metadata. I have identified a potential issue with the getSliceDimension function in rect.js where it might not handle undefined radius values correctly, and have provided a code suggestion to address this.
Purpose of Change
This PR enhances
TextureStyleforrecttypes to support individual corner radius values (topLeft, topRight, etc.).Usage Example