fix: clarify snapshot and calibration controls
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { evaluateDasBand, exportBandEvaluation } from "/packages/acoustics-core/evaluation.js";
|
||||
import { DEFAULT_MAX_COMPENSATION_DB } from "/packages/acoustics-core/frequency-response.js";
|
||||
import { downloadJson, readJsonFile } from "/packages/contracts/io.js";
|
||||
import {
|
||||
validateArrayDefinition,
|
||||
@@ -405,10 +406,12 @@ function renderAcousticSummary() {
|
||||
const responseCurveCount = state.arrayDefinition.microphones.filter(
|
||||
(microphone) => microphone.frequencyResponse?.length >= 2,
|
||||
).length;
|
||||
const maxCompensationDb =
|
||||
state.experiment.beamforming.maxCompensationDb ?? DEFAULT_MAX_COMPENSATION_DB;
|
||||
const responseMode =
|
||||
state.experiment.beamforming.compensateFrequencyResponse === false
|
||||
? "응답 역보정 꺼짐"
|
||||
: "알려진 응답 역보정";
|
||||
: "알려진 응답 역보정 ≤ " + formatNumber(maxCompensationDb, 0) + " dB";
|
||||
elements.acousticEnvironmentSummary.textContent =
|
||||
profileLabels[profile] + " · 수신점당 최대 " +
|
||||
maximumSparsePathsPerReceiver(state.scene) + "개 sparse path · 응답 curve " +
|
||||
@@ -894,7 +897,7 @@ function applyValidation(validation) {
|
||||
if (!state.active) {
|
||||
elements.runButton.disabled = !validation.valid;
|
||||
if (validation.valid) {
|
||||
elements.runButton.textContent = state.lastRun ? "▶ 다시 실행" : "▶ 기본 예제 실행";
|
||||
elements.runButton.textContent = state.lastRun ? "▶ 다시 실행" : "▶ Snapshot 실행";
|
||||
if (!state.lastRun && document.documentElement.dataset.runState === "idle") {
|
||||
setRunStatus(
|
||||
`${state.arrayDefinition.microphones.length} ch · ` +
|
||||
@@ -1143,7 +1146,7 @@ async function runSimulation() {
|
||||
activity.worker?.terminate();
|
||||
if (state.active === activity) state.active = null;
|
||||
setConfigurationLocked(false);
|
||||
elements.runButton.textContent = state.lastRun ? "▶ 다시 실행" : "▶ 기본 예제 실행";
|
||||
elements.runButton.textContent = state.lastRun ? "▶ 다시 실행" : "▶ Snapshot 실행";
|
||||
renderBandEditors();
|
||||
await validateCurrent();
|
||||
}
|
||||
|
||||
@@ -86,6 +86,10 @@ test("Acoustic Camera가 8×8 CPU 실행·결과 저장·stale·재실행 흐름
|
||||
documentObject.querySelector("#acoustic-environment-summary").textContent.includes("sparse path"),
|
||||
"bounded acoustic cost is visible",
|
||||
);
|
||||
assert(
|
||||
documentObject.querySelector("#acoustic-environment-summary").textContent.includes("≤ 24 dB"),
|
||||
"safe inverse-response boost limit is visible",
|
||||
);
|
||||
|
||||
const canvas = documentObject.querySelector("#scene-canvas");
|
||||
await waitFor(() => canvas.width > 0 && canvas.height > 0, "scene canvas 초기 렌더");
|
||||
@@ -103,6 +107,11 @@ test("Acoustic Camera가 8×8 CPU 실행·결과 저장·stale·재실행 흐름
|
||||
!documentObject.querySelector("#run-button").disabled,
|
||||
"8×8 CPU 입력 검증",
|
||||
);
|
||||
assertEqual(
|
||||
documentObject.querySelector("#run-button").textContent.trim(),
|
||||
"▶ Snapshot 실행",
|
||||
"snapshot label survives runtime validation",
|
||||
);
|
||||
assertEqual(documentObject.querySelector("#grid-preset").value, "custom", "custom grid preset");
|
||||
assert(
|
||||
documentObject.documentElement.dataset.unsavedWork.includes("Experiment"),
|
||||
|
||||
Reference in New Issue
Block a user