Skip to content

Commit

Permalink
chore: use forky base crate
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchantey committed Sep 20, 2024
1 parent 06d79ba commit bd57da5
Show file tree
Hide file tree
Showing 13 changed files with 554 additions and 597 deletions.
1,088 changes: 530 additions & 558 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 9 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,11 @@ beet_examples = { path = "crates/beet_examples", version = "0.0.4-rc.1" }

## local
beetmash = { version = "0.0.6-rc.2", path = "../beetmash" }
forky_core = { version = "0.1.50", path = "../forky/crates/forky_core" }
forky_bevy = { version = "0.1.50", path = "../forky/crates/forky_bevy" }
forky_web = { version = "0.1.50", path = "../forky/crates/forky_web", default-features = false }
sweet = { version = "0.1.50", path = "../sweet", features = ["bevy"] }

# beetmash = "0."
# forky_core = "0.1.50"
# forky_bevy = "0.1.50"
# forky_web = { version = "0.1.50", default-features = false }
# sweet = { version = "0.1.50", features = ["bevy"] }
forky = { path = "../forky", version = "0.2.0-rc.3", features = [
"bevy",
"web",
] }
sweet = { path = "../sweet", version = "0.2.0-rc.3", features = ["bevy"] }

## logging
log = "0.4"
Expand Down Expand Up @@ -95,27 +90,20 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
ron = "0.8"

## game
# bevy = { version = "0.14", default-features = false, features = [
# "bevy_scene",
# "serialize",
# # "bevy_color",
# ] }
#💡 observer reflect attributes, required until 0.14.1
bevy = { version = "0.14", path = "../bevy", default-features = false, features = [
#💡 game
bevy = { version = "0.14", default-features = false, features = [
"bevy_scene",
"serialize",
# "bevy_color",
] }


# [target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
console_error_panic_hook = "0.1"

#💡💡 Package
#💡 Package

[package]
name = "beet"
Expand Down Expand Up @@ -152,7 +140,7 @@ beet_examples.workspace = true
bevy = { workspace = true, default-features = true }
log.workspace = true
pretty_env_logger.workspace = true
forky_bevy.workspace = true
forky.workspace = true
anyhow.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/beet_examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories.workspace = true
default = []

[dependencies]
forky_core.workspace = true
forky.workspace = true
beet_flow.workspace = true
beet_spatial.workspace = true
beet_ml.workspace = true
Expand All @@ -24,7 +24,6 @@ bevy = { workspace = true, default-features = true }
# bevy-inspector-egui = "0.25.0"
log.workspace = true
pretty_env_logger.workspace = true
forky_bevy.workspace = true
rand.workspace = true
anyhow.workspace = true

Expand Down
3 changes: 1 addition & 2 deletions crates/beet_examples/src/components/randomize_position.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use bevy::prelude::*;
use forky_bevy::extensions::Vec3Ext;

use forky::prelude::Vec3Ext;

#[derive(Clone, Component, Reflect)]
#[reflect(Component, Default)]
Expand Down
4 changes: 2 additions & 2 deletions crates/beet_ml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bevy.workspace = true
ron.workspace = true
serde.workspace = true
serde_json.workspace = true
forky_core.workspace = true
forky.workspace = true
rand.workspace = true
strum.workspace = true
strum_macros.workspace = true
Expand All @@ -47,7 +47,7 @@ hf-hub = "0.3.2"

### web ###
[target.'cfg(target_arch = "wasm32")'.dependencies]
forky_web.workspace = true
forky.workspace = true
console_log.workspace = true
js-sys.workspace = true
web-sys.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/beet_ml/src/language/bert_loader.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::prelude::*;
use bevy::asset::io::Reader;
use bevy::asset::AssetLoader;
use bevy::asset::AsyncReadExt;
use bevy::asset::LoadContext;
use bevy::prelude::*;
use bevy::utils::ConditionalSendFuture;
Expand All @@ -15,7 +16,7 @@ impl AssetLoader for BertLoader {

fn load<'a>(
&'a self,
reader: &'a mut dyn Reader,
reader: &'a mut Reader,
_settings: &'a Self::Settings,
_load_context: &'a mut LoadContext,
) -> impl ConditionalSendFuture
Expand Down
3 changes: 2 additions & 1 deletion crates/beet_ml/src/rl/q_table_loader.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::prelude::*;
use bevy::asset::io::Reader;
use bevy::asset::AssetLoader;
use bevy::asset::AsyncReadExt;
use bevy::asset::LoadContext;
use bevy::utils::ConditionalSendFuture;
use serde::de::DeserializeOwned;
Expand All @@ -22,7 +23,7 @@ impl<

fn load<'a>(
&'a self,
reader: &'a mut dyn Reader,
reader: &'a mut Reader,
_settings: &'a Self::Settings,
_load_context: &'a mut LoadContext,
) -> impl ConditionalSendFuture
Expand Down
4 changes: 2 additions & 2 deletions crates/beet_ml/src/wasm/open_or_fetch.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use forky_web::HtmlEventListener;
use forky_web::HtmlEventWaiter;
use forky::web::HtmlEventListener;
use forky::web::HtmlEventWaiter;
use js_sys::Uint8Array;
use std::time::Duration;
use wasm_bindgen::prelude::*;
Expand Down
3 changes: 1 addition & 2 deletions crates/beet_spatial/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ assets = ["bevy/bevy_asset"]
animation = ["bevy/bevy_animation"]

[dependencies]
forky_core.workspace = true
forky_bevy.workspace = true
forky.workspace = true
beetmash.workspace = true
beet_flow.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion crates/beet_spatial/src/movement/rotate_to_velocity.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::*;
use bevy::prelude::*;
use forky_bevy::extensions::QuatExt;
use forky::bevy::extensions::QuatExt;
use std::f32::consts::PI;

/// Rotate an entity to face its [`Velocity`] in 2D space
Expand Down
2 changes: 1 addition & 1 deletion crates/beet_spatial/src/movement/translate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use beet_flow::prelude::*;
use bevy::prelude::*;
use forky_core::ResultTEExt;
use forky::prelude::ResultTEExt;

/// Applies constant translation, multiplied by [`Time::delta_seconds`]
#[derive(Debug, Default, Clone, PartialEq, Component, Action, Reflect)]
Expand Down
2 changes: 1 addition & 1 deletion crates/beet_spatial/src/steer/algo/wander_impulse.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::*;
use bevy::prelude::*;
use forky_bevy::extensions::Vec3Ext;
use forky::bevy::extensions::Vec3Ext;

/// The distance at which an agent should begin to slow down, defaults to `0.5`
#[derive(Debug, Clone, PartialEq, Component, Reflect)]
Expand Down
4 changes: 1 addition & 3 deletions crates/beet_spatial/src/steer/steer_actions/seek.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use crate::prelude::*;
use beet_flow::prelude::*;
use bevy::prelude::*;
use forky_core::ResultTEExt;


use forky::prelude::ResultTEExt;


/// Go to the agent's [`SteerTarget`] with an optional [`ArriveRadius`]
Expand Down

0 comments on commit bd57da5

Please sign in to comment.