Skip to content

Load libgdx texture atlas (sprite sheet) files as Bevy assets.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rustunit/bevy_libgdx_atlas

Repository files navigation

bevy_libgdx_atlas

Following released Bevy versions crates.io docs.rs discord

Support loading libgdx.atlas files (used for sprite sheets and such) as Bevy assets.

Read the article with more context around sprite atlases in Bevy on the rustunit blog.

Usage

Pack your spritesheet using https://github.com/crashinvaders/gdx-texture-packer-gui

Texture packer example

Add the LibGdxAssetPlugin to your app:

use bevy::prelude::*;
use bevy_libgdx_atlas::*;

let app = App::new();
app.add_plugins(MinimalPlugins);
app.add_plugins(AssetPlugin::default());
app.add_plugins(LibGdxAssetPlugin);

Now when you load files with the .libgdx.atlas extension through the asset server, or even bevy_asset_loader, they will load as a LibGdxAtlasAsset which you can then use.

Animated spritesheet example

Tip

Run cargo run --example animation to see this example for yourself!

Contributing

See our CONTRIBUTING.md

Our Other Crates

Compatible Bevy Versions

bevy bevy_libgdx_atlas
0.14 0.2
0.13 0.1

License

bevy_libgdx_atlas is dual-licensed under either MIT or Apache 2.0, at your option.

About

Load libgdx texture atlas (sprite sheet) files as Bevy assets.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project