Skip to content
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

Add Rounded box gizmos #11948

Merged
merged 18 commits into from
May 16, 2024
Merged

Conversation

lynn-lumen
Copy link
Contributor

@lynn-lumen lynn-lumen commented Feb 18, 2024

Objective

Solution

  • Added Gizmos::rounded_cuboid, Gizmos::rounded_rect and Gizmos::rounded_rect_2d.
  • All of these return builders that allow configuring of the corner/edge radius using .corner_radius(...) or .edge_radius(...) as well as the line segments of each arc using .arc_segments(...).

Changelog

  • Added a new rounded_box module to bevy_gizmos containing all of the above methods and builders.
  • Updated the examples 2d_gizmos and 3d_gizmos

Additional information

The 3d example now looks like this:

Screenshot 2024-02-28 at 01 47 28

And this is the updated 2d example showcasing negative corner radius:

Screenshot 2024-02-28 at 01 59 37 Screenshot 2024-02-28 at 01 59 47

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Gizmos Visual editor and debug gizmos labels Feb 18, 2024
@james7132 james7132 added this to the 0.14 milestone Feb 18, 2024
@nicopap nicopap mentioned this pull request Feb 20, 2024
57 tasks
@alice-i-cecile alice-i-cecile added the M-Needs-Release-Note Work that should be called out in the blog due to impact label Feb 22, 2024
@JMS55 JMS55 requested a review from nicopap April 25, 2024 02:44
Copy link
Contributor

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

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

Never reviewed gizmo stuff before, but lgtm.

crates/bevy_gizmos/src/rounded_box.rs Outdated Show resolved Hide resolved
crates/bevy_gizmos/src/rounded_box.rs Outdated Show resolved Hide resolved
lynn-lumen and others added 2 commits April 25, 2024 09:52
Co-authored-by: JMS55 <[email protected]>
Co-authored-by: JMS55 <[email protected]>
@lynn-lumen lynn-lumen requested a review from JMS55 April 25, 2024 15:15
Copy link
Contributor

@jgayfer jgayfer left a comment

Choose a reason for hiding this comment

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

Not a Gizmo export by any means, but ran the examples and overall looks good to me.

Could be nice to pull that default into a constant, but not blocking.

crates/bevy_gizmos/src/rounded_box.rs Show resolved Hide resolved
crates/bevy_gizmos/src/rounded_box.rs Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label May 13, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 16, 2024
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 16, 2024
Merged via the queue into bevyengine:main with commit 05e2552 May 16, 2024
29 checks passed
@alice-i-cecile
Copy link
Member

Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1315 if you'd like to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Gizmos Visual editor and debug gizmos C-Feature A new feature, making something new possible M-Needs-Release-Note Work that should be called out in the blog due to impact S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants