feat(runtime): add M1 scene persistence, undo/redo and hotkeys
- load .forge.ron through bevy_forge_core into the live ECS (3D components) - Ctrl+S syncs and saves the document; custom components are preserved - transform undo/redo for inspector sliders and gizmo drags (Ctrl+Z/Y) - F focus, Delete subtree, Ctrl+D duplicate; camera subtrees are guarded - 66 runtime tests; workspace 412 passed; garden demo docs/screenshots
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//! M1 live editor: the editor plugin on top of `DefaultPlugins`, loading a real
|
||||
//! `.forge.ron` scene selected through the environment.
|
||||
//!
|
||||
//! Run the garden demo from the repository root:
|
||||
//!
|
||||
//! ```text
|
||||
//! FORGE_PROJECT=examples/demo-project \
|
||||
//! FORGE_SCENE=scenes/garden.forge.ron \
|
||||
//! cargo run -p bevy_forge_runtime --example editor_live
|
||||
//! ```
|
||||
//!
|
||||
//! `FORGE_SCENE=""` disables scene loading. With no scene (or a load failure)
|
||||
//! the editor still starts with its placeholder camera and empty hierarchy.
|
||||
|
||||
use bevy::{prelude::*, window::WindowResolution};
|
||||
use bevy_forge_runtime::EditorPlugin;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins(DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: Some(Window {
|
||||
title: "Bevy Forge — M1 Core".into(),
|
||||
resolution: WindowResolution::new(1440, 900).with_scale_factor_override(1.0),
|
||||
..default()
|
||||
}),
|
||||
..default()
|
||||
}))
|
||||
.add_plugins(EditorPlugin)
|
||||
.run();
|
||||
}
|
||||
Reference in New Issue
Block a user