From 54db866b93eba6a6d7cb35f9bbfe88b4b174ae28 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Thu, 17 Sep 2026 14:19:53 +0200 Subject: [PATCH] Architecture: FreeViewport, FormDialog, FramesDialog, animationPreview, key helpers in animation.ts (#85) --- Architecture.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Architecture.md b/Architecture.md index d4b6990..10fceee 100644 --- a/Architecture.md +++ b/Architecture.md @@ -61,8 +61,8 @@ ``` web/index.html Vite source page (dev) index.html built page (generated, served) -src/core/model/ Project (object holders), Asset + AssetTypes, SceneObject, Properties (value types), hierarchy, walk (generic parent/child walks), instance (container content resolved from its template), usages (where an asset is used), container (the cycle guard), placement (what may be dropped where), texture (frames and the slice grid), animation (which frame at time t), graphLookup (what a graph sees of the project: behaviors to run, state machines to read), Scope (where a state machine's current state lives: per instance or one for the run — variables are shared by living on a Variables asset instead) -src/core/properties/ PropertySchema, kinds (one row per value kind), listItems (an item's kind, read off its value), resolve (the only override merge), deviation (what is gold), collider/camera/bounds geometry, aspect, enabled, editorRun, assetRef/textureRef (how a reference reads), declaredRows (the row a Property node declares in a shader or particle graph) +src/core/model/ Project (object holders), Asset + AssetTypes, SceneObject, Properties (value types), hierarchy, walk (generic parent/child walks), instance (container content resolved from its template), usages (where an asset is used), container (the cycle guard), placement (what may be dropped where), texture (frames and the slice grid), animation (which frame at time t, a row's value there, what a row may aim at, the players on an object; KeyRef and its lookups) + animationPreview (the root at a frame, written into copies), graphLookup (what a graph sees of the project: behaviors to run, state machines to read), Scope (where a state machine's current state lives: per instance or one for the run — variables are shared by living on a Variables asset instead) +src/core/properties/ PropertySchema, kinds (one row per value kind), listItems (an item's kind, read off its value), resolve (the only override merge), deviation (what is gold), collider/camera/bounds geometry, aspect, enabled, editorRun, assetRef/textureRef (how a reference reads), declaredRows (the row a Property node declares in a shader or particle graph, and the params that node has in both) src/core/commands/ undoable commands, CommandStack, SetBagValueCommand base, RenameCommand base (undone by renaming back: variable, struct field, port), one import command shape for texture/font/sound, require.ts (validated lookups, and what an instance may not change), naming.ts src/core/graph/ graph model, NodeRegistry/NodeContext/values, interpreter, dropTarget, nested (behaviors as nodes), emitGraph (the walk both graph compilers share: each node once, in dependency order; cycles and property names reported), @@ -87,9 +87,10 @@ src/editor/ App → Editor (layout + ticker), PlaySession (the run), EditorRun (run in editor), state, actions, shortcuts, debugHook, autosave, fileImport (drop/paste) → assetImport (one upload pipeline, an ImportKind per sort) ← textureImport / fontImport / soundImport, FilePicker (the shared "+ → Texture / Font / Sound" dialog; ImagePicker/FontPicker/SoundPicker only describe their row), - framing (fit/marquee/snap maths), AssetTabEditor (the shared shell of the asset tabs), + framing (fit/marquee/snap maths), FormDialog (the small modal forms: label column, Cancel + confirm, one open at a time), AssetTabEditor (the shared shell of the asset tabs), TabStrip + tabRow (the tab row and what it does when the tabs outgrow it) -src/editor/viewport/ WorldViewport base + SceneViewport/GameViewport — editing tools, hence not in src/viewport/ +src/editor/viewport/ WorldViewport base → FreeViewport (a camera of its own: fit, pan, wheel zoom) → SceneViewport, PreviewCanvas; + GameViewport follows the game's camera instead — editing tools, hence not in src/viewport/ src/editor/inspector/ Inspector panel, host (what a section builds into), field factory, previewHandlers (scrub → preview → command), valueSpecs (where a value lives — shared with the List tab), one section per selection kind (asset/object/node/frame), variableRows (one row shape for @@ -99,10 +100,11 @@ src/editor/graph/ GraphEditor (header + picker), GraphCanvas, EdgeLayer (cu NodeView, NodePalette + paletteEntries (which also ranks a search), folding (hidden links, collapsed nodes), Breadcrumb + trail (the path into nested behaviors), beads (the run's pulses), AnnotationView + annotationDrag (groups and comments: what a drag carries, each thing moved once) src/editor/container/ ContainerEditor (header + picker), ContainerCanvas (a SceneViewport on a template) -src/editor/texture/ TextureEditor (header + picker), TextureCanvas (picture + frames), SliceDialog, sheetView (the grid maths), +src/editor/texture/ TextureEditor (header + picker), TextureCanvas (picture + frames), SliceDialog (a FormDialog), sheetView (the grid maths), ImagePicker + imageGrid (the "+ → Texture" dialog), checker (the transparency board) -src/editor/animation/ AnimationEditor (header + picker, preview over timeline), PreviewCanvas (the root at the playhead, a WorldViewport - over animationPreview.ts), TimelineCanvas (rows, keys, ruler), timelineView (its geometry), RowDialog +src/editor/animation/ AnimationEditor (header + picker, preview over timeline), PreviewCanvas (the root at the playhead, a FreeViewport + over animationPreview.ts), TimelineCanvas (rows, keys, ruler, clipboard), timelineView (its geometry), + RowDialog + FramesDialog (FormDialogs) src/editor/statemachine/ StateMachineEditor (header + picker, on the graph canvas) src/editor/particles/ ParticlesEditor (graph canvas left of a preview panel, splitter between them), ParticlePreview (the panel: the asset's own particles, wearing its own rows)