Crates.io | bevy-kenney-assets |
lib.rs | bevy-kenney-assets |
version | 0.1.0 |
source | src |
created_at | 2024-08-16 06:19:44.543976 |
updated_at | 2024-08-16 06:19:44.543976 |
description | Use kenney spritesheets as texture atlases in Bevy |
homepage | |
repository | https://github.com/rust-adventure/bevy-kenney-assets |
max_upload_size | |
id | 1339955 |
size | 123,524 |
Load kenney assets as texture atlases
Acquire kenney assets
assets/
directoryAdd bevy-kenney-assets
cargo add bevy-kenney-assets
Add Plugin
app.add_plugins(KenneyAssetPlugin);
Load spritesheets
a. with AssetServer
```rust
let handle: Handle<KenneySpriteSheetAsset> = asset_server.load("spaceShooter2_spritesheet_2X.xml");
```
b. with bevy_asset_loader
```rust
#[derive(AssetCollection, Resource)]
pub struct ImageAssets {
#[asset(path = "space-shooter-redux/sheet.xml")]
pub space_sheet: Handle<KenneySpriteSheetAsset>,
}
```