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

Added arc_2d function for gizmos #8448

Merged
merged 14 commits into from
Apr 21, 2023
Merged

Conversation

Kjolnyr
Copy link
Contributor

@Kjolnyr Kjolnyr commented Apr 20, 2023

Objective

Added the possibility to draw arcs in 2d via gizmos

Solution

  • Added arc_2d function to Gizmos
  • Added arc_inner function
  • Added Arc2dBuilder<'a, 's>
  • Updated 2d_gizmos.rs example to draw an arc

@alice-i-cecile alice-i-cecile added C-Enhancement A new feature A-Gizmos Visual editor and debug gizmos labels Apr 20, 2023
Kjolnyr and others added 3 commits April 20, 2023 18:32
@Kjolnyr
Copy link
Contributor Author

Kjolnyr commented Apr 21, 2023

@devil-ira can you confirm that my dynamic segment implementation is correct?

crates/bevy_gizmos/src/gizmos.rs Outdated Show resolved Hide resolved
crates/bevy_gizmos/src/gizmos.rs Show resolved Hide resolved
crates/bevy_gizmos/src/gizmos.rs Outdated Show resolved Hide resolved
examples/wasm/assets Outdated Show resolved Hide resolved
crates/bevy_gizmos/src/gizmos.rs Outdated Show resolved Hide resolved
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Left a suggestion for improved docs. Once that's accepted or revised, this LGTM and I'll merge :)

crates/bevy_gizmos/src/gizmos.rs Outdated Show resolved Hide resolved
Kjolnyr and others added 2 commits April 21, 2023 16:55
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
@Kjolnyr
Copy link
Contributor Author

Kjolnyr commented Apr 21, 2023

@alice-i-cecile revision accepted! You doc proposal is much clearer.

My last commit has a change in the code, there was a bug following @devil-ira 's lerp implementation proposal that I didn't catch. It was about DEFAULT_CIRCLE_SEGMENTS being an usize but multiplied with a f32. I don't think this bug fix require a new review though, let me know otherwise.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 21, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 21, 2023
Merged via the queue into bevyengine:main with commit ddefc24 Apr 21, 2023
@Kjolnyr Kjolnyr deleted the arc_gizmos branch April 24, 2023 07:38
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-Enhancement A new feature 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.

3 participants