#gif #animation #bevy

vleue_kinetoscope

Animated GIF player for Bevy

6 releases

0.2.0 Jul 4, 2024
0.2.0-rc.4 Jun 29, 2024
0.1.1 May 24, 2024

#2263 in Game dev

Download history 48/week @ 2024-07-13 1/week @ 2024-07-20 92/week @ 2024-07-27 107/week @ 2024-08-03 101/week @ 2024-08-10 103/week @ 2024-08-17 109/week @ 2024-08-24 93/week @ 2024-08-31 24/week @ 2024-09-07 82/week @ 2024-09-14 74/week @ 2024-09-21 87/week @ 2024-09-28 134/week @ 2024-10-05 158/week @ 2024-10-12 130/week @ 2024-10-19 138/week @ 2024-10-26

579 downloads per month

MIT/Apache

1.5MB
254 lines

vleue_kinetoscope

MIT/Apache 2.0 Doc Crate Bevy Tracking CI

Animated GIF and WebP player for Bevy.

animated-gif

Usage

System setup

Add the plugin to your app:

use bevy::prelude::*;
use vleue_kinetoscope::AnimatedImagePlugin;

fn main() {
    App::new()
        // Usually included with `DefaultPlugins`
        .add_plugins(AssetPlugin::default())
        .add_plugins(AnimatedImagePlugin);
}

Play an animated gif

Spawn an entity with the bundle AnimatedImageBundle

use bevy::prelude::*;
use vleue_kinetoscope::*;

fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
    commands.spawn(AnimatedImageBundle {
        animated_image: asset_server.load("Geneva_mechanism_6spoke_animation.gif"),
        ..default()
    });
}

WebP Support

Animated WebP is currently broken in release versions of dependencies, and need patches to work properly:

[patch.crates-io]
# For webp support - https://github.com/image-rs/image/pull/2228
image = { git = "https://github.com/image-rs/image" }
# For webp support - https://github.com/image-rs/image-webp/pull/76
image-webp = { git = "https://github.com/image-rs/image-webp" }

Bevy Support

Bevy vleue_kinetoscope
main main
0.14 0.2
0.13 0.1

Dependencies

~37–75MB
~1.5M SLoC