mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Cleanup, conditional compilation flags
This commit is contained in:
@@ -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
@@ -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);
|
||||
// }
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user