Skip to content

Meshable as Subtype of MeshBuilder#24414

Open
larsraph wants to merge 4 commits into
bevyengine:mainfrom
larsraph:better-builder-vs-meshable
Open

Meshable as Subtype of MeshBuilder#24414
larsraph wants to merge 4 commits into
bevyengine:mainfrom
larsraph:better-builder-vs-meshable

Conversation

@larsraph
Copy link
Copy Markdown
Contributor

@larsraph larsraph commented May 24, 2026

Objective

  • Previously we manually implimented From<{Meshable}> for Mesh {} for every type to avoid colliding with blanket impl for From<impl MeshBuilder> for Mesh {}. This is ugly and hard to maintain.

Solution

  • I made all types that we're Meshable impl MeshBuilder. Now Meshable also impl's Into through it's MeshBuilder trait while also getting a direct builder function.
  • I changed the names of the functions because they would've been confusing with the new setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant