| Crates.io | vleue_kinetoscope |
| lib.rs | vleue_kinetoscope |
| version | 0.4.1 |
| created_at | 2024-05-24 22:53:36.556406+00 |
| updated_at | 2025-04-30 17:49:03.76672+00 |
| description | Animated GIF player for Bevy |
| homepage | https://github.com/vleue/vleue_kinetoscope |
| repository | https://github.com/vleue/vleue_kinetoscope |
| max_upload_size | |
| id | 1251609 |
| size | 1,414,999 |
Animated GIF and WebP player for Bevy.

Add the plugin to your app:
use bevy::prelude::*;
use vleue_kinetoscope::AnimatedImagePlugin;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(AnimatedImagePlugin);
}
Spawn an entity with the component AnimatedImageController:
use bevy::prelude::*;
use vleue_kinetoscope::*;
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2d);
commands.spawn(AnimatedImageController::play(asset_server.load("cube.gif")));
}
Spawn an entity with the component AnimatedImageController:
use bevy::prelude::*;
use vleue_kinetoscope::*;
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2d);
commands.spawn(AnimatedImageController::play(asset_server.load("cube.webp")));
}
It is possible to stream an animated GIF or WebP, so that it's not loaded completely into Memory:
use bevy::prelude::*;
use vleue_kinetoscope::*;
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2d);
commands.spawn(StreamingAnimatedImageController::play(asset_server.load("big-buck-bunny.webp")));
}
Streaming animated images are only played once, and can't loop.
Wasm is not yet supported for streaming animations.
| Bevy | vleue_kinetoscope |
|---|---|
| main | main |
| 0.16 | 0.4 |
| 0.15 | 0.3 |
| 0.14 | 0.2 |
| 0.13 | 0.1 |