Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timjentzsch/bevy_mod_krita
Load Krita documents directly in Bevy.
https://github.com/timjentzsch/bevy_mod_krita
bevy bevy-plugin krita
Last synced: about 2 months ago
JSON representation
Load Krita documents directly in Bevy.
- Host: GitHub
- URL: https://github.com/timjentzsch/bevy_mod_krita
- Owner: TimJentzsch
- License: apache-2.0
- Created: 2023-02-24T13:52:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-09T16:38:17.000Z (7 months ago)
- Last Synced: 2024-10-24T03:37:38.056Z (2 months ago)
- Topics: bevy, bevy-plugin, krita
- Language: Rust
- Homepage:
- Size: 104 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bevy_mod_krita [![Crates.io version](https://img.shields.io/crates/v/bevy_mod_krita)](https://crates.io/crates/bevy_mod_krita) [![Crates.io license](https://img.shields.io/crates/l/bevy_mod_krita)](LICENSE-MIT)
Load Krita's `.kra` documents directly in Bevy for rapid prototyping or game jams.
Please keep in mind that `.kra` files are not optimized for size, so you should probably not use them for production bundles.
## Bevy Compatibility
| `bevy` version | `bevy_mod_krita` version |
| -------------- | ------------------------ |
| `0.12` | `0.3.0` |
| `0.11` | `0.2.0` |
| `0.10` | `0.1.0` |## Installation
```cli
cargo add bevy_mod_krita
```## Usage
Simply add the `KritaPlugin` to your app, enable hot reloading (optional) and load `.kra` files!
```rs
use bevy::prelude::*;
use bevy_mod_krita::KritaPlugin;fn main() {
App::new()
.add_plugins(DefaultPlugins)
// Add the Krita plugin to enable loading of `.kra` files
.add_plugins(KritaPlugin)
.add_systems(Startup, setup)
.run();
}fn setup(mut commands: Commands, asset_server: Res) {
commands.spawn(Camera2dBundle::default());
commands.spawn(SpriteBundle {
// Load a Krita document as a texture
texture: asset_server.load("krita/demo.kra"),
..default()
});
}
```## License
This project is licensed under the terms of the [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE) license at your choice.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.