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:
Emil Shanaty
2026-10-27 23:03:33 +03:00
parent 59212c952f
commit 3eea9c020d
14 changed files with 2369 additions and 16 deletions
@@ -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();
}