feat(map-ui): 노드 맵 가로 진행 레이아웃(왼→오른쪽) (P14-2)

- nodeX=행(좌→우)·nodeY=열(분기)로 좌표축 스왑, 보스는 최우측 중앙
- 호출부(노드/도트/보스 간선) 인자 스왑. Lua 무수정(좌표는 JS 빌더 전담)
- 도트 보간·간선·라벨 좌표 함수 파생이라 자동 추종. 산출물 재생성

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 00:14:24 +09:00
parent 9e16465218
commit 8fa1079548
2 changed files with 1499 additions and 1499 deletions

View File

@@ -1532,10 +1532,10 @@ function upsertUi() {
text({ value: '다음 노드 선택', fontSize: 40, bold: true, color: GOLD, alignment: 4 }),
],
}));
// 절차 생성 맵용 정적 그리드 — 노드 7행×4열 + 보스, 점선 도트. RenderMap이 런타임 토글.
const nodeX = (c) => -270 + (c - 1) * 180;
const nodeY = (r) => -330 + (r - 1) * 105;
const BOSS_POS = { x: 0, y: 405 };
// 절차 생성 맵용 정적 그리드 — 가로 진행(왼→오른쪽): 행(row)=x축, 열(col)=y축 분기, 보스는 최우측 중앙.
const nodeX = (row) => -540 + (row - 1) * 150;
const nodeY = (col) => 180 - (col - 1) * 120;
const BOSS_POS = { x: nodeX(MAP_ROWS) + 150, y: 0 };
let mapN = 2;
const pushMapNode = (id, pos, size, label) => {
const nodePath = `/ui/DefaultGroup/MapHud/Node_${id}`;
@@ -1570,7 +1570,7 @@ function upsertUi() {
};
for (let r = 1; r <= MAP_ROWS; r++) {
for (let c = 1; c <= MAP_COLS; c++) {
pushMapNode(`r${r}c${c}`, { x: nodeX(c), y: nodeY(r) }, { x: 56, y: 56 }, '');
pushMapNode(`r${r}c${c}`, { x: nodeX(r), y: nodeY(c) }, { x: 56, y: 56 }, '');
}
}
pushMapNode('boss', BOSS_POS, { x: 72, y: 72 }, '보스');
@@ -1597,12 +1597,12 @@ function upsertUi() {
for (let c = 1; c <= MAP_COLS; c++) {
for (let c2 = c - 1; c2 <= c + 1; c2++) {
if (c2 < 1 || c2 > MAP_COLS) continue;
pushDots(`r${r}c${c}_${c2}`, { x: nodeX(c), y: nodeY(r) }, { x: nodeX(c2), y: nodeY(r + 1) });
pushDots(`r${r}c${c}_${c2}`, { x: nodeX(r), y: nodeY(c) }, { x: nodeX(r + 1), y: nodeY(c2) });
}
}
}
for (let c = 1; c <= MAP_COLS; c++) {
pushDots(`r${MAP_ROWS}c${c}_b`, { x: nodeX(c), y: nodeY(MAP_ROWS) }, BOSS_POS);
pushDots(`r${MAP_ROWS}c${c}_b`, { x: nodeX(MAP_ROWS), y: nodeY(c) }, BOSS_POS);
}
emit('MapHud', map);