diff --git a/Cargo.toml b/Cargo.toml index bc3305b..513a2c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_webp_anim" -version = "0.3.0" +version = "0.3.1" edition = "2021" license = "MIT OR Apache-2.0" keywords = ["bevy", "webp", "video", "animation"] @@ -26,3 +26,6 @@ version = "0.13" [[example]] name = "basic" path = "examples/basic.rs" + +[dev-dependencies] +bevy = { version = "0.13", default-features = true } diff --git a/README.md b/README.md index 134ae66..7a51843 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ This component contains the uuid of the video and FPS settings. By running the `load_next_frame` system e.g. on `Update` or on a fixed schedule with period matching that of the FPS of the video, each `RemoteControl` component will load the next frame of the video into the entity's `Handle`. If the entity does not have a `Handle` component, the frame is dropped. +## Example + +`$ cargo run --example basic` for a bunny. + ## Issue: Support large videos The current implementation of `bevy_webp_anim` loads each frame into memory. diff --git a/examples/basic.rs b/examples/basic.rs index 7fddbae..fa2d2a0 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -8,6 +8,7 @@ fn main() { .add_plugins(DefaultPlugins) .add_plugins(bevy_webp_anim::Plugin) .init_resource::() + .add_systems(Startup, (spawn_camera, spawn_video)) .add_systems( Update, ( @@ -16,8 +17,7 @@ fn main() { bevy_webp_anim::systems::load_next_frame, ), ) - .add_systems(Startup, (spawn_camera, spawn_video)) - .run(); + .run() } fn spawn_camera(mut commands: Commands) {