3D 리플레이 자동 시점 · Tab 점수판: 카메라 "자동"(교전 직전에 이긴 선수 1인칭, 직전 우리 팀 콜이 있으면 그 말부터 · 설치/해체 · 혼자 남은 선수 · 교전이 없으면 살아 있는 선수가 다 보이게 위에서) · Tab 을 누르고 있으면 게임처럼 팀 점수 · 궁극기 · K/D/A · 주무기 · 크레딧 · 변환기 scoreboard (크레딧 · 궁 점수 · 킬/데스/어시 · 전투 점수, BasicCombatStats · PlayerScore 하위 객체 읽기) · self-test · 테스트
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
78
site/web/src/components/ReplayScoreboard.tsx
Normal file
78
site/web/src/components/ReplayScoreboard.tsx
Normal file
@@ -0,0 +1,78 @@
|
||||
import type { MatchDetail, MatchPlayer } from '@gvr/shared';
|
||||
import { equipLabel, type ReplayFile } from '../lib/replay';
|
||||
import { boardAt, teamScoreAt, type BoardIndex, type BoardRow } from '../lib/scoreboard';
|
||||
|
||||
interface RosterItem {
|
||||
idx: number;
|
||||
info: MatchPlayer | null;
|
||||
name: string;
|
||||
ally: boolean;
|
||||
}
|
||||
|
||||
/** 리플레이 점수판: 게임에서 Tab 을 누른 것처럼 그 시각의 팀 점수 · 궁극기 · K/D/A · 무기 · 크레딧 */
|
||||
export default function ReplayScoreboard({ m, replay, ix, roster, t }: { m: MatchDetail; replay: ReplayFile; ix: BoardIndex; roster: RosterItem[]; t: number }) {
|
||||
const rows = roster.map((r) => ({ r, b: boardAt(replay, ix, r.idx, t) }));
|
||||
// 게임처럼 전투 점수 순 (없으면 킬 순)
|
||||
const order = (a: { b: BoardRow }, c: { b: BoardRow }) => (c.b.score ?? -1) - (a.b.score ?? -1) || c.b.kills - a.b.kills || a.b.deaths - c.b.deaths;
|
||||
const ally = rows.filter((x) => x.r.ally).sort(order);
|
||||
const enemy = rows.filter((x) => !x.r.ally).sort(order);
|
||||
const sc = teamScoreAt(replay, m.rounds, t);
|
||||
const team = (list: typeof rows, side: 'a' | 'e') => (
|
||||
<tbody className={`r3d-sb-team ${side}`}>
|
||||
{list.map(({ r, b }) => (
|
||||
<tr key={r.idx} className={b.dead ? 'dead' : undefined}>
|
||||
<td className="ag">
|
||||
{r.info?.character?.icon ? <img src={r.info.character.icon} alt="" /> : <span className="ag-ph" />}
|
||||
</td>
|
||||
<td className="nm">
|
||||
<b>{r.name}</b>
|
||||
{r.info?.character?.name && <span className="muted"> {r.info.character.name}</span>}
|
||||
</td>
|
||||
<td className="ult" title={b.ult == null ? '궁극기 점수 모름' : `궁극기 ${b.ult} / ${b.ultMax}`}>
|
||||
{b.ult == null ? (
|
||||
<span className="muted">-</span>
|
||||
) : b.ult >= b.ultMax ? (
|
||||
<span className="ult-ready">궁 준비</span>
|
||||
) : (
|
||||
<span className="ult-dots" aria-label={`궁극기 ${b.ult} / ${b.ultMax}`}>
|
||||
{Array.from({ length: b.ultMax }, (_, i) => (
|
||||
<i key={i} className={i < b.ult! ? 'on' : undefined} />
|
||||
))}
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="num">{b.kills}</td>
|
||||
<td className="num">{b.deaths}</td>
|
||||
<td className="num">{b.assists ?? '-'}</td>
|
||||
<td className="wp">{equipLabel(b.weapon ?? undefined) ?? '-'}</td>
|
||||
<td className="num money">{b.money == null ? '-' : `${b.money.toLocaleString('ko-KR')}`}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
);
|
||||
return (
|
||||
<div className="r3d-sb" role="dialog" aria-label="점수판">
|
||||
<div className="r3d-sb-head">
|
||||
<span className="a">아군 {sc.ally}</span>
|
||||
<span className="muted">R{sc.round}</span>
|
||||
<span className="e">{sc.enemy} 상대</span>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colSpan={2}>선수</th>
|
||||
<th>궁극기</th>
|
||||
<th className="num">K</th>
|
||||
<th className="num">D</th>
|
||||
<th className="num">A</th>
|
||||
<th>무기</th>
|
||||
<th className="num">크레딧</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{team(ally, 'a')}
|
||||
{team(enemy, 'e')}
|
||||
</table>
|
||||
{!ix.has && <div className="muted small r3d-sb-note">이 리플레이는 예전 변환 결과라 크레딧 · 궁극기 · 어시스트가 없습니다. 게임 PC 앱을 1.10.0 이상으로 올리면 다음에 열 때 다시 변환합니다.</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -15,6 +15,9 @@ import CrosshairPanel from './CrosshairPanel';
|
||||
import { buildAnimIndex, rigInput } from '../lib/replayAnim';
|
||||
import { abilityLook, type AbilityLook } from '../lib/abilities';
|
||||
import { loadVfxDb, vfxCoverage, VfxObject, type Place, type VfxDb } from '../lib/vfx';
|
||||
import { buildDirector, shotIndexAt, SHOT_LABEL } from '../lib/director';
|
||||
import { boardIndex } from '../lib/scoreboard';
|
||||
import ReplayScoreboard from './ReplayScoreboard';
|
||||
|
||||
/**
|
||||
* 3D 리플레이 (발로란트 .vrf → tools/replay-extract → gvr-replay JSON).
|
||||
@@ -41,9 +44,12 @@ const REAL_LABEL_CM = 190;
|
||||
/** 위에서 볼 때 요원 몸을 이만큼 키운다 (맵 전체를 볼 때도 보이게) */
|
||||
const TOP_MODEL_SCALE = 1.8;
|
||||
|
||||
/** 카메라: 위에서 보기(돌리기) · 1인칭(고른 선수 눈) · 자유시점(WASD) */
|
||||
type CamMode = 'top' | 'fp' | 'free';
|
||||
const CAM_LABEL: Record<CamMode, string> = { top: '위에서', fp: '1인칭', free: '자유시점' };
|
||||
/** 카메라: 자동(관전처럼 장면마다 1인칭 · 위에서) · 위에서 보기(돌리기) · 1인칭(고른 선수 눈) · 자유시점(WASD) */
|
||||
type CamMode = 'auto' | 'top' | 'fp' | 'free';
|
||||
type View = Exclude<CamMode, 'auto'>;
|
||||
const CAM_LABEL: Record<CamMode, string> = { auto: '자동', top: '위에서', fp: '1인칭', free: '자유시점' };
|
||||
/** 자동 · 위에서 볼 때 카메라가 따라가는 빠르기 (1초에 남은 거리의 이만큼) */
|
||||
const AUTO_EASE = 2.2;
|
||||
|
||||
type MapState = { state: 'none' | 'loading' | 'ready' | 'error'; progress?: number };
|
||||
/** 천장 자르기: 자동 · 끔 · 직접(가장 낮은 층에서 cm) */
|
||||
@@ -141,6 +147,52 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
xhairRef.current = cfg.crosshair;
|
||||
const [xOpen, setXOpen] = useState(false);
|
||||
const hasCrosshairs = useMemo(() => replay.players.some((p) => !!p.crosshair?.length), [replay]);
|
||||
// 자동 시점: 지금 장면 번호 (화면 표시 · 1인칭 조준점용)
|
||||
const [shotIdx, setShotIdx] = useState(-1);
|
||||
// 점수판 (Tab 을 누르는 동안 · 버튼으로 켜고 끔)
|
||||
const [board, setBoard] = useState(false);
|
||||
const boardIx = useMemo(() => boardIndex(replay), [replay]);
|
||||
const rootRef = useRef<HTMLDivElement>(null);
|
||||
const hoverRef = useRef(false);
|
||||
// 게임처럼 Tab 을 누르고 있는 동안 점수판. 재생기 위에 마우스가 있거나 재생기 안을 누른 뒤에만 (글 입력 중은 그대로)
|
||||
useEffect(() => {
|
||||
let held = false;
|
||||
const active = () => {
|
||||
const el = rootRef.current;
|
||||
return !!el && (hoverRef.current || el.contains(document.activeElement));
|
||||
};
|
||||
const typing = (e: KeyboardEvent) => {
|
||||
const el = e.target as HTMLElement | null;
|
||||
if (!el) return false;
|
||||
if (el.isContentEditable || el.tagName === 'TEXTAREA') return true;
|
||||
return el.tagName === 'INPUT' && !['range', 'checkbox', 'button', 'radio'].includes((el as HTMLInputElement).type);
|
||||
};
|
||||
const down = (e: KeyboardEvent) => {
|
||||
if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || typing(e) || !active()) return;
|
||||
e.preventDefault();
|
||||
held = true;
|
||||
if (!e.repeat) setBoard(true);
|
||||
};
|
||||
const up = (e: KeyboardEvent) => {
|
||||
if (e.key !== 'Tab' || !held) return;
|
||||
e.preventDefault();
|
||||
held = false;
|
||||
setBoard(false);
|
||||
};
|
||||
const blur = () => {
|
||||
if (!held) return;
|
||||
held = false;
|
||||
setBoard(false);
|
||||
};
|
||||
window.addEventListener('keydown', down, true);
|
||||
window.addEventListener('keyup', up, true);
|
||||
window.addEventListener('blur', blur);
|
||||
return () => {
|
||||
window.removeEventListener('keydown', down, true);
|
||||
window.removeEventListener('keyup', up, true);
|
||||
window.removeEventListener('blur', blur);
|
||||
};
|
||||
}, []);
|
||||
|
||||
// 바닥(미니맵) 높이: 선수 높이의 하위 5% (떨어져 죽은 기록은 뺀다)
|
||||
const zBase = useMemo(() => {
|
||||
@@ -173,6 +225,18 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
for (const r of roster) if (r.info?.userId) map.set(r.info.userId, r.idx);
|
||||
return map;
|
||||
}, [roster]);
|
||||
// 자동 시점 장면 (리플레이 기록 + 우리 팀 대화)
|
||||
const shots = useMemo(
|
||||
() =>
|
||||
buildDirector({
|
||||
replay,
|
||||
ally: roster.map((r) => r.ally),
|
||||
talks: m.utterances.filter((u) => !u.noise && u.text).map((u) => ({ t0: u.ts - base, t1: u.endTs - base, text: u.text! })),
|
||||
}),
|
||||
[replay, roster, m.utterances, base],
|
||||
);
|
||||
const shotsRef = useRef(shots);
|
||||
shotsRef.current = shots;
|
||||
|
||||
useEffect(() => {
|
||||
const mount = mountRef.current;
|
||||
@@ -599,7 +663,13 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
let raf = 0;
|
||||
let lastUi = 0;
|
||||
let lastNow = 0;
|
||||
let lastMode: CamMode = 'top';
|
||||
let lastMode: View = 'top';
|
||||
let lastAuto = false;
|
||||
let lastShot = -1;
|
||||
// 자동 · 위에서: 카메라가 보는 곳 (부드럽게 따라감)
|
||||
const autoTarget = new THREE.Vector3();
|
||||
const autoGoal = new THREE.Vector3();
|
||||
let autoDist = 100;
|
||||
const tmp = new THREE.Vector3();
|
||||
const euler = new THREE.Euler(0, 0, 0, 'YXZ');
|
||||
/** 1인칭 선수의 손 상태 (모두 리플레이 시각 t 로만 정한다) */
|
||||
@@ -653,14 +723,30 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
raf = requestAnimationFrame(frame);
|
||||
const dt = lastNow ? Math.min(0.1, (now - lastNow) / 1000) : 0;
|
||||
lastNow = now;
|
||||
const mode = camRef.current;
|
||||
if (mode !== lastMode) {
|
||||
controls.enabled = mode === 'top';
|
||||
const ps = player.state;
|
||||
const inScene = ps.mode === 'scene' && ps.scene?.label === REPLAY_SCENE_LABEL && ps.sceneTs != null;
|
||||
const t = inScene ? ps.sceneTs! - base : localT.current;
|
||||
if (!inScene) localT.current = t;
|
||||
// 자동: 장면마다 1인칭(그 선수) 또는 위에서 (살아 있는 선수가 다 보이게)
|
||||
const auto = camRef.current === 'auto';
|
||||
const si = auto ? shotIndexAt(shotsRef.current, t) : -1;
|
||||
const shot = si >= 0 ? shotsRef.current[si] : null;
|
||||
if (si !== lastShot) setShotIdx((lastShot = si));
|
||||
const mode: View = auto ? (shot?.pov != null ? 'fp' : 'top') : (camRef.current as View);
|
||||
if (mode !== lastMode || auto !== lastAuto) {
|
||||
controls.enabled = mode === 'top' && !auto;
|
||||
camera.near = mode === 'top' ? 0.5 : 0.01;
|
||||
camera.far = mode === 'top' ? 2000 : 600;
|
||||
camera.fov = mode === 'fp' ? 70 : 45;
|
||||
camera.updateProjectionMatrix();
|
||||
if (mode === 'top') resetCam.current();
|
||||
// 자동은 1인칭 → 위에서 넘어갈 때 지금 자리에서 부드럽게 빠진다. 자동을 끄면 보던 자리에서 돌리기
|
||||
if (mode === 'top' && !auto) {
|
||||
if (lastAuto) {
|
||||
controls.target.copy(autoTarget);
|
||||
controls.update();
|
||||
} else resetCam.current();
|
||||
}
|
||||
if (auto && !lastAuto) autoTarget.copy(controls.target);
|
||||
if (mode === 'free') {
|
||||
// 지금 보던 방향에서 시작
|
||||
euler.setFromQuaternion(camera.quaternion);
|
||||
@@ -669,12 +755,9 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
}
|
||||
free.keys.clear();
|
||||
lastMode = mode;
|
||||
lastAuto = auto;
|
||||
}
|
||||
const real = mode !== 'top';
|
||||
const ps = player.state;
|
||||
const inScene = ps.mode === 'scene' && ps.scene?.label === REPLAY_SCENE_LABEL && ps.sceneTs != null;
|
||||
const t = inScene ? ps.sceneTs! - base : localT.current;
|
||||
if (!inScene) localT.current = t;
|
||||
const ts = base + t;
|
||||
// 리플레이 시간 흐름 (애니메이션용, 시간을 크게 옮기면 0)
|
||||
const dtR = t - prevT >= 0 && t - prevT < 1000 ? (t - prevT) / 1000 : 0;
|
||||
@@ -685,7 +768,7 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
const i = playerByUser.get(u.userId);
|
||||
if (i != null) speaking.add(i);
|
||||
}
|
||||
const selIdx = selRef.current;
|
||||
const selIdx = auto ? shot?.pov ?? null : selRef.current;
|
||||
for (const v of views) {
|
||||
const tr = replay.players[v.idx].track;
|
||||
const p = samplePlayer(tr, t, replay.sampleMs * 6);
|
||||
@@ -695,7 +778,7 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
continue;
|
||||
}
|
||||
// 1인칭으로 보는 선수 자신은 숨긴다
|
||||
v.group.visible = !(mode === 'fp' && v.idx === selRef.current);
|
||||
v.group.visible = !(mode === 'fp' && v.idx === selIdx);
|
||||
v.drop.visible = v.shadow.visible = !mapReady && !real;
|
||||
v.group.position.copy(toWorld(p.x, p.y, Math.max(p.z, zBase - 400) + (real ? REAL_LABEL_CM - FOOT_CM : 0), zBase));
|
||||
v.group.scale.setScalar(real ? REAL_SCALE : 1);
|
||||
@@ -772,7 +855,7 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
trailGeo.setDrawRange(0, n);
|
||||
pos.needsUpdate = true;
|
||||
trail.visible = n > 1;
|
||||
if (mode === 'top' && followRef.current && views[selIdx].group.visible) {
|
||||
if (mode === 'top' && !auto && followRef.current && views[selIdx].group.visible) {
|
||||
const target = views[selIdx].group.position;
|
||||
tmp.copy(target).sub(controls.target);
|
||||
controls.target.add(tmp.multiplyScalar(0.15));
|
||||
@@ -958,6 +1041,29 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
const speed = (k.has('ShiftLeft') || k.has('ShiftRight') ? 40 : 12) * dt;
|
||||
tmp.set((k.has('KeyD') || k.has('ArrowRight') ? 1 : 0) - (k.has('KeyA') || k.has('ArrowLeft') ? 1 : 0), (k.has('KeyE') ? 1 : 0) - (k.has('KeyQ') ? 1 : 0), (k.has('KeyS') || k.has('ArrowDown') ? 1 : 0) - (k.has('KeyW') || k.has('ArrowUp') ? 1 : 0));
|
||||
if (tmp.lengthSq() > 0) camera.position.add(tmp.normalize().multiplyScalar(speed).applyQuaternion(camera.quaternion));
|
||||
} else if (auto) {
|
||||
// 전략 보기: 살아 있는 선수(없으면 모두)가 다 들어오게 내려다본다
|
||||
let n = 0;
|
||||
let x0 = Infinity, x1 = -Infinity, z0 = Infinity, z1 = -Infinity, ySum = 0;
|
||||
for (const pass of [0, 1]) {
|
||||
for (const v of views) {
|
||||
if (!v.group.visible || (pass === 0 && isDead(replay, v.idx, t))) continue;
|
||||
const q = v.group.position;
|
||||
x0 = Math.min(x0, q.x); x1 = Math.max(x1, q.x); z0 = Math.min(z0, q.z); z1 = Math.max(z1, q.z);
|
||||
ySum += q.y;
|
||||
n++;
|
||||
}
|
||||
if (n) break;
|
||||
}
|
||||
if (n) {
|
||||
autoGoal.set((x0 + x1) / 2, ySum / n, (z0 + z1) / 2);
|
||||
autoDist = Math.max(36, Math.min(125, Math.max(x1 - x0, (z1 - z0) * camera.aspect * 0.8) * 0.95 + 26));
|
||||
}
|
||||
const k = 1 - Math.exp(-dt * AUTO_EASE);
|
||||
autoTarget.lerp(autoGoal, k);
|
||||
tmp.set(autoTarget.x, autoTarget.y + autoDist * 0.92, autoTarget.z + autoDist * 0.42);
|
||||
camera.position.lerp(tmp, k);
|
||||
camera.lookAt(autoTarget);
|
||||
} else controls.update();
|
||||
if (mode !== 'fp') {
|
||||
vmOn = false;
|
||||
@@ -1035,6 +1141,10 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
if (to) seek(to.combat >= 0 ? to.combat - 3000 : to.buy);
|
||||
};
|
||||
|
||||
const shot = cam === 'auto' && shotIdx >= 0 ? shots[shotIdx] : null;
|
||||
// 지금 화면이 1인칭인지 (자동이 1인칭 장면일 때 포함)
|
||||
const fpView = cam === 'fp' || (cam === 'auto' && shot?.pov != null);
|
||||
const fpWho = cam === 'auto' ? shot?.pov ?? null : sel;
|
||||
const chooseCam = (c: CamMode) => {
|
||||
// 1인칭은 고른 선수가 있어야 한다: 없으면 지금 살아 있는 첫 아군
|
||||
if (c === 'fp' && sel == null) {
|
||||
@@ -1046,7 +1156,7 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
|
||||
if (!T) return <div className="map-missing">이 경기에는 미니맵 좌표 정보가 없어 3D 리플레이를 그릴 수 없습니다</div>;
|
||||
return (
|
||||
<div className="r3d">
|
||||
<div className="r3d" ref={rootRef} onPointerEnter={() => (hoverRef.current = true)} onPointerLeave={() => (hoverRef.current = false)}>
|
||||
<div className="r3d-stage" ref={mountRef}>
|
||||
<div className="r3d-hud tl">
|
||||
<b>{rd ? `R${rd.num}` : ''}</b> <span className="mono">{clock}</span>
|
||||
@@ -1075,18 +1185,38 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{cam === 'fp' && scoped && <div className="r3d-scope" />}
|
||||
{cam === 'fp' && <canvas ref={crossRef} className="r3d-xcanvas" aria-hidden />}
|
||||
{cam === 'fp' && xOpen && (
|
||||
{fpView && scoped && <div className="r3d-scope" />}
|
||||
{fpView && <canvas ref={crossRef} className="r3d-xcanvas" aria-hidden />}
|
||||
{fpView && xOpen && (
|
||||
<CrosshairPanel
|
||||
playerName={selInfo?.name ?? null}
|
||||
player={sel != null ? crosshairAt(replay.players[sel].crosshair, ui.t) : null}
|
||||
playerName={fpWho != null ? roster[fpWho]?.name ?? null : null}
|
||||
player={fpWho != null ? crosshairAt(replay.players[fpWho].crosshair, ui.t) : null}
|
||||
hasAny={hasCrosshairs}
|
||||
onClose={() => setXOpen(false)}
|
||||
/>
|
||||
)}
|
||||
{cam === 'free' && <div className="r3d-hud bl muted small">끌기: 둘러보기 · W A S D: 이동 · Q / E: 아래 / 위 · Shift: 빠르게 (화면을 한 번 누른 뒤)</div>}
|
||||
{selInfo && cam !== 'free' && (
|
||||
{cam === 'auto' && shot && (
|
||||
<div className="r3d-hud bl r3d-auto">
|
||||
<div className="muted small">자동 · {SHOT_LABEL[shot.kind]}</div>
|
||||
{shot.pov != null ? (
|
||||
<div>
|
||||
<b className={roster[shot.pov]?.ally ? 'a' : 'e'}>{roster[shot.pov]?.name}</b>
|
||||
{roster[shot.pov]?.info?.character?.name && <span className="muted"> · {roster[shot.pov].info!.character.name}</span>} 시점
|
||||
{shot.kind === 'fight' && (shot.kills ?? 0) > 1 && <span className="muted"> · {shot.kills}킬</span>}
|
||||
{(() => {
|
||||
const w = equipLabel(replay.equipKinds?.[equipAt(equipByPlayer[shot.pov], ui.t)]);
|
||||
return w ? <div>🔫 {w}</div> : null;
|
||||
})()}
|
||||
</div>
|
||||
) : (
|
||||
<div className="muted small">살아 있는 선수가 모두 보이게 위에서 봅니다</div>
|
||||
)}
|
||||
{shot.call && <div className="r3d-call">콜 “{shot.call}”</div>}
|
||||
</div>
|
||||
)}
|
||||
{board && <ReplayScoreboard m={m} replay={replay} ix={boardIx} roster={roster} t={ui.t} />}
|
||||
{selInfo && cam !== 'free' && cam !== 'auto' && (
|
||||
<div className="r3d-hud bl">
|
||||
<b className={selInfo.ally ? 'a' : 'e'}>{selInfo.name}</b>
|
||||
{selInfo.info?.character?.name && <span className="muted"> · {selInfo.info.character.name}</span>}
|
||||
@@ -1145,13 +1275,22 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
</span>
|
||||
)}
|
||||
<span className="r3d-cams" role="group" aria-label="카메라">
|
||||
{(['top', 'fp', 'free'] as CamMode[]).map((c) => (
|
||||
<button key={c} className={`chip${cam === c ? ' on' : ''}`} onClick={() => chooseCam(c)} aria-pressed={cam === c}>
|
||||
{(['auto', 'top', 'fp', 'free'] as CamMode[]).map((c) => (
|
||||
<button
|
||||
key={c}
|
||||
className={`chip${cam === c ? ' on' : ''}`}
|
||||
onClick={() => chooseCam(c)}
|
||||
aria-pressed={cam === c}
|
||||
title={c === 'auto' ? '관전처럼 자동으로: 교전 직전에 이긴 선수 1인칭 · 교전이 없으면 위에서 전체 · 설치/해체 · 혼자 남은 선수' : undefined}
|
||||
>
|
||||
{CAM_LABEL[c]}
|
||||
</button>
|
||||
))}
|
||||
</span>
|
||||
{cam === 'fp' && (
|
||||
<button className={`chip${board ? ' on' : ''}`} onClick={() => setBoard((b) => !b)} aria-pressed={board} title="점수판: 크레딧 · 궁극기 · K/D/A (화면에서 Tab 을 누르고 있어도 됩니다)">
|
||||
점수판 (Tab)
|
||||
</button>
|
||||
{fpView && (
|
||||
<button className={`chip${xOpen ? ' on' : ''}`} onClick={() => setXOpen((o) => !o)} aria-pressed={xOpen} title="1인칭 조준점: 선수 조준점 · 내 조준점 설정">
|
||||
조준점
|
||||
</button>
|
||||
@@ -1163,7 +1302,14 @@ export default function ReplayViewer({ m, replay, sync }: Props) {
|
||||
)}
|
||||
</div>
|
||||
<div className="r3d-foot muted">
|
||||
{cam === 'top' ? '마우스 왼쪽 끌기: 회전 · 오른쪽 끌기: 이동 · 휠: 확대 · 선수 클릭: 선택' : cam === 'fp' ? '1인칭: 고른 선수 눈높이 · 다른 선수를 누르면 그 선수로' : '자유시점: 끌어서 둘러보기 · WASD 이동'} ·{' '}
|
||||
{cam === 'auto'
|
||||
? '자동: 교전 직전에 이긴 선수 1인칭으로 넘어가고(직전 콜이 있으면 그 말부터), 교전이 없으면 위에서 전체를 봅니다'
|
||||
: cam === 'top'
|
||||
? '마우스 왼쪽 끌기: 회전 · 오른쪽 끌기: 이동 · 휠: 확대 · 선수 클릭: 선택'
|
||||
: cam === 'fp'
|
||||
? '1인칭: 고른 선수 눈높이 · 다른 선수를 누르면 그 선수로'
|
||||
: '자유시점: 끌어서 둘러보기 · WASD 이동'}{' '}
|
||||
· Tab: 점수판 ·{' '}
|
||||
{sync.matched >= 3
|
||||
? `대화 동기화: 킬 ${sync.matched}개로 맞춤 (최대 오차 ${((sync.spreadMs ?? 0) / 1000).toFixed(2)}초)`
|
||||
: '대화 동기화: 라운드 시작으로 대략 맞춤'}
|
||||
|
||||
Reference in New Issue
Block a user