#assets #bevy #gamedev #gdx

bevy_libgdx_atlas

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

6 releases (3 breaking)

new 0.4.0 Apr 26, 2025
0.3.2 Dec 12, 2024
0.2.0 Sep 10, 2024
0.1.0 Sep 7, 2024

#2425 in Game dev

Download history 7/week @ 2025-02-09 11/week @ 2025-02-16 1/week @ 2025-02-23 7/week @ 2025-03-02 1/week @ 2025-03-09 6/week @ 2025-04-13 54/week @ 2025-04-20

62 downloads per month

MIT/Apache

335KB
229 lines

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 crate
0.16 0.4,main
0.15 0.3
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.

Dependencies

~39–71MB
~1M SLoC