From 90a5b3f6e616d50fc1615f311ba3b4f1a72732f4 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 6 Sep 2026 14:36:42 +0300 Subject: [PATCH] =?UTF-8?q?test:=20W4=20#473=20=E2=80=94=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B0=D0=BA=D1=82=D0=BD=D0=B0=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0,=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B=20AABB-?= =?UTF-8?q?=D0=BE=D1=82=D1=81=D0=B5=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80?= =?UTF-8?q?=D0=B5=D1=88=D0=B0=D0=BB=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: #473 User-Visible: no --- test/iso-scene-render.test.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/iso-scene-render.test.mjs b/test/iso-scene-render.test.mjs index d6643e13..db1c89ba 100644 --- a/test/iso-scene-render.test.mjs +++ b/test/iso-scene-render.test.mjs @@ -806,7 +806,9 @@ test('#473 W4: AABB-отсечение учитывает зазор безоп // Плита, чьи границы не пересекают границы стены, но лежат внутри gap, // обязана считаться «у стены». Отсечение без зазора отбросило бы силуэт // до точного теста, и плита легла бы вплотную к стене. - const wall = { outer: buildIsoPlatePolygon([0, 50], [4, 60], ISO_WALL_HEIGHT) }; + // Стена — компактный силуэт: у длинной стены AABB в изометрии накрывает плиту + // при любом сдвиге вдоль оси, и отсечение не участвует в решении. + const wall = { outer: buildIsoPlatePolygon([0, 50], [2, 2], ISO_WALL_HEIGHT) }; const owner = { id: 'owner', outer: [[0, 0], [100, 0], [100, 100], [0, 100]], holes: [], safePoint: [50, 50] }; const placeAt = (x, safetyGapCssPx) => resolveIsoOverlayPlacement({ kind: 'device', floorAnchor: [x, 50], plateHalfSize: [2, 2], @@ -816,9 +818,9 @@ test('#473 W4: AABB-отсечение учитывает зазор безоп unitsPerPixel: 1, safetyGapCssPx, wallHeight: ISO_WALL_HEIGHT, visualOffset: 0, }); // без зазора плита на расстоянии 2 единиц от стены — не у стены - const noGap = placeAt(4 + 2 + 2, 0); + const noGap = placeAt(2 + 2 + 2, 0); assert.equal(noGap.nearWallBefore, false, 'контроль: без зазора не у стены'); // с зазором 4 — у стены, хотя AABB не пересекаются - const withGap = placeAt(4 + 2 + 2, 4); + const withGap = placeAt(2 + 2 + 2, 4); assert.equal(withGap.nearWallBefore, true, 'в пределах зазора — у стены'); });