feat(B04): 지표면 3D 방위 표시를 3축 트라이어드로 교체

옛 콤파스는 방위각(`atan2(ox, oz)`)만 써서 경사에 따른 남북 압축이 빠졌음 —
사시도 프리셋(오프셋 120·95·135, 앙각 27.7°)에서 바늘 41.6°, 화면 실제 북쪽 62.4°로
20.8° 어긋났음(2026-09-03 사용자 지적).

세계 축 N(−z)·E(+x)·Z(+y)를 카메라 화면 기저(오른쪽 r, 위 u)에 투영해 선과 글자를
그림. 기저는 카메라 오프셋만으로 구함(up = +y 고정). 뒤로 누운 축(깊이 > 0.25)과
정면으로 와 짧아진 축은 흐리게 그려 겹침을 줄임.

검증: typecheck 통과. 기본 시점에서 DOM 좌표가 해석값과 일치 —
N (28.0, 11.0) · E (45.0, 28.0) · Z (28.0, 27.4). 회전 중 거동은 사용자 화면 검증 대기.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-03 19:54:13 +09:00
co-authored by Claude Opus 5
parent b908a0b10d
commit dcabce147e
3 changed files with 93 additions and 39 deletions
+15 -12
View File
@@ -567,11 +567,6 @@
filter: drop-shadow(0 1px 2px var(--color-surface-raised));
}
.b04-surface__compass-dial {
transform-origin: 50% 50%;
transition: transform 80ms linear;
}
.b04-surface__compass-ring {
fill: var(--color-surface-raised);
fill-opacity: 0.75;
@@ -579,15 +574,14 @@
stroke-width: 1;
}
.b04-surface__compass-north {
fill: var(--color-danger, #d64545);
/* 축 하나 = 선 + 글자. 좌표는 카메라 자세대로 매 프레임 다시 쓰인다. */
.b04-surface__compass-axis line {
stroke: var(--color-text-secondary);
stroke-width: 1.5;
stroke-linecap: round;
}
.b04-surface__compass-south {
fill: var(--color-text-secondary);
}
.b04-surface__compass-letter {
.b04-surface__compass-axis text {
fill: var(--color-text-body);
font-family: var(--font-body);
font-size: 9px;
@@ -595,6 +589,15 @@
text-anchor: middle;
}
/* 도북은 눈에 먼저 들어와야 한다 — 선·글자 모두 강조색. */
.b04-surface__compass-axis--n line {
stroke: var(--color-danger, #d64545);
}
.b04-surface__compass-axis--n text {
fill: var(--color-danger, #d64545);
}
/* --- 하단 2D 지도 --- */
.b04-map {
--b04-map-vector: var(--color-accent);