v1.59.0-beta.8: audit follow-ups and inner-corner sun rays

This commit is contained in:
Matysh
2026-08-05 20:07:27 +03:00
parent 3ad4e9d803
commit e188f9d609
31 changed files with 619 additions and 204 deletions
+9 -1
View File
@@ -9,7 +9,7 @@ import {
wallBodyRings, wallBodiesUnionPath, innerContourForRoom,
paperRoomShapesWithWalls, WALL_MIN_CM, WALL_MAX_CM, MITRE_LIMIT,
atomicPolyForRoom, insetOffsetsForRoom, wallIntervals, normalizeWallIntervals,
intervalCmAt,
intervalCmAt, wallBodyNeedsSolid, WALL_HATCH_MIN_PX,
} from '../test-build/wall-thickness.js';
import { polygonArea, paperRoomShapes } from '../test-build/logic.js';
import { GRID_PITCH } from '../test-build/space-geometry.js';
@@ -61,6 +61,14 @@ test('wallCmToUnits goes through cell_cm like every other length', () => {
closeTo(wallCmToUnits(10, 5, GRID_PITCH), 2 * GRID_PITCH);
});
test('thin-on-screen fallback policy is shared by both renderers', () => {
assert.equal(wallBodyNeedsSolid(2, 1), true);
assert.equal(wallBodyNeedsSolid(WALL_HATCH_MIN_PX, 1), false);
assert.equal(wallBodyNeedsSolid(2, 2), false);
assert.equal(wallBodyNeedsSolid(Number.NaN, 1), false);
assert.equal(wallBodyNeedsSolid(2, 0), false);
});
// ------------------------------- degrade / rekey ----------------------------
test('degradeWalls drops a key with no matching room edge', () => {