Skip to content

Commit

Permalink
update for Bevy 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Nov 15, 2024
1 parent d090dec commit d021d58
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_streamdeck"
version = "0.4.0"
version = "0.5.0-rc.1"
edition = "2021"
authors = ["François Mockers <[email protected]>"]
description = "Elgato Stream Deck plugin for Bevy"
Expand All @@ -19,7 +19,7 @@ images = ["image"]
assets = ["bevy/bevy_asset"]

[dependencies.bevy]
version = "0.14.0"
version = "0.15.0-rc.3"
default-features = false
features = ["multi_threaded"]

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ see https://github.com/ryankurte/rust-streamdeck#getting-started

|Bevy|bevy_streamdeck|
|---|---|
|0.15|0.5|
|0.14|0.4|
|0.13|0.3|
|0.9|0.2|
Expand Down
4 changes: 2 additions & 2 deletions examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ fn change_color(
) {
if let Some(_) = streamdeck.kind() {
let color = Color::hsl(
(((time.elapsed_seconds() / 5.0).cos() + 1.0) / 2.0) as f32 * 360.0,
(((time.elapsed_secs() / 5.0).cos() + 1.0) / 2.0) as f32 * 360.0,
1.0,
0.5,
);
streamdeck.set_key_color(1, color);
if (time.elapsed_seconds() / 5.0).cos() + 0.9995 < 0.0 {
if (time.elapsed_secs() / 5.0).cos() + 0.9995 < 0.0 {
app_exit_events.send(AppExit::Success);
}
}
Expand Down
5 changes: 2 additions & 3 deletions examples/whack_a_mole.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn spawn_mole(

let max_duration = 180.0;
if rng.gen_bool(
(1.0 - (max_duration - time.elapsed_seconds_f64()) / max_duration).clamp(0.2, 0.5),
(1.0 - (max_duration - time.elapsed_secs_f64()) / max_duration).clamp(0.2, 0.5),
) {
if rng.gen_bool(0.33) {
streamdeck.set_key_color(key, Color::linear_rgb(1.0, 0.0, 0.0));
Expand All @@ -65,8 +65,7 @@ fn spawn_mole(
});
}
} else {
let reduction =
(1.0 - (max_duration - time.elapsed_seconds_f64()) / max_duration) / 2.0;
let reduction = (1.0 - (max_duration - time.elapsed_secs_f64()) / max_duration) / 2.0;
if rng.gen_bool(0.15) {
streamdeck.set_key_color(key, Color::linear_rgb(0.0, 0.0, 1.0));
commands.spawn(Mole {
Expand Down

0 comments on commit d021d58

Please sign in to comment.