mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-07 06:59:46 +00:00
feat(iso): the 2.5D floor is the Flat plane, one wall-top rise for tiles (#713)
- Vertical oblique projection: the floor matrix is the identity and a height rises straight up by z·sin 20°, so the on-screen wall height is unchanged and the cos 20° foreshortening of the plan, decor and anchors is gone. - Device tiles and lock badges stand on the wall-top plane with one common shift; the #651 placement search no longer runs in the live scene (its removal is #714). Room names keep their Flat floor point. - The 2.5D fit no longer reserves the 48 CSS px nudge budget. - Switching projection keeps the camera when the previous projection was on screen: saving the setting, entering an editor from 2.5D and adopting a warm memo from the other projection re-read only the scalar zoom. A cold 2.5D start still opens the 2.5D home. - Opening faces are ordered along the oblique projector (s·y + z). Witness: demo/smoke_iso_flat_parity.mjs (AC2–AC5, AC11) is red on the old code. Issue: #713 User-Visible: yes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
+3
-4
@@ -64,7 +64,6 @@ interface LiveEditorHost {
|
||||
/** #521: guides for the gesture in flight; `nothing` while the runtime loads. */
|
||||
_renderAlignGuides: () => unknown;
|
||||
_livePos: (device: { id: string }) => { x: number; y: number };
|
||||
_scenePoint: (point: number[]) => number[];
|
||||
_renderProjection: string;
|
||||
_spaceModel: () => SpaceModel | null;
|
||||
_spaceWalls: WallEntry[];
|
||||
@@ -309,11 +308,11 @@ const paintDevice = (host: LiveEditorHost, root: ParentNode): void => {
|
||||
const element = [...root.querySelectorAll<HTMLElement>('[data-hp="device"]')]
|
||||
.find((candidate) => candidate.dataset.id === drag.id);
|
||||
if (!device || !element) return;
|
||||
// #713: the 2.5D floor is the Flat plane, and editors are Flat anyway.
|
||||
const position = host._livePos(device);
|
||||
const point = host._scenePoint([position.x, position.y]);
|
||||
const view = host._viewOr(host._baseVb());
|
||||
element.style.left = `${((point[0] - view.x) / view.w) * 100}%`;
|
||||
element.style.top = `${((point[1] - view.y) / view.h) * 100}%`;
|
||||
element.style.left = `${((position.x - view.x) / view.w) * 100}%`;
|
||||
element.style.top = `${((position.y - view.y) / view.h) * 100}%`;
|
||||
};
|
||||
|
||||
const makeDecorShapeTransparent = (
|
||||
|
||||
Reference in New Issue
Block a user