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
Author
|
Post-review fixes in 735c12c:
Verified: targeted 19 tests pass, tsgo clean in core+editor, full suite 7,993 — only the pre-existing unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.