mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Update lib.rs
This commit is contained in:
+15
-1
@@ -3,6 +3,7 @@
|
||||
use bevy::prelude::*;
|
||||
use bevy_mod_picking::DefaultPickingPlugins;
|
||||
|
||||
use space_editor::prelude::space_undo::UndoPlugin;
|
||||
#[cfg(feature = "wasm")]
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@@ -79,7 +80,19 @@ pub fn init(viewport_size: ViewportSize) {
|
||||
SkyboxPlugin,
|
||||
UiLayerPlugin,
|
||||
WorldGridPlugin,
|
||||
));
|
||||
UndoPlugin
|
||||
))
|
||||
.add_systems(
|
||||
Startup,
|
||||
(move |mut cmd: Commands, mut ew: EventWriter<LoadSceneEvent>| {
|
||||
cmd.insert_resource(SkyboxId("gum_trees_4k".to_string()));
|
||||
ew.send(LoadSceneEvent("bookcase".to_string()));
|
||||
})
|
||||
);
|
||||
|
||||
// Only for registering components for undo
|
||||
use space_editor::prelude::space_undo::AppAutoUndo;
|
||||
app.auto_reflected_undo::<Transform>();
|
||||
|
||||
#[cfg(feature = "wasm")]
|
||||
wasm::initialize();
|
||||
@@ -134,6 +147,7 @@ pub fn start_viewer(
|
||||
SkyboxPlugin,
|
||||
UiLayerPlugin,
|
||||
WorldGridPlugin,
|
||||
UndoPlugin
|
||||
))
|
||||
.add_systems(
|
||||
Startup,
|
||||
|
||||
Reference in New Issue
Block a user