Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Bumping version to 0.3.1 and fixing example. It now loads bevy as a d…
Browse files Browse the repository at this point in the history
…ev-dependency with full features.
  • Loading branch information
porkbrain committed Feb 21, 2024
1 parent d629e7f commit 77e70ae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -26,3 +26,6 @@ version = "0.13"
[[example]]
name = "basic"
path = "examples/basic.rs"

[dev-dependencies]
bevy = { version = "0.13", default-features = true }
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Image>`.
If the entity does not have a `Handle<Image>` 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.
Expand Down
4 changes: 2 additions & 2 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fn main() {
.add_plugins(DefaultPlugins)
.add_plugins(bevy_webp_anim::Plugin)
.init_resource::<bevy_webp_anim::WebpAnimator>()
.add_systems(Startup, (spawn_camera, spawn_video))
.add_systems(
Update,
(
Expand All @@ -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) {
Expand Down

0 comments on commit 77e70ae

Please sign in to comment.