bevy_svg 0.3.0

Load and draw simple SVG files in Bevy.

bevy_svg license

For one of my personal projects i needed a way to load and display some simple SVG files/shapes in Bevy, so i took inspiration from bevy_prototype_lyon and modified and extended it to...well...load and display simple SVG files. It currently is rather limited. Ideally, this will change in the future. Currently i use usvg to load, parse and simplify an SVG or SVGZ file and afterwards use Lyon to tessellate and draw it as a Bevy mesh. SVG files with multiple colors are also working.

Something else that i want to change, is how i load the SVG file. This would ideally use the Bevy asset manager, but i didn't have the time to take a deeper look at how it works or how i can integrate with it.

The main-branch will track Bevy's main-branch as closely as i can with the free time i have. From Bevy 0.5 on, i will create a branch for each 0.* release to be able to implement fixes and maybe backport some features.


Complex shapes

As you can see, even shapes with complex forms are working.

Multiple colors

Multiple colors are also working.


This crate is not yet on because it uses Bevy master. But i am planning to publish it as soon as Bevy 0.5 is released. Until then, you need to copy this to your Cargo.toml

bevy_svg = { git = "", branch = "main" }

Then use it like this.

fn main() {
        .insert_resource(Msaa { samples: 4 })
        .insert_resource(WindowDescriptor {
            title: "SVG Plugin".to_string(),

/// Just a marker.
struct SVG;

fn svg_drawer(commands: &mut Commands) {
            .position(Vec3::new(0.0, 0.0, 0.0))
            .expect("File not found")