This commit is contained in:
rewin
2024-04-03 22:25:08 +03:00
parent 154d4c002a
commit e7d5464cb9
4 changed files with 20 additions and 17 deletions
+1 -1
View File
@@ -5,6 +5,7 @@ use bevy::{
window::{CursorGrabMode, PrimaryWindow},
};
use crate::MainCamera;
use crate::{
input::{self, Action, CameraMotion, InputAction, Lifecycle},
interaction::Selection,
@@ -14,7 +15,6 @@ use crate::{
},
};
use bevy::render::camera::Viewport;
use crate::MainCamera;
pub struct CameraControllerPlugin;
+2 -4
View File
@@ -83,9 +83,7 @@ impl Plugin for DebugPlugin {
}
if only_core {
app
.add_plugins(PrefabPlugin)
.add_plugins(EditorCore);
app.add_plugins(PrefabPlugin).add_plugins(EditorCore);
} else {
app.add_plugins(editor_ui_group);
app.auto_undo::<Handle<StandardMaterial>>();
@@ -93,7 +91,7 @@ impl Plugin for DebugPlugin {
app.auto_undo::<Handle<Mesh>>();
app.auto_undo::<SceneElement>();
app.auto_undo::<Selectable>();
app.add_systems(Update, sync_editor_camera);
app.add_systems(
Update,
+16 -10
View File
@@ -1,7 +1,10 @@
use std::time::Duration;
use bevy::{
app::{AppExit, ScheduleRunnerPlugin}, asset::AssetMetaCheck, core_pipeline::Skybox, prelude::*
app::{AppExit, ScheduleRunnerPlugin},
asset::AssetMetaCheck,
core_pipeline::Skybox,
prelude::*,
};
use bevy_web_asset::WebAssetPlugin;
use space_editor::prelude::{EditorEvent, EditorPrefabPath};
@@ -57,16 +60,19 @@ pub fn start_headless(
ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(1.0 / fps as f64)),
WebAssetPlugin,
RemoteAssetPlugin,
DefaultPlugins.set(WindowPlugin {
primary_window: None,
exit_condition: bevy::window::ExitCondition::DontExit,
close_when_requested: true,
}).set(AssetPlugin {
mode: AssetMode::Unprocessed,
..default()
}),
DefaultPlugins
.set(WindowPlugin {
primary_window: None,
exit_condition: bevy::window::ExitCondition::DontExit,
close_when_requested: true,
})
.set(AssetPlugin {
mode: AssetMode::Unprocessed,
..default()
}),
ScreenShotPlugin,
CommonPlugins.build()
CommonPlugins
.build()
.disable::<WorldGridPlugin>()
.disable::<crate::UiLayerPlugin>(),
));
+1 -2
View File
@@ -20,17 +20,16 @@ use space_editor::{
};
use wasm_bindgen::prelude::*;
use crate::{material::short_material::ShortMaterial, StudioMode};
use crate::{
interaction::Selection,
wasm::{self, StaticBuffer, WasmMessageBuffer},
};
use crate::{material::short_material::ShortMaterial, StudioMode};
pub struct InspectorPlugin;
impl Plugin for InspectorPlugin {
fn build(&self, app: &mut App) {
#[cfg(not(feature = "wasm"))]
return;