Crates.io | bevy-atlas-loader |
lib.rs | bevy-atlas-loader |
version | 0.1.0 |
source | src |
created_at | 2022-06-05 13:00:58.461199 |
updated_at | 2022-06-05 13:00:58.461199 |
description | Bevy plugin for defining and loading 2D TextureAtlas images. |
homepage | |
repository | https://github.com/taurr/bevy-atlas-loader |
max_upload_size | |
id | 600172 |
size | 140,690 |
This crate enables the developer to define a number of TextureAtlas for use as sprites in Bevy.
The atlas definition supports several styles of atlas':
If loading the atlas definition as an asset using e.g. bevy_common_assets, the developer can define atlas' in a file like this:
({
"Pacman": (
texture: "Pac-Man.png",
width: 19,
height: 19,
positions: [
(65, 86),
(86, 86),
(107, 86),
]
)
})
And utilizing Bevy's hot-reloading capability we can experiment and adjust without recompiling.
In order to use this crate, you need to add a few crates to you Cargo.toml
: bevy-atlas-loader
and strum.
[dependencies]
bevy-atlas-loader = "<insert version>"
strum = "<insert version>"
Optional
For defining a custom asset loader and thus loading definitions as assets, it's recommended to use e.g. bevy_common_assets:
[dependencies]
bevy_common_assets = "<insert version>"
Please have a look at the examples, and even the tests.
Licensed under either of
This project uses Bevy, and was bootstrapped using bevy-template.rs.