mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 14:22:14 +00:00
Resolves the longstanding `// TODO Refactor remove editor.` Drops the Editor import; constructor takes a SaveManagerDeps surface inline-built by Editor (Phase 2 idiom — same shape as CameraControllerDeps, GizmoControllerDeps, etc.). Deps surface (10 fields, single-purpose): - getVersion / setVersion — engine version (load may upgrade) - getActiveScene — proxy serialization target - getRenderer — for save thumbnail - removeTransformControls — pre-save cleanup - getCamera / refreshCamObj / changeRenderCameraAspectRatio — camera - setPositivePrompt — restore prompt on load - saveSceneState / loadSceneState — backend API current_scene_media_token moves into SaveManager as private state (only the load path used it; nothing outside SaveManager read it). The field on Editor is dropped along with the two `= null` writes in the constructor and initialize. CameraController gains refreshCamObj(scene) — re-anchors cam_obj to the named entity in the scene + sets layers. Replaces the inline post-load setup that SaveManager used to do directly. Editor.initialize also routes through the same method now (was inline at line ~410).