mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
first step to 0.13
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user