fix: учитывать откосы для внешних солнечных лучей (#580)

Issue: #580
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-09-15 09:05:58 +03:00
parent 2b98a70fa9
commit d2c7e6f701
51 changed files with 691 additions and 535 deletions
+24
View File
@@ -5329,6 +5329,30 @@ const MUTANT_DEFINITIONS = [
replace: "{ id: 'openings-filled-tunnel-dark', fixture: 'visual', space: 'golden-lighting', mode: 'view',\n fillMode: 'none', customFill: { c: '#66717c', a: 0.55 }, glowEnabled: false,",
}],
},
{
id: 'sun-ray-outer-jamb-occlusion-ignored',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+ '&& node --test --test-name-pattern="#580:" test/sun.test.mjs',
because: 'если комнатную часть снова клиповать только полом, косой внешний луч '
+ 'проходит через сплошной откос; unit-защита #580 обязана увидеть лишний интервал',
patches: [{
file: 'src/sun.ts',
find: ' ...intersectRings(quad, rayQuad(innerA, innerB, away, len), clipPoly),',
replace: ' ...clipToRoom(quad, clipPoly), // mutant: skip the inner aperture',
}],
},
{
id: 'sun-ray-outer-occluded-rim-source-ignored',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+ '&& node --test --test-name-pattern="#580: an oblique" test/sun.test.mjs',
because: 'после затенения новая боковая граница начинается на внутреннем откосе; '
+ 'unit-защита #580 обязана поймать пропавшую чёткую обводку',
patches: [{
file: 'src/sun.ts',
find: ' rimSources = [a, b, innerA, innerB];',
replace: ' rimSources = [a, b]; // mutant: ignore the occluded beam sides',
}],
},
{
id: 'sun-ray-origin-outer-ignored',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '