mirror of
https://github.com/bevyengine/bevy
synced 2024-12-22 02:53:07 +00:00
450a9202d0
# Objective - All `ShapeMeshBuilder`s have some methods/implementations in common. These are `fn build(&self) -> Mesh` and this implementation: ```rust impl From<ShapeMeshBuilder> for Mesh { fn from(builder: ShapeMeshBuilder) -> { builder.build() } } ``` - For the sake of consistency, these can be moved into a shared trait ## Solution - Add `trait MeshBuilder` containing a `fn build(&self) -> Mesh` and implementing `MeshBuilder for ShapeMeshBuilder` - Implement `From<T: MeshBuilder> for Mesh` ## Migration Guide - When calling `.build()` you need to import `bevy_render::mesh::primitives::MeshBuilder` |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |