https://github.com/rustunit/bevy_libgdx_atlas
Load libgdx texture atlas (sprite sheet) files as Bevy assets.
https://github.com/rustunit/bevy_libgdx_atlas
bevy gamedev spritesheet textureatlas
Last synced: 5 months ago
JSON representation
Load libgdx texture atlas (sprite sheet) files as Bevy assets.
- Host: GitHub
- URL: https://github.com/rustunit/bevy_libgdx_atlas
- Owner: rustunit
- License: apache-2.0
- Created: 2024-08-29T04:57:24.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-13T17:04:08.000Z (6 months ago)
- Last Synced: 2025-02-08T01:54:32.685Z (5 months ago)
- Topics: bevy, gamedev, spritesheet, textureatlas
- Language: Rust
- Homepage: https://crates.io/crates/bevy_libgdx_atlas
- Size: 317 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bevy_libgdx_atlas
[](https://bevyengine.org/learn/quick-start/plugin-development/#main-branch-tracking)
[](https://crates.io/crates/bevy_libgdx_atlas)
[](https://docs.rs/bevy_libgdx_atlas)
[![discord][sh_discord]][lk_discord][sh_discord]: https://img.shields.io/discord/1176858176897953872?label=discord&color=5561E6
[lk_discord]: https://discord.gg/rQNeEnMhusSupport 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](https://rustunit.com/blog/2024/10-21-bevy-libgdx-atlas/).
## Usage
Pack your spritesheet using https://github.com/crashinvaders/gdx-texture-packer-gui
Add the `LibGdxAssetPlugin` to your app:
```rust
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.
> [!TIP]
> Run `cargo run --example animation` to see this example for yourself!## Contributing
[See our CONTRIBUTING.md](/CONTRIBUTING.md)
## Our Other Crates
- [bevy_debug_log](https://github.com/rustunit/bevy_debug_log)
- [bevy_device_lang](https://github.com/rustunit/bevy_device_lang)
- [bevy_web_popups](https://github.com/rustunit/bevy_web_popups)
- [bevy_ios_iap](https://github.com/rustunit/bevy_ios_iap)
- [bevy_ios_review](https://github.com/rustunit/bevy_ios_review)
- [bevy_ios_gamecenter](https://github.com/rustunit/bevy_ios_gamecenter)
- [bevy_ios_alerts](https://github.com/rustunit/bevy_ios_alerts)
- [bevy_ios_notifications](https://github.com/rustunit/bevy_ios_notifications)
- [bevy_ios_impact](https://github.com/rustunit/bevy_ios_impact)
- [bevy_ios_safearea](https://github.com/rustunit/bevy_ios_safearea)## 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](https://opensource.org/license/MIT) or [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0), at your option.