Expand gizmos module

This commit is contained in:
Danny McGee
2023-10-12 15:58:44 -04:00
parent 53f7edeec8
commit 6cdeda6a7b
4 changed files with 17 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
mod model;
mod view;
use bevy::prelude::*;
use super::{InteractionMode, InteractionTransform, Selected, TransformSpace};
pub(super) struct StudioGizmosPlugin;
impl Plugin for StudioGizmosPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, view::draw);
}
}
+3 -1
View File
@@ -2,6 +2,8 @@ use bevy::prelude::*;
use bitflags::bitflags;
use wasm_bindgen::prelude::*;
use self::gizmos::StudioGizmosPlugin;
mod gizmos;
pub struct InteractionPlugin;
@@ -10,7 +12,7 @@ impl Plugin for InteractionPlugin {
fn build(&self, app: &mut App) {
app.insert_resource(SelectionMode::default())
.insert_resource(InteractionMode::default())
.add_systems(Update, gizmos::draw);
.add_plugins(StudioGizmosPlugin);
app.add_systems(
PreUpdate,