mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
- settings.volumetric_view (General settings › Display, third switch) replaces the alpha entry, the header projection toggle and the phone-menu item; one rule for card, sidebar page and kiosk; editors stay Flat; backend accepts only a boolean, support package copies it. - Raised tiles in 2.5D View: no ring, rounded body min(0.275 D, 0.3 h), edge 0.1 D with the lab filters, ×1.12 size also in layout/collision, lift 0.075 D, one floor-shadow layer under all markers (theme × floor table), frames hugging tile and edge (Alert > Focus > Selected > Hover), forced colours without edge and shadow (src/iso-tiles.ts, styles/iso-tiles). - Soft sun wash instead of projected Flat wedges (src/iso-sun.ts): same gates and windows as sun_rays, length from elevation, parallelogram along the sun, tone and streaks by floor lightness, sill line. - Walls take the user's wall colour (top opaque, sides × .77/.68/.60); theme rules for walls/openings/labels removed; furniture uses the Flat stroke rule. - Smokes smoke_iso_tiles/iso_sun/iso_theme_walls/volumetric_setting, 16 new mutants, acceptance scenes STAGE6_ACCEPTANCE_SCENARIOS (golden with their Linux CI baselines), ACCEPTANCE.md side by side. Issue: #649 User-Visible: yes
42 lines
1.9 KiB
JavaScript
42 lines
1.9 KiB
JavaScript
/**
|
|
* Install one browser-side preload helper for demo harnesses that opt into Iso.
|
|
*
|
|
* Current builds keep the isometric renderer in a lazy, fingerprint-checked
|
|
* runtime. Older comparison bundles are monolithic and expose no preload
|
|
* method, so absence remains a compatible no-op. A current runtime, however,
|
|
* must load successfully and settle before a smoke inspects Iso DOM/geometry.
|
|
*/
|
|
export async function installHarnessIsoRuntimeHelper(page) {
|
|
await page.evaluate(() => {
|
|
window.__hpEnsureHarnessIsoRuntime = async (card = window.__card) => {
|
|
if (!card) throw new Error('isometric smoke has no card to preload');
|
|
const ensure = card._ensureIsoSceneRuntime;
|
|
if (typeof ensure !== 'function') return true;
|
|
if (!await ensure.call(card)) {
|
|
throw new Error('isometric smoke runtime did not load');
|
|
}
|
|
await card.updateComplete;
|
|
await new Promise((done) => requestAnimationFrame(() => requestAnimationFrame(done)));
|
|
return true;
|
|
};
|
|
/**
|
|
* #649: select Flat or 2.5D for geometry smokes. Current bundles read the
|
|
* installation-wide `settings.volumetric_view`; this assigns it exactly as a
|
|
* General settings save does (`_serverCfg = { ...cfg, settings }`, spaces
|
|
* untouched, so a smoke's local fixture edits survive). Bundles before
|
|
* #649 keep their per-device `_setProjection`.
|
|
*/
|
|
window.__hpHarnessProjection = async (card, projection) => {
|
|
if (typeof card._setProjection === 'function') card._setProjection(projection);
|
|
else {
|
|
const cfg = card._serverCfg;
|
|
card._serverCfg = { ...cfg, settings: { ...(cfg?.settings || {}), volumetric_view: projection === 'iso' } };
|
|
card.requestUpdate();
|
|
}
|
|
await card.updateComplete;
|
|
if (projection === 'iso') await window.__hpEnsureHarnessIsoRuntime(card);
|
|
await card.updateComplete;
|
|
};
|
|
});
|
|
}
|