Bevy tracking crates.io docs.rs

Bevy Sparrow XML Parser

This Crate is a plugin for Bevy to parse SpriteSheet XMLs! Most Useful in using assets from Adobe Animate.

Using this Crate

Here below is some example code on how'd you use the crate:

```rust ignore use bevy::prelude::; use bevy_xml::;

fn yourstartupsystem(mut textureatlases: ResMut>, assetloader: Res) { let bfs = textureatlases.add(TextureAtlas::newempty(assetloader.load("images/bf.png"), Vec2::new(8192.0, 4096.0))); // handle let Some(bf) = textureatlases.getmut(&bfs) else { return }; let xml = SpriteXMLBundle::new("assets/images/bf.xml".tostring(), &bfs, bf);

match xml {
    Some(c) =>
    {
        commands.spawn(c);
    },
    None =>
    {
        error!("Failed to Parse XML!");
    }

}

}

// system fn updateframesystem(mut query: Query<(&mut SpriteXML, &mut TextureAtlasSprite, &mut Transform), With>) { for (mut xml, mut sprite, mut trans) in query.itermut() { xml.getnext_frame(&mut sprite, &mut trans); } } ```

What this Crate gives you

This crate only gives you new() and getnextframe(), offsets are by the crate. The animation system is for you to implement!

Disclaimer!

I've never published a crate before so if there are any issues please give me feedback!