mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-28 08:58:07 +00:00
Cleanup, conditional compilation flags
This commit is contained in:
@@ -14,6 +14,7 @@ impl Plugin for InteractionPlugin {
|
|||||||
.insert_resource(InteractionMode::default())
|
.insert_resource(InteractionMode::default())
|
||||||
.add_plugins(StudioGizmosPlugin);
|
.add_plugins(StudioGizmosPlugin);
|
||||||
|
|
||||||
|
#[cfg(target_arch = "wasm32")]
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
PreUpdate,
|
PreUpdate,
|
||||||
(wasm::update_selection_mode, wasm::update_interaction_mode),
|
(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 {
|
pub mod wasm {
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|||||||
+3
-21
@@ -3,12 +3,7 @@
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use input::StudioInputPlugin;
|
use input::StudioInputPlugin;
|
||||||
use interaction::InteractionPlugin;
|
use interaction::InteractionPlugin;
|
||||||
#[rustfmt::skip]
|
use orbit_cam::OrbitCamPlugin;
|
||||||
use orbit_cam::{
|
|
||||||
// CameraMotionSystem,
|
|
||||||
// OrbitCam,
|
|
||||||
OrbitCamPlugin,
|
|
||||||
};
|
|
||||||
use skybox::SkyboxPlugin;
|
use skybox::SkyboxPlugin;
|
||||||
use test_scene::TestScenePlugin;
|
use test_scene::TestScenePlugin;
|
||||||
use ui::UiLayerPlugin;
|
use ui::UiLayerPlugin;
|
||||||
@@ -24,7 +19,8 @@ mod skybox;
|
|||||||
mod test_scene;
|
mod test_scene;
|
||||||
mod ui;
|
mod ui;
|
||||||
mod viewport;
|
mod viewport;
|
||||||
// #[cfg(target_arch = "wasm32")]
|
|
||||||
|
#[cfg(target_arch = "wasm32")]
|
||||||
mod wasm;
|
mod wasm;
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
@@ -53,19 +49,5 @@ pub fn init(viewport_size: ViewportSize) {
|
|||||||
SkyboxPlugin,
|
SkyboxPlugin,
|
||||||
UiLayerPlugin,
|
UiLayerPlugin,
|
||||||
))
|
))
|
||||||
// .add_systems(Update, draw_world_axes.after(CameraMotionSystem))
|
|
||||||
.run();
|
.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);
|
|
||||||
// }
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ impl fmt::Debug for ViewportSize {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
pub mod wasm {
|
pub mod wasm {
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user