Closed NiseVoid closed 1 year ago
Thanks for this contribution. slightly_smiling_face I think readability did not get that much worse. I think we could maybe improve it a bit, if we move the type aliases,
WithMesh
,ChangedMesh
andSvgMeshComponents
into the respective...::svg2d::mod.rs
. But i am not really sure if this actually would make it any better. sweat_smile
I'm not sure how the svg2d and svg3d modules would work here, since there are three cases here: 2d enabled, 3d enabled, both enabled (which seems to be broken currently because both renderers add a MaterialPlugin which in turn add a ExtractComponent plugin for Handle
Oh...damn. Looks like that broke when i removed the custom pipelines, but doesn't matter for this PR.
The PR looks good to me. Thanks again!
Some changes to better respect the feature flags, as well as better support for having neither 2d nor 3d enabled, which makes the plugin just provide assets and requires the user to render the svgs theirselves. This change fixes an issue where bevy_sprite can be disabled but even if the 2d feature is disabled this crate fails to compile.
I'm not too happy about how the changes affect readability, so if you have any ideas on how this could be better structured please let me know.