Initial import
This commit is contained in:
commit
ab891a315c
773 changed files with 257255 additions and 0 deletions
134
docs/MAP_EDITOR_FLOWCHART.svg
Normal file
134
docs/MAP_EDITOR_FLOWCHART.svg
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1320" viewBox="0 0 1600 1320">
|
||||
<defs>
|
||||
<style>
|
||||
.title { font: 700 34px 'Segoe UI', Tahoma, sans-serif; fill: #0f172a; }
|
||||
.subtitle { font: 500 16px 'Segoe UI', Tahoma, sans-serif; fill: #334155; }
|
||||
.section { fill: #f8fbff; stroke: #94a3b8; stroke-width: 1.6; rx: 16; stroke-dasharray: 8 6; }
|
||||
.node { fill: #eef4ff; stroke: #355caa; stroke-width: 2.1; rx: 14; }
|
||||
.node2 { fill: #edfdf5; stroke: #2f855a; stroke-width: 2.1; rx: 14; }
|
||||
.node3 { fill: #fff7ed; stroke: #c2410c; stroke-width: 2.1; rx: 14; }
|
||||
.terminal { fill: #ffe8e8; stroke: #b42318; stroke-width: 2.1; rx: 20; }
|
||||
.label { font: 700 18px 'Segoe UI', Tahoma, sans-serif; fill: #0f172a; }
|
||||
.small { font: 500 15px 'Segoe UI', Tahoma, sans-serif; fill: #1f2937; }
|
||||
.tiny { font: 500 13px 'Segoe UI', Tahoma, sans-serif; fill: #475569; }
|
||||
.edge { stroke: #334155; stroke-width: 2.4; fill: none; marker-end: url(#arrowHead); }
|
||||
.edge2 { stroke: #2f855a; stroke-width: 2.4; fill: none; marker-end: url(#arrowHeadGreen); }
|
||||
.edge3 { stroke: #c2410c; stroke-width: 2.4; fill: none; marker-end: url(#arrowHeadOrange); }
|
||||
.hint { fill: #475569; font: 600 13px 'Segoe UI', Tahoma, sans-serif; }
|
||||
.pill { fill: #dbeafe; stroke: #60a5fa; stroke-width: 1.2; rx: 999; }
|
||||
.pillText { font: 700 12px 'Segoe UI', Tahoma, sans-serif; fill: #1d4ed8; }
|
||||
</style>
|
||||
<marker id="arrowHead" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
||||
<path d="M0,0 L0,6 L9,3 z" fill="#334155" />
|
||||
</marker>
|
||||
<marker id="arrowHeadGreen" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
||||
<path d="M0,0 L0,6 L9,3 z" fill="#2f855a" />
|
||||
</marker>
|
||||
<marker id="arrowHeadOrange" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
||||
<path d="M0,0 L0,6 L9,3 z" fill="#c2410c" />
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<rect x="18" y="18" width="1564" height="1284" fill="#ffffff" stroke="#cbd5e1" stroke-width="2" rx="20" />
|
||||
<text x="800" y="64" text-anchor="middle" class="title">New RPG Map Editor Request Flow</text>
|
||||
<text x="800" y="94" text-anchor="middle" class="subtitle">From clicking a map record, to editing in the popup, to saving, refreshing, and closing</text>
|
||||
|
||||
<rect x="70" y="132" width="1460" height="250" class="section" />
|
||||
<text x="92" y="162" class="label">A) Open the popup editor</text>
|
||||
|
||||
<rect x="100" y="190" width="220" height="64" class="node" />
|
||||
<text x="210" y="226" text-anchor="middle" class="label">Click Maps record</text>
|
||||
|
||||
<rect x="390" y="190" width="240" height="64" class="node" />
|
||||
<text x="510" y="226" text-anchor="middle" class="label">Select Editor tab</text>
|
||||
|
||||
<rect x="710" y="180" width="360" height="84" class="node" />
|
||||
<text x="890" y="214" text-anchor="middle" class="label">MapEditorPanels opens popup</text>
|
||||
<text x="890" y="238" text-anchor="middle" class="small">buildRoomEditorHtml() injects serialized map + NPC + sprite data</text>
|
||||
|
||||
<rect x="1140" y="180" width="340" height="84" class="node" />
|
||||
<text x="1310" y="214" text-anchor="middle" class="label">Popup boots ready</text>
|
||||
<text x="1310" y="238" text-anchor="middle" class="small">layers, palette, history, NPC overlays</text>
|
||||
|
||||
<path d="M320 222 L390 222" class="edge" />
|
||||
<path d="M630 222 L710 222" class="edge" />
|
||||
<path d="M1070 222 L1140 222" class="edge" />
|
||||
|
||||
<rect x="70" y="414" width="1460" height="410" class="section" />
|
||||
<text x="92" y="444" class="label">B) Work inside the popup</text>
|
||||
|
||||
<rect x="100" y="482" width="280" height="74" class="node2" />
|
||||
<text x="240" y="515" text-anchor="middle" class="label">Paint tiles</text>
|
||||
<text x="240" y="539" text-anchor="middle" class="small">brush palette + grouped history</text>
|
||||
|
||||
<rect x="430" y="482" width="280" height="74" class="node2" />
|
||||
<text x="570" y="515" text-anchor="middle" class="label">Move / add NPCs</text>
|
||||
<text x="570" y="539" text-anchor="middle" class="small">drag, snap, assign templates</text>
|
||||
|
||||
<rect x="760" y="482" width="280" height="74" class="node2" />
|
||||
<text x="900" y="515" text-anchor="middle" class="label">Edit map info</text>
|
||||
<text x="900" y="539" text-anchor="middle" class="small">name, width, height</text>
|
||||
|
||||
<rect x="1090" y="482" width="340" height="74" class="node2" />
|
||||
<text x="1260" y="515" text-anchor="middle" class="label">Switch layers or maps</text>
|
||||
<text x="1260" y="539" text-anchor="middle" class="small">posts map-open request to host</text>
|
||||
|
||||
<path d="M380 519 L430 519" class="edge2" />
|
||||
<path d="M710 519 L760 519" class="edge2" />
|
||||
<path d="M1040 519 L1090 519" class="edge2" />
|
||||
|
||||
<rect x="240" y="610" width="1120" height="140" class="node3" />
|
||||
<text x="800" y="646" text-anchor="middle" class="label">Popup mutates local state first</text>
|
||||
<text x="800" y="672" text-anchor="middle" class="small">selected layer, tile rows, NPC record, history, and selection state stay in memory until save or close</text>
|
||||
<text x="800" y="698" text-anchor="middle" class="tiny">The host editor does not change until the popup posts a message or the API save completes.</text>
|
||||
|
||||
<path d="M800 556 L800 610" class="edge3" />
|
||||
|
||||
<rect x="70" y="852" width="1460" height="250" class="section" />
|
||||
<text x="92" y="882" class="label">C) Save and synchronize</text>
|
||||
|
||||
<rect x="120" y="920" width="250" height="74" class="terminal" />
|
||||
<text x="245" y="952" text-anchor="middle" class="label">Click Save</text>
|
||||
<text x="245" y="976" text-anchor="middle" class="small">popup collects current state</text>
|
||||
|
||||
<rect x="430" y="910" width="330" height="94" class="node3" />
|
||||
<text x="595" y="944" text-anchor="middle" class="label">POST /api/content/maps</text>
|
||||
<text x="595" y="968" text-anchor="middle" class="small">writes map index + per-map files</text>
|
||||
|
||||
<rect x="810" y="910" width="330" height="94" class="node3" />
|
||||
<text x="975" y="944" text-anchor="middle" class="label">POST /api/content/npcs</text>
|
||||
<text x="975" y="968" text-anchor="middle" class="small">writes map-local NPC instances</text>
|
||||
|
||||
<rect x="1190" y="920" width="250" height="74" class="node3" />
|
||||
<text x="1315" y="952" text-anchor="middle" class="label">Notify host</text>
|
||||
<text x="1315" y="976" text-anchor="middle" class="small">map-editor-saved</text>
|
||||
|
||||
<path d="M370 957 L430 957" class="edge3" />
|
||||
<path d="M760 957 L810 957" class="edge3" />
|
||||
<path d="M1140 957 L1190 957" class="edge3" />
|
||||
|
||||
<rect x="70" y="1124" width="1460" height="160" class="section" />
|
||||
<text x="92" y="1154" class="label">D) Close or change map</text>
|
||||
|
||||
<rect x="110" y="1188" width="320" height="66" class="terminal" />
|
||||
<text x="270" y="1220" text-anchor="middle" class="label">Leave Editor tab / close popup</text>
|
||||
|
||||
<rect x="490" y="1188" width="360" height="66" class="node" />
|
||||
<text x="670" y="1220" text-anchor="middle" class="label">Host closes popup and revokes blob URL</text>
|
||||
|
||||
<rect x="910" y="1188" width="300" height="66" class="terminal" />
|
||||
<text x="1060" y="1216" text-anchor="middle" class="label">Switch map in popup</text>
|
||||
<text x="1060" y="1237" text-anchor="middle" class="tiny">map-editor-open-map</text>
|
||||
|
||||
<rect x="1250" y="1188" width="240" height="66" class="node" />
|
||||
<text x="1370" y="1220" text-anchor="middle" class="label">Host reloads data</text>
|
||||
|
||||
<path d="M1220 1188 C1100 1140, 920 1138, 670 1188" class="edge" />
|
||||
<path d="M430 1221 L490 1221" class="edge" />
|
||||
<path d="M1210 1221 L1250 1221" class="edge" />
|
||||
|
||||
<rect x="120" y="104" width="250" height="20" class="pill" />
|
||||
<text x="245" y="118" text-anchor="middle" class="pillText">Popup-owned workflow</text>
|
||||
<rect x="1200" y="104" width="220" height="20" class="pill" />
|
||||
<text x="1310" y="118" text-anchor="middle" class="pillText">Host sync + save callbacks</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.8 KiB |
Loading…
Add table
Add a link
Reference in a new issue