From 1fbbc42ae876e49e9cead934ba877210a0d5ffab Mon Sep 17 00:00:00 2001 From: meleki Date: Wed, 23 Sep 2026 10:20:24 +0200 Subject: [PATCH] Describe the split of the four largest files (#215) --- Architecture.md | 25 +++++++++++++++++++------ Development.md | 2 +- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Architecture.md b/Architecture.md index cb24985..75b9e40 100644 --- a/Architecture.md +++ b/Architecture.md @@ -106,7 +106,10 @@ src/runtime/physics/ engine (loads Rapier once, reports its state, converts be the fixed step, the poses handed back, the contact pairs sorted into events and their normal, impulse and point; whether a dynamic body lands on or passes a one-way collider, decided before each step for the contact hook; the push a `Move` gives a dynamic body, and - what the physics nodes reach through `NodeContext.physics`) + what the physics nodes reach through `NodeContext.physics`), oneWay (the rule itself: + whether a body lands on, is held by or passes a one-way collider — pure, so it is measured + without the engine), bodyGeometry (a world shape as the engine colliders of a body, and the + poses handed between the two) src/ui/ widget toolkit (generic, knows nothing about assets); fonts (the faces the editor ships: Source Sans 3 in 400, 500, 600 and 700, Source Code Pro 400, Latin only, #202/#214), icons + Icon (the menu's tick boxes and current-entry dot as SVG files, and a widget that shows one file @@ -135,7 +138,9 @@ src/editor/ App → Editor (layout + ticker), PlaySession (the run), OpenProjectDialog (the project picker behind "Open project…"), ProjectSettingsDialog + settingsChanges (name, the start-scene switch and the collision layers in one dialog; the pure rule of what Apply has to carry out), - EditorRun (run in editor), state, actions, shortcuts, debugHook, + EditorRun (run in editor), state, actions, shortcuts, debugHook (installs `window.__gm`; + the hooks are grouped by area in debug/: ui, scene, graph, documents, pixel art, vector art, + render — `tools/` sees one flat object as before), textProbe (finding widgets by their text — the ground floor of the test hook, shared with the sign-in screen), auth/LoginScreen + auth/PasswordDialog + auth/loginRules + auth/FormStatus (the sign-in screen and the change-password dialog in the canvas, what either may complain about, and the warning line and busy state both show, #177/#182), autosave, polygonEdit (points of an outline: what is under the pointer, whether a point is inside, @@ -159,7 +164,11 @@ src/editor/plugins/ startPlugins (list, import, host; runs before the first p 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/. A pan only moves the world and redraws the screen-space overlays (`moveCamera`); a full - `redraw()` follows only when an object crosses the edge of the view + `redraw()` follows only when an object crosses the edge of the view. + The scene view's tools keep their own state and reach the view through `SceneViewHost`: + tilemapPainting (brush, eraser, rectangle, fill and pick on the selected map), + polygonCorners (a polygon collider's corner handles, #151), tilemapSolids (where a placed + map blocks, outlined like a collider, #132/#173) 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/shape), variableRows (one row shape for @@ -176,9 +185,13 @@ src/editor/panels/ AssetPanel, assetGroups (groups by type and their order, markIcons (the kind marks, the row actions reset, apply and the two fit arrows, and a transition's in/out arrow — they were characters the bundled font does not have, #214), TilemapPanel (tools, tiles and layers of the one selected tilemap, beside the scene view, #142; - painting itself is SceneViewport) -src/editor/graph/ GraphEditor (header, breadcrumb), GraphCanvas, graphView (zoom limits, grid, panAndZoom — shared with NodeBoard and the Tile tab's TileCanvas), EdgeLayer (curves and fold marks), graphMenus, - 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), + painting itself is `viewport/tilemapPainting`) +src/editor/graph/ GraphEditor (header, breadcrumb), GraphCanvas and what it lends its gestures through + `GraphCanvasHost`: wiring (making edges — a drag from a pin, the palette a drop into + empty space opens, a transition armed from a state's menu), graphDrags (nodes, groups and + comments moved or resized, each gesture one undo step), annotationLayer (the boxes behind + the edges); graphView (zoom limits, grid, panAndZoom — shared with NodeBoard and the Tile tab's TileCanvas), EdgeLayer (curves and fold marks), graphMenus, + 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 and the clock that launches them), AnnotationView + annotationDrag (groups and comments: what a drag carries, each thing moved once), SnapToggle (the magnet every tab that snaps carries, the vector art tab included, #194) src/editor/container/ ContainerEditor (header), ContainerCanvas (a SceneViewport on a template) diff --git a/Development.md b/Development.md index bbe4282..b9b0cf0 100644 --- a/Development.md +++ b/Development.md @@ -13,7 +13,7 @@ npm run check # typecheck + lint + format:check + tests, the gate CI runs npm run build # writes dist/ and regenerates index.html ./build.sh # the same under `set -o pipefail`, for callers that pipe the output php tools/make-user.php # an account; every tool signs in (see Accounts) -node tools/seed-e2e.mjs && node tools/e2e.mjs # 1313 editor checks, screenshots in /tmp/gm-e2e-*.png +node tools/seed-e2e.mjs && node tools/e2e.mjs # 1314 editor checks, screenshots in /tmp/gm-e2e-*.png GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step ./e2e.sh start [GM_STEPS] # the same run detached, see below ./e2e.sh status # live progress, or the last run's result