Replace project with current server release and Windows setup
Import the 2026-10-09 source release, Fastify/SQLite backend, restored source assets, and analytics-enabled server build. Replace files from the previous release while retaining the existing repository history. Make builds portable across Windows and Linux, configure local startup, normalize Windows static asset paths, and fix test fixture cleanup and file URL handling. Exclude local environment settings, databases, dependencies, validation output, and TypeScript build cache from version control. Validation: npm ci, static and server builds, 106 arrival tests, and actual local HTTP checks passed. The full suite passed 467 of 470 tests; three tests still require QA fixtures omitted from the supplied release, documented in README-서버실행.md.
This commit is contained in:
@@ -3,16 +3,16 @@ import { readFile } from 'node:fs/promises';
|
||||
|
||||
const controller = await readFile(new URL('../src/input/CameraController.ts', import.meta.url), 'utf8');
|
||||
const html = await readFile(new URL('../index.html', import.meta.url), 'utf8');
|
||||
const main = await readFile(new URL('../src/main.ts', import.meta.url), 'utf8');
|
||||
const main = await readFile(new URL('../src/rendering/OriginalGlassRenderer.ts', import.meta.url), 'utf8');
|
||||
const historyShader = await readFile(new URL('../src/shaders/region-history.frag', import.meta.url), 'utf8');
|
||||
const mosaicShader = await readFile(new URL('../src/shaders/mosaic.frag', import.meta.url), 'utf8');
|
||||
assert.match(controller, /maxOffset = 0\.5/);
|
||||
assert.match(controller, /clamp\(value, 0, 0\.9\)/);
|
||||
assert.match(controller, /maxOffset = 0\.75/);
|
||||
assert.match(controller, /clamp\(value, 0\.35, 0\.90\)/);
|
||||
assert.match(controller, /multiplyScalar\(sensitivity\)/);
|
||||
assert.match(html, /id="camera-offset" type="range" min="0" max="0\.9" step="0\.01" value="0\.5"/);
|
||||
assert.match(html, /id="camera-offset" type="range" min="0\.35" max="0\.90" step="0\.01" value="0\.75"/);
|
||||
assert.match(html, /id="sensitivity" type="range" min="0\.2" max="2"/);
|
||||
assert.match(html, /Camera Offset <output id="cameraOut">0\.50/);
|
||||
assert.match(html, /권장 0\.35–0\.65 · 시점 이동 범위/);
|
||||
assert.match(html, /움직임 범위 <output id="cameraOut">0\.75/);
|
||||
assert.match(html, /움직임 범위[\s\S]*살짝[\s\S]*넓게/);
|
||||
assert.match(mosaicShader, /edgeTaper=style<=\.5\?1\.25:\.75/);
|
||||
assert.match(mosaicShader, /historyTexel=clamp\(floor\(fract\(gridUv\)\*8\.\),vec2\(0\.\),vec2\(7\.\)\)/);
|
||||
assert.equal(Math.floor(0.45 * 8), 3, 'split sample just left of the half-cell boundary stays in texel 3');
|
||||
@@ -20,24 +20,26 @@ assert.equal(Math.floor(0.50 * 8), 4, 'split sample at the half-cell boundary en
|
||||
|
||||
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
||||
const cameraPosition = (target, sensitivity, maxOffset) => clamp(target * sensitivity, -1, 1) * maxOffset;
|
||||
assert.equal(cameraPosition(1, 1, 0.5), 0.5, 'default offset reaches the configured midpoint');
|
||||
assert.equal(cameraPosition(1, 1, 0.9), 0.9, 'maximum offset reaches 0.9');
|
||||
assert.equal(cameraPosition(1, 2, 0.9), 0.9, 'sensitivity does not exceed the view clamp');
|
||||
assert.equal(clamp(1, 0, 0.9), 0.9, 'UI maximum matches controller clamp');
|
||||
assert.equal(cameraPosition(1, 1, 0.75), 0.75, 'default offset reaches the gentler 0.75');
|
||||
assert.equal(cameraPosition(1, 1, 0.90), 0.90, 'maximum offset reaches 0.90');
|
||||
assert.equal(cameraPosition(1, 2, 0.90), 0.90, 'sensitivity does not exceed the view clamp');
|
||||
assert.equal(clamp(1, 0.35, 0.90), 0.90, 'UI maximum matches controller clamp');
|
||||
assert.equal(clamp(0, 0.35, 0.90), 0.35, 'UI minimum matches controller clamp');
|
||||
|
||||
const signatureStart = main.indexOf('function currentSplitHistorySignature()');
|
||||
const signatureEnd = main.indexOf('\nfunction clearSplitHistory()', signatureStart);
|
||||
assert.ok(signatureStart >= 0 && signatureEnd > signatureStart, 'history reset signature exists');
|
||||
const signature = main.slice(signatureStart, signatureEnd);
|
||||
for (const key of ['mode', 'effectInput.value', 'mosaicStyleInput.value', 'active.uuid', 'depth.uuid', 'uRegionAvailable', 'uGridSize', 'uStrength', 'uRegionStrength', 'uCurvature', 'uPaneSize', 'matrixWorld', 'uDepthScale', 'uDepthBias', 'renderTarget.width', 'regionAtlasTarget.width', 'regionPaletteTarget.width']) {
|
||||
for (const key of ['mode', 'effect', 'style', 'active.uuid', 'depth.uuid', 'uRegionAvailable', 'uGridSize', 'uStrength', 'uRegionStrength', 'uCurvature', 'uPaneSize', 'matrixWorld', 'uDepthScale', 'uDepthBias', 'renderTarget.width', 'regionAtlasTarget.width', 'regionPaletteTarget.width']) {
|
||||
assert.ok(signature.includes(key), `model-reset signature includes ${key}`);
|
||||
}
|
||||
assert.doesNotMatch(signature, /uContentViewProjection|cameraController|uContentCameraPosition/, 'camera movement must not reset split history');
|
||||
assert.match(main, /function render\(dt: number, output: THREE\.WebGLRenderTarget \| null = null\)/, 'explicit A single view still defaults to the screen');
|
||||
assert.match(main, /const writeIndex = 1 - splitHistoryRead/);
|
||||
assert.match(main, /uPreviousHistory\.value = splitHistoryTargets\[splitHistoryRead\]\.texture/);
|
||||
assert.match(main, /uHistoryBlend\.value = splitHistoryInitialized \? 1 - Math\.exp\(-dt \/ 0\.07\) : 1/);
|
||||
assert.match(main, /updateSplitHistory\(dt\); renderer\.setRenderTarget\(null\); renderer\.render\(scene, camera\)/, 'inactive view updates the signature and clears stale history');
|
||||
assert.match(main, /splitHistoryTargets\.forEach\(\(target\) => target\.dispose\(\)\)/);
|
||||
assert.match(main, /updateSplitHistory\(dt\); renderer\.setRenderTarget\(output\); renderer\.render\(scene, camera\)/, 'inactive view updates the signature and clears stale history');
|
||||
assert.match(main, /splitHistoryTargets\.forEach\(target=>target\.dispose\(\)\)/);
|
||||
assert.match(main, /target\.setSize\(atlasWidth, atlasHeight\)/);
|
||||
assert.match(historyShader, /if\(uHistoryBlend>=\.9999\)\{gl_FragColor=current;return;\}/, 'first frame avoids sampling uninitialized history');
|
||||
assert.match(historyShader, /gl_FragColor=mix\(previous,current,clamp\(uHistoryBlend,0\.,1\.\)\)/);
|
||||
|
||||
Reference in New Issue
Block a user