Skip to content

feat(viewer): per-level base elevation parameter#312

Open
mvanhorn wants to merge 1 commit into
pascalorg:mainfrom
mvanhorn:feat/209-level-floor-height-parameter
Open

feat(viewer): per-level base elevation parameter#312
mvanhorn wants to merge 1 commit into
pascalorg:mainfrom
mvanhorn:feat/209-level-floor-height-parameter

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a per-level baseElevation parameter so each level can offset its computed stack position upward by a user-specified amount. The site panel surfaces a Base elevation MetricControl on each level (m, 2dp, 0.05 step) and the viewer's level system threads the offset through getLevelTargetY / getNextLevelCumulativeY helpers.

How to test

  1. Open the site panel.
  2. Expand any level.
  3. Set the Base elevation field to a non-zero meter value.
  4. Confirm the level (and all levels above) move up by that amount in 3D.
  5. Switch to exploded mode; confirm EXPLODED_GAP still adds on top of the cumulative offset.
  6. Run the test suite: bun test packages/core/test/level.test.ts packages/viewer/test/level-utils.test.ts.

Notes

check-types flags a pre-existing TypeScript error on the base branch unrelated to this change (packages/editor/src/store/use-editor.tsx:249childId implicit any). The error is present on origin/main before this branch is applied, so the failure isn't introduced by this PR. Happy to fix it in a sibling PR if useful.

Checklist

  • Ran bun dev and exercised the change locally
  • Ran bun check (biome clean)
  • bun check-types fails on pre-existing error (see Notes)
  • Tests added for the schema + utility paths
  • Targets main

Closes #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Floor height parameter

1 participant