Add original synthesized game audio and document sound provenance

This commit is contained in:
2026-10-15 00:03:23 +09:00
parent 05bc16e364
commit 16380eac79
11 changed files with 184 additions and 2 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ import { actionIcon, ashPileArt, checkIcon, fighterArt } from './fighter-art.js'
import { createFinishCutscene } from './finish-cutscene.js';
import { matchIntroductionMessage } from '../shared/match-introduction.js';
import { EMOTE_COOLDOWN_MS, EMOTE_IDS, EMOTE_LABELS, EMOTE_LINES, type EmoteId } from '../../constants/emotes.js';
import { sound } from './sound.js';
const fighter = (i: number, appearance?: FighterAppearance) => `<div class="fighter" data-fighter="${i}">
<div class="emote-bubble" role="status" hidden></div>
@@ -130,6 +131,7 @@ export function createMatchView(container: HTMLElement, onAction: (action: Actio
const f = s.finished;
el('.finish-reason').hidden = f.reason === 'hit';
const outcome = s.aborted ? 'aborted' : f.winnerIndex === null ? 'draw' : f.winnerIndex === s.selfIndex ? 'win' : 'loss';
if (outcome !== 'aborted') sound.play(outcome, `${s.matchId}:result`);
container.dataset.outcome = outcome;
arena.dataset.result = outcome;
el('.result-banner h2').textContent = ({ win: '승리!', loss: '패배', draw: '무승부', aborted: '대전 중단' })[outcome];
@@ -180,6 +182,6 @@ export function createMatchView(container: HTMLElement, onAction: (action: Actio
}
tick();
cutscene.update(state);
}, destroy() { submission++; clearInterval(interval); cutscene.destroy(); renderer.destroy(); container.innerHTML = ''; current = undefined; },
}, destroy() { submission++; clearInterval(interval); cutscene.destroy(); renderer.destroy(); sound.stop(); container.innerHTML = ''; current = undefined; },
};
}