mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 01:53:12 +00:00
05e2552a68
# Objective - Implement rounded cuboids and rectangles, suggestion of #9400 ## 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: <img width="1440" alt="Screenshot 2024-02-28 at 01 47 28" src="https://github.com/bevyengine/bevy/assets/62256001/654e30ca-c091-4f14-a402-90138e95c71b"> And this is the updated 2d example showcasing negative corner radius: <img width="1440" alt="Screenshot 2024-02-28 at 01 59 37" src="https://github.com/bevyengine/bevy/assets/62256001/3904697a-5462-4ee7-abd9-3e893ca07082"> <img width="1440" alt="Screenshot 2024-02-28 at 01 59 47" src="https://github.com/bevyengine/bevy/assets/62256001/a8892cfd-3aad-4c0c-87eb-559c17c8864c"> --------- Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com> Co-authored-by: James Gayfer <10660608+jgayfer@users.noreply.github.com> |
||
---|---|---|
.. | ||
primitives | ||
aabb.rs | ||
arcs.rs | ||
arrows.rs | ||
circles.rs | ||
config.rs | ||
gizmos.rs | ||
grid.rs | ||
lib.rs | ||
light.rs | ||
line_joints.wgsl | ||
lines.wgsl | ||
pipeline_2d.rs | ||
pipeline_3d.rs | ||
rounded_box.rs |