Deprecate shapes in bevy_render::mesh::shape#11773
Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom Feb 8, 2024
Merged
Deprecate shapes in bevy_render::mesh::shape#11773alice-i-cecile merged 5 commits intobevyengine:mainfrom
bevy_render::mesh::shape#11773alice-i-cecile merged 5 commits intobevyengine:mainfrom
Conversation
bevy_render::mesh::shapesbevy_render::mesh::shape
NthTensor
reviewed
Feb 7, 2024
Comment on lines
+36
to
42
| #[deprecated( | ||
| since = "0.13.0", | ||
| note = "please use the `Cuboid` primitive for meshing or `Aabb2d` for a bounding volume" | ||
| )] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct Box { | ||
| pub min_x: f32, |
alice-i-cecile
approved these changes
Feb 8, 2024
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
Nice deprecation notices :)
NthTensor
approved these changes
Feb 8, 2024
Contributor
NthTensor
left a comment
There was a problem hiding this comment.
Looks great. This must have been pretty tedious. Really appreceate how quickly you got this in.
| } | ||
|
|
||
| #[test] | ||
| fn test_regular_polygon() { |
Contributor
There was a problem hiding this comment.
Document the purpose of this test please. I'm not sure I could fix this if I broke it.
Contributor
Author
There was a problem hiding this comment.
It's not my test, it was added by #11017. Personally, I find it to be a bit redundant and would remove it, but it was on the old RegularPolygon type so I kept it for now.
Contributor
There was a problem hiding this comment.
"Document RegularPolygon by writing a test" and then proceeds to write no documentation for the test.
Fair enough.
41 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#11431 and #11688 implemented meshing support for Bevy's new geometric primitives. The next step is to deprecate the shapes in
bevy_render::mesh::shapeand to later remove them completely for 0.14.Solution
Deprecate the shapes and reduce code duplication by utilizing the primitive meshing API for the old shapes where possible.
Note that some shapes have behavior that can't be exactly reproduced with the new primitives yet:
Boxis more of an AABB with min/max extentsPlanesupports a subdivision countQuadhas aflippedpropertyThese types have not been changed to utilize the new primitives yet.
Changelog
bevy_render::mesh::shapeMigration Guide
Bevy has previously used rendering-specific types like
UVSphereandQuadfor primitive mesh shapes. These have now been deprecated to use the geometric primitives newly introduced in version 0.13.Some examples: