Open shanecelis opened 1 year ago
Here are some screenshots of the viewer and the cone with and without the normal fix.
Thank you for the PR!
I think this functionality is useful, but it should probably not live in genmesh
itself. Problem is genmesh depending on bevy. This problem is two-fold:
Thanks for looking it over. I'll consider adding a PR to bevy with a "genmesh" feature. It's really the orphan rules that force this kind of feature to live in genmesh or bevy, but I agree bevy would be the right place for it to live.
Add a cargo feature "into_bevy_mesh" that will provide a
From
implementation so generators likeCube
can be turned into a bevyMesh
. This doesn't add any dependencies on the default features. It does add dependencies onbevy_render
andglam
when the feature is enabled.Add an example called "viewer" that uses this feature to view the generators. It's a small bevy app with some camera control. I did discover a bug in a cone normal so plus one for visualization.