fix(led): сохранить прямоугольник через проёмы (#787)

Issue: #787
User-Visible: yes
This commit is contained in:
Matysh
2026-10-03 17:17:50 +03:00
parent fab28af26f
commit 35ef231191
7 changed files with 152 additions and 12 deletions
+5
View File
@@ -2,6 +2,11 @@
## Unreleased
- Fixed rectangular LED strips on wall faces: corners remain exact miters and
doors, gates and passages no longer pull the stripe or its Glow emitters
back to the wall axis, causing steps and bends
([#787](https://github.com/Matysh/houseplan-card/issues/787)).
- Fixed LED-strip Glow end caps so free ends stay smoothly round at high zoom
instead of exposing polygon facets depending on nearby walls
([#786](https://github.com/Matysh/houseplan-card/issues/786)).
+5
View File
@@ -8,6 +8,11 @@
## Не выпущено
- Исправлены прямоугольные LED-ленты на гранях стен: углы теперь остаются
точными стыками, а двери, ворота и проходы больше не возвращают ленту и
излучатели Glow на ось стены, создавая ступеньки и изгибы
([#787](https://github.com/Matysh/houseplan-card/issues/787)).
- Исправлены торцы Glow у LED-лент: свободные концы остаются
плавно круглыми при сильном приближении и больше не показывают грани
многоугольника в зависимости от соседних стен
+8
View File
@@ -437,6 +437,14 @@ only the geometry differs:
opening; Dashed zero walls are transparent. Emitters on a thick face sit
`epsilonGeom` (0.001 cm) outward into free floor; a part buried in a body
emits nothing; a strip entirely inside a wall has no field.
- **Wall openings and corners.** A door, gate or passage remains optically
open, but an internal gap between two collinear pieces of the same wall face
inherits their free-side normal. The visible stripe and its emitters
therefore stay on one straight line through the opening. At a genuine turn,
safely intersecting shifted sides use that bounded intersection as their
single miter; unsafe acute angles retain the short connector. A stored
four-corner loop consequently stays a four-corner rectangle without steps
at openings or diagonal corner inserts (#787).
- **Core.** With effective Glow (space `glow_enabled` + room `glow`) the core
stays white and the colour is the field; without Glow the core takes the
source colour and there is no field. Off: white core, no field.
+1 -1
View File
@@ -42,7 +42,7 @@ behaviours, not of positions.
| Off: white core, no field, both themes | stripe state `off` | smoke `smoke_led_strip_glow.mjs`, `led-strip-off-light` |
| On with Glow: white core + coloured field; without Glow: core in the source colour, no field | `ledStripView` + `resolveGlowAppearance` | smoke `smoke_led_strip_glow.mjs` |
| Glow is the space/room switch, independent of `fill_mode` | `glowFor(room)` | `lighting-led-strip-glow-dark` uses `fill_mode: none` |
| Per-piece offset: t/2 on a thick face into free floor, 0 on free floor and zero walls; continuous transition | `visibleStripPath` | unit `test/led-strip-geometry.test.mjs` (AC8) |
| Per-piece offset: t/2 on a thick face into free floor, 0 on free floor and zero walls; continuous transition; a collinear door gap keeps the flanking face normal and shifted sides meet at one bounded miter | `stripPieces` + `visibleStripPath` | unit `test/led-strip-geometry.test.mjs` (AC8, #787); golden `led-strip-rectangle-door-zoom-light` |
| Field 30 cm by default, own `glow_radius_cm` wins; round free ends; no seams, bands, missing free runs or doubled brightness at corners/closure | `ledFrame`, one continuous path through exact circular free fans and obstacle-clipped visibility fans in `led-strip-field` | unit `test/led-strip-runtime.test.mjs`; golden `led-strip-long-zigzag-glow-light`, `led-strip-endcaps-zoom-light`; reference pair |
| Shared `glowAlpha` / `GLOW_FALLOFF` / `GLOW_FADE_MS` | field bands from `falloffAt` | unit `test/led-strip-runtime.test.mjs` |
| Field under icons, badges and labels; icons not tinted | glow layer below the device layer | reference pair (designer tinting deliberately not reproduced) |