Cleanup, conditional compilation flags

This commit is contained in:
Danny McGee
2023-10-13 17:54:57 -04:00
parent f11b89fb48
commit 2c4dfec839
3 changed files with 6 additions and 23 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ impl Plugin for InteractionPlugin {
.insert_resource(InteractionMode::default())
.add_plugins(StudioGizmosPlugin);
#[cfg(target_arch = "wasm32")]
app.add_systems(
PreUpdate,
(wasm::update_selection_mode, wasm::update_interaction_mode),
@@ -85,7 +86,7 @@ impl Default for TransformSpace {
}
}
// #[cfg(target_arch = "wasm32")]
#[cfg(target_arch = "wasm32")]
pub mod wasm {
use bevy::prelude::*;
use wasm_bindgen::prelude::*;
+3 -21
View File
@@ -3,12 +3,7 @@
use bevy::prelude::*;
use input::StudioInputPlugin;
use interaction::InteractionPlugin;
#[rustfmt::skip]
use orbit_cam::{
// CameraMotionSystem,
// OrbitCam,
OrbitCamPlugin,
};
use orbit_cam::OrbitCamPlugin;
use skybox::SkyboxPlugin;
use test_scene::TestScenePlugin;
use ui::UiLayerPlugin;
@@ -24,7 +19,8 @@ mod skybox;
mod test_scene;
mod ui;
mod viewport;
// #[cfg(target_arch = "wasm32")]
#[cfg(target_arch = "wasm32")]
mod wasm;
#[wasm_bindgen]
@@ -53,19 +49,5 @@ pub fn init(viewport_size: ViewportSize) {
SkyboxPlugin,
UiLayerPlugin,
))
// .add_systems(Update, draw_world_axes.after(CameraMotionSystem))
.run();
}
// fn draw_world_axes(mut gizmos: Gizmos, q: Query<&OrbitCam>) {
// let &OrbitCam { focus, radius, .. } = q.single();
// let mut draw_axis = |direction: Vec3, color: Color| {
// let end = focus + direction * radius / 15.;
// gizmos.line(focus, end, color);
// };
// draw_axis(Vec3::X, Color::RED);
// draw_axis(Vec3::Y, Color::GREEN);
// draw_axis(Vec3::Z, Color::BLUE);
// }
+1 -1
View File
@@ -45,7 +45,7 @@ impl fmt::Debug for ViewportSize {
}
}
// #[cfg(target_arch = "wasm32")]
#[cfg(target_arch = "wasm32")]
pub mod wasm {
use bevy::prelude::*;
use wasm_bindgen::prelude::*;