Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
Temporary remove integration with bevy-hikari
Browse files Browse the repository at this point in the history
Required to migrate to Bevy 0.7. Current the plugin can't
work with 0.7 because of this upstream issue:
bevyengine/bevy#4507
  • Loading branch information
Shatur committed Apr 17, 2022
1 parent b5f9d0a commit 08ba0aa
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 40 deletions.
12 changes: 0 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ bevy = { version = "0.6", default-features = false }
bevy_atmosphere = { version = "0.2", optional = true }
bevy_egui = { version = "0.12", features = ["multi_threaded"], optional = true }
bevy-inspector-egui = { version = "0.9", optional = true }
bevy-hikari = "0.1"
heron = { version = "2.1", features = ["3d"] }
leafwing_input_manager = { git = "https://github.com/Leafwing-Studios/leafwing_input_manager", branch = "dev", default-features = false }
clap = { version = "3.1", features = ["derive"] }
Expand Down
3 changes: 0 additions & 3 deletions src/core/character/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
pub(crate) mod hero;

use bevy::prelude::*;
use bevy_hikari::NotGiCaster;
use derive_more::{AddAssign, From, SubAssign};
use heron::{CollisionLayers, CollisionShape, RigidBody, RotationConstraints, Velocity};
use leafwing_input_manager::prelude::ActionState;
Expand Down Expand Up @@ -50,7 +49,6 @@ pub(super) struct CharacterBundle {
collision_layers: CollisionLayers,
velocity: Velocity,
action_state: ActionState<ControlAction>,
not_gi_caster: NotGiCaster,

#[bundle]
pbr: PbrBundle,
Expand All @@ -71,7 +69,6 @@ impl Default for CharacterBundle {
.with_group(CollisionLayer::Character),
velocity: Velocity::default(),
action_state: ActionState::default(),
not_gi_caster: NotGiCaster,
pbr: PbrBundle::default(),
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/core/orbit_camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use bevy::{
render::camera::{ActiveCameras, CameraPlugin},
transform::TransformSystem,
};
use bevy_hikari::Volume;
use derive_more::{Deref, DerefMut, From};
use heron::PhysicsSystem;

Expand Down Expand Up @@ -110,7 +109,6 @@ struct OrbitCameraBundle {
name: Name,
camera_target: CameraTarget,
orbit_rotation: OrbitRotation,
volume: Volume,

#[bundle]
camera: PerspectiveCameraBundle,
Expand All @@ -122,7 +120,6 @@ impl OrbitCameraBundle {
name: "Orbit Camera".into(),
camera_target,
orbit_rotation: OrbitRotation::default(),
volume: Volume::new(Vec3::new(0.0, -25.0, -25.0), Vec3::new(50.0, 25.0, 25.0)),
camera: PerspectiveCameraBundle::default(),
}
}
Expand Down
16 changes: 1 addition & 15 deletions src/core/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

use bevy::prelude::*;
use bevy_hikari::GiConfig;
use derive_more::Display;
use leafwing_input_manager::{prelude::InputMap, Actionlike};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -52,9 +51,6 @@ fn apply_video_settings_system(
commands.insert_resource(Msaa {
samples: settings.video.msaa,
});
commands.insert_resource(GiConfig {
enabled: settings.video.global_illumination,
});
}
}

Expand Down Expand Up @@ -162,15 +158,11 @@ impl Settings {
#[serde(default)]
pub(crate) struct VideoSettings {
pub(crate) msaa: u32,
pub(crate) global_illumination: bool,
}

impl Default for VideoSettings {
fn default() -> Self {
Self {
msaa: 1,
global_illumination: true,
}
Self { msaa: 1 }
}
}

Expand Down Expand Up @@ -279,7 +271,6 @@ mod tests {
);

settings.video.msaa += 1;
settings.video.global_illumination = !settings.video.global_illumination;

let mut apply_events = app
.world
Expand All @@ -295,11 +286,6 @@ mod tests {
settings.video.msaa, msaa.samples,
"MSAA setting should be updated on apply event"
);
let gi_config = app.world.get_resource::<GiConfig>().unwrap();
assert_eq!(
settings.video.global_illumination, gi_config.enabled,
"Global illumination setting should be updated on apply event"
);
}

#[test]
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use crate::core::CorePlugin;
use {
crate::core::settings::ControlAction,
bevy_atmosphere::AtmospherePlugin,
bevy_hikari::VoxelConeTracingPlugin,
leafwing_input_manager::prelude::InputManagerPlugin,
ui::{UiAction, UiPlugin},
};
Expand All @@ -63,7 +62,6 @@ fn main() {
dynamic: false,
sky_radius: 100.0,
})
.add_plugin(VoxelConeTracingPlugin::default())
.add_plugin(InputManagerPlugin::<ControlAction>::default())
.add_plugin(InputManagerPlugin::<UiAction>::default())
.add_plugin(UiPlugin);
Expand Down
4 changes: 0 additions & 4 deletions src/ui/setting_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ fn show_video_settings(ui: &mut Ui, video_settings: &mut VideoSettings) {
ui.selectable_value(&mut video_settings.msaa, 1, 1.to_string());
ui.selectable_value(&mut video_settings.msaa, 4, 4.to_string());
});
ui.checkbox(
&mut video_settings.global_illumination,
"Global illumination",
);
}

fn show_control_settings(
Expand Down

0 comments on commit 08ba0aa

Please sign in to comment.