docs: сказать, что компактная карточка не строит пулы света

Внешний пользователь завёл #370 как баг: в houseplan-space-card нет теней от
стен, хотя в houseplan-card они есть. Разбор показал, что кода это не касается —
ограничение намеренное и записано в src/space-render.ts:353 («the compact card
intentionally has no live radial pools»). visibilityPolygon из
src/light-visibility.ts импортируют ровно два файла, houseplan-card.ts и
houseplan-editor-runtime.ts; space-render.ts не импортирует его вовсе. Пулов нет,
а тень существует только как форма пула — затенять нечего.

Но претензия справедлива, просто адресована не туда. Единственная запись о
намеренности жила в комментарии исходника, которого пользователь видеть не может,
а руководство обещало обратное: «маркеры используют те же состояния, значения,
тревоги и эффекты, что полный план» — про свет ни слова. В LIGHT.md про
компактную карточку тоже не было ничего. Человек полез в код именно потому, что
документация молчала, и сам корректно предположил, что это может быть намеренно.

Теперь сказано в трёх местах: оба руководства и LIGHT.md, с причиной — пулы это
самая дорогая часть отрисовки, у неё свой перф-воркфлоу и бюджеты, и компактная
карточка платит за дешевизну именно ими.

Issue: #370
User-Visible: no
This commit is contained in:
Claude
2026-08-29 13:02:41 +03:00
parent 06fbfcbc90
commit 89950e9944
3 changed files with 32 additions and 0 deletions
+17
View File
@@ -246,6 +246,23 @@ The complete UI and runtime truth table lives in
- Golden: `lighting-opaque-glow-two-doorways-dark` and the other `lighting-*`
scenes, re-shot and approved 2026-08-11.
## Which surfaces render pools
Pools — and therefore wall shadows — exist on the **full plan only**:
`houseplan-card` and the geometry editors. `visibilityPolygon()`
(`src/light-visibility.ts`) is imported by those surfaces and by nothing else.
`houseplan-space-card` takes the static path (`renderSpaceStatic()` in
`src/space-render.ts`) and deliberately has no live radial pools; it shares the
room fills and the independent data/base projection with the full plan, so a lit
room is painted flat. Without a pool there is no shape to occlude, so the compact
card shows no wall shadows. This is a cost decision, not an omission: the pool
layer is the heaviest thing the product renders — it owns its own performance
workflow, budgets and a per-run smoke (`large-house-glow-overlay-v1`).
Reported from the field as a bug (#370), because the user guide promised that
markers share everything with the full plan and said nothing about light.
## Performance
The large cold geometry recalculation (20 rooms, 20 partitions, 14 columns,
+8
View File
@@ -761,6 +761,14 @@ text sizing. `cycle` enables automatic space changes; interaction pauses it for
hover, drag, more-info or actions. A footer button opens the full plan. Use it
for compact dashboard navigation, not for home control.
**Light is deliberately different here.** The compact card paints the flat fill
of a lit room and the data-mode fills, but it builds no radial light pools from
the lamps. Consequently it draws no wall shadows either: a shadow exists only as
the shape of a pool, and with no pools there is nothing to occlude. The full plan
computes the pools and how walls, openings and columns block them
(`docs/LIGHT.md`); that is the most expensive part of the render, and it is
exactly what the compact card trades away for being cheap.
```yaml
type: custom:houseplan-space-card
space: ground
+7
View File
@@ -1482,6 +1482,13 @@ House Plan скрывает только собственную шапку. Ша
план, но не открывают подсказки или more-info. Единственный интерактивный
элемент — нижняя кнопка перехода.
**Свет здесь другой, и это намеренно.** Компактная карточка рисует ровную
заливку освещённой комнаты и заливки data-режимов, но не строит радиальные пулы
света от ламп. Значит, на ней нет и теней от стен: тень существует только как
форма пула, и без пулов затенять нечего. Полный план считает пулы и перекрытие
светом стен, проёмов и колонн (`docs/LIGHT.md`) — это самая дорогая часть
отрисовки, и компактная карточка платит за свою дешевизну именно ею.
```yaml
type: custom:houseplan-space-card
space: ground_floor