#bevy #gamedev #kra #load #rapid #prototyping #krita

bevy_mod_krita

Use Krita's .kra files directly in your Bevy app

4 releases (breaking)

0.4.0 Feb 18, 2024
0.3.0 Feb 18, 2024
0.2.0 Nov 29, 2023
0.1.0 Apr 1, 2023

#123 in Data formats

Download history 292/week @ 2024-02-18 30/week @ 2024-02-25 2/week @ 2024-03-03 51/week @ 2024-03-31 1/week @ 2024-04-07

59 downloads per month

MIT/Apache

30KB
67 lines

bevy_mod_krita Crates.io version Crates.io license

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.13 0.4.0
0.12 0.3.0
0.11 0.2.0
0.10 0.1.0

Installation

cargo add bevy_mod_krita

Usage

Simply add the KritaPlugin to your app, enable hot reloading (optional) and load .kra files!

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<AssetServer>) {
    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 or Apache 2.0 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.

Dependencies

~40–79MB
~1M SLoC