-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Gizmos: arc_2d
utility helpers
#14932
Merged
alice-i-cecile
merged 7 commits into
bevyengine:main
from
RobWalt:arc-2d-utility-helper
Aug 28, 2024
Merged
Gizmos: arc_2d
utility helpers
#14932
alice-i-cecile
merged 7 commits into
bevyengine:main
from
RobWalt:arc-2d-utility-helper
Aug 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
approved these changes
Aug 26, 2024
bushrat011899
approved these changes
Aug 28, 2024
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.
Looks good, excellent documentation!
Merge conflicting with #14676 now, sorry! |
- `arc_2d` wasn't doing what the docs said anymore - `long_arc_2d_between` and `short_arc_2d_between` have been added
c63d59b
to
13dcf5e
Compare
No worries, not a problem at all! 💚 Oops just now noticed that the showcase example posted didn't really do what the code said. Updated it now BeforeAfterCode my_gizmos.arc_2d(Isometry2d::IDENTITY, FRAC_PI_2, 80.0, ORANGE_RED);
my_gizmos.short_arc_2d_between(Vec2::ZERO, Vec2::X * 40.0, Vec2::Y * 40.0, ORANGE_RED);
my_gizmos.long_arc_2d_between(Vec2::ZERO, Vec2::X * 20.0, Vec2::Y * 20.0, ORANGE_RED); |
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-Usability
A targeted quality-of-life change that makes Bevy easier to use
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Since #14731 is merged, it unblocked a few utility methods for 2D arcs. In 2D the pendant to
long_arc_3d_between
andshort_arc_3d_between
are missing. Sincearc_2d
can be a bit hard to use, this PR is trying to plug some holes in thearcs
API.Solution
Implement
long_arc_2d_between(center, from, tp, color)
short_arc_2d_between(center, from, tp, color)
Testing
2d_gizmos
example has been extended a bit to include a few more arcs which can easily be checked with respect to the gridShowcase
Code related to the screenshot (from outer = first line to inner = last line)