Repository navigation
Conversation
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 503f8013-bdd1-49fe-811f-84f275d94ab3 |
- HIGH-1: apply site north heading to FloorplanPanel live compass and align-to-north - QUICKWIN-1: canonicalize SiteNode.northDirectionDeg to [0, 360) in schema - QUICKWIN-2: add boundary and multi-turn tests for floorplanRotationForNorthUp
|
Post-review fixes in 735c12c:
Verified: targeted 19 tests pass, tsgo clean in core+editor, full suite 7,993 — only the pre-existing unrelated |
|
(merged upstream/main @ 5ce7211 — hosting/duplicate fixes in; no conflicts; CI green pre-merge) |
|
Thanks @dkbbdev! Could you add a screenshot or a short recording of the compass with a non-zero |
Closes #362
Approach
SiteNode.northDirectionDeg: finite degree heading, clockwise from world −Z toward +X; default0preserves today's convention (as documented intwo-bedroom.ts, +Z points south). Field documented on the schema.0; JSON + scene-store round trips preserve custom headings.ViewerStage(bottom-left,z-30) — now reflects the site heading, camera rotation, and align-to-north action.Files
packages/core/src/schema/nodes/site.ts(+ test),schema/index.ts,store/use-scene.ts(+ north-direction test),host-children.test.tspackages/editor/src/components/viewer/floorplan-preview.tsx,floorplan-preview-navigation.ts(+ test)Verification
bun test: 2,848 passed / 127 filesbun test: 1,037 passed / 139 filestsgo --noEmitclean in both packages; biome cleanNotes / follow-ups
Note
Medium Risk
Introduces a persisted site field and changes floorplan compass/north-up behavior, but defaults and load migration preserve legacy scenes.
Overview
Adds
northDirectionDegon site nodes so each scene can store where north points (degrees clockwise from world −Z toward +X). Default 0 keeps the existing convention (+Z = south); values are validated, canonicalized to [0, 360), and legacy loads get the default or 0 for non-finite values viamigrateNodes.The floorplan compass and align-to-north paths now offset needle rotation and north-up alignment by the site heading (
compassRotationFromFloorplanRotation,floorplanRotationForNorthUp) in the editor floorplan panel and preview, without rotating plan geometry.DEFAULT_NORTH_DIRECTION_DEGis exported from core for consumers.Tests cover schema parsing, scene load persistence, host-children baseline expectations, and navigation math (including negative/multi-turn headings).
Reviewed by Cursor Bugbot for commit 735c12c. Bugbot is set up for automated code reviews on this repo. Configure here.