-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
More gizmos builders #13261
More gizmos builders #13261
Conversation
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 pretty good! This seems to be a breaking change though since it renames circle_segments
to segments
, and also changes the way the sphere primitive gizmo is rendered.
It looks like your PR is a breaking change, but you didn't provide a migration guide. Could you add some context on what users should update when this change get released in a new version of Bevy? |
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.
I just have a few questions, but overall this is good!
crates/bevy_gizmos/src/circles.rs
Outdated
|
||
// draws one great circle around each of the local axes | ||
Vec3::AXES.into_iter().for_each(|axis| { | ||
let normal = rotation * axis; |
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.
let normal = rotation * axis; | |
let normal = *rotation * axis; |
getting a compile error here.
@lynn-lumen once CI is green and merge conflicts are resolved I'll merge this in. |
Objective
Annulus
-gizmos #13233Solution
gizmos.primitive_2d(CIRCLE)
andgizmos.primitive_2d(ELLIPSE)
now returnEllipse2dBuilder
aswell.gizmos.primitive_3d(SPHERE)
andgizmos.sphere()
now return the sameSphereBuilder
..circle_segments
method on theSphereBuilder
that used to be returned by.sphere()
is now called.segments
gizmos.sphere
gizmogizmos.primitive_2d(ANNULUS)
now returns aAnnulus2dBuilder
allowing the configuration of thesegments
gizmos.sphere
Migration Guide
gizmos.primitive_nd
methods now return some or different builders. You may need to adjust types and match statementscircle_segments()
with.segments()