first step to 0.13

This commit is contained in:
rewin
2024-03-14 23:15:30 +03:00
parent 75dcd9b8d9
commit dbf512bb0c
16 changed files with 100 additions and 86 deletions
+2 -3
View File
@@ -1,9 +1,9 @@
use bevy::{
core_pipeline::{clear_color::ClearColorConfig, fxaa::Fxaa},
core_pipeline::fxaa::Fxaa,
prelude::*,
render::view::RenderLayers,
};
use space_editor::space_editor_ui::NotShowCamera;
use space_editor::space_editor_ui::camera_plugin::NotShowCamera;
use crate::MainCamera;
@@ -24,7 +24,6 @@ pub(super) fn spawn_gizmo_camera(
GizmoCamera,
Camera3dBundle {
camera_3d: Camera3d {
clear_color: ClearColorConfig::None,
..default()
},
camera: Camera {
+5 -5
View File
@@ -46,8 +46,8 @@ impl Plugin for GizmoPlugin {
app.add_systems(
PreUpdate,
spawn_gizmo_camera.run_if(
any_with_component::<MainCamera>()
.and_then(not(any_with_component::<GizmoCamera>())),
any_with_component::<MainCamera>
.and_then(not(any_with_component::<GizmoCamera>)),
),
);
app.add_systems(
@@ -55,11 +55,11 @@ impl Plugin for GizmoPlugin {
(
despawn_existing_gizmo.run_if(
resource_changed_or_removed::<Selection>()
.or_else(resource_changed::<TransformMode>()),
.or_else(resource_changed::<TransformMode>),
),
spawn_gizmo.after(despawn_existing_gizmo).run_if(
resource_exists::<Selection>()
.and_then(not(any_with_component::<TransformGizmo>())),
resource_exists::<Selection>
.and_then(not(any_with_component::<TransformGizmo>)),
),
(update_target_global_trasform, sync_gizmo_transform)
.chain()