Skip to content

Polish three-floor-townhouse example: single-floor plan with color controls#63

Merged
aka-blackboots merged 1 commit into
mainfrom
polish-townhouse-example
Apr 30, 2026
Merged

Polish three-floor-townhouse example: single-floor plan with color controls#63
aka-blackboots merged 1 commit into
mainfrom
polish-townhouse-example

Conversation

@aka-blackboots
Copy link
Copy Markdown
Contributor

Summary

  • Rewrites examples/src/three-floor-townhouse.html as one detailed 18 × 14 m single-floor home (foyer, living, dining, garage, kitchen, mudroom, master suite + ensuite + walk-in, two more bedrooms, shared bath, laundry) — better suited to showcasing OpenPlans as a floorplan tool than the cramped multi-floor original.
  • Adds a true profile / model toggle: profileView / modelView flags flip on every wall + door + window, alongside CameraMode, scene background, body class, and slab visibility — so the two modes look genuinely distinct, not just differently projected.
  • Adds drafting overlays in plan mode: room labels projected from world space each frame, a live scale bar computed from the camera projection, and a north arrow.
  • Adds a color controls panel: 6 native <input type="color"> pickers (Ext Wall, Int Wall, Door Panel, Door Frame, Glass, Win Frame) plus 4 preset palettes (Warm Paper, Blueprint, Mono, Dusk). Door / window pickers update live on input; wall pickers commit on change and trigger wall.setOPGeometry() to rebuild — works around the empty SingleWall.setOPMaterial stub without touching the library.
  • Wall fills are realistic light tones in every preset; the dark drafted look in plan mode comes from wall.outline strokes rather than dark fills.

Notes for reviewers

  • Only examples/src/three-floor-townhouse.html is changed.
  • The SingleWall.setOPMaterial stub is a known library limitation — turning it into a real implementation would let wall pickers update live like doors / windows do. Out of scope here.
  • The pre-existing local edit to src/packages/openplans-three/src/three.ts (logarithmicDepthBuffer: true → false) was present before this branch and is not included.

Test plan

  • npm run dev, open /three-floor-townhouse.html.
  • Plan view: walls render with light fills + dark outlines; room labels track pan / zoom; scale bar updates and snaps to nice values; north arrow visible.
  • Model view: 3D walls with cut openings, doors and windows visible, slab below.
  • Toggle plan ↔ model several times — no leaked overlays, no console errors, reset-view re-fits correctly.
  • Drag door panel / glass pickers → live update across the scene.
  • Drag exterior wall picker → no change while dragging; release → walls rebuild with new color and openings stay cut.
  • Cycle through all four presets → all six pickers + scene update together.

🤖 Generated with Claude Code

…ls, drafting overlays

Rewrite the example as one detailed 18 x 14 m home (foyer, living, dining,
garage, kitchen, mudroom, master suite, two more bedrooms, bath, laundry)
to better showcase OpenPlans as a floorplan tool.

- True profile/model toggle: per-element profileView/modelView flags plus
  CameraMode plus background plus body class plus slab visibility.
- Drafting overlays in plan mode: room labels projected from world space
  each frame, live scale bar (computed from camera projection), north arrow.
- Color controls panel: 6 native pickers (ext wall, int wall, door panel,
  door frame, glass, window frame) plus 4 preset palettes (Warm Paper,
  Blueprint, Mono, Dusk). Openings update live; walls commit on release
  via setOPGeometry rebuild (works around the empty SingleWall
  setOPMaterial stub).
- Realistic light wall tones in every preset; the dark drafted look in
  plan mode comes from wall.outline strokes rather than dark fills.
@aka-blackboots aka-blackboots merged commit 8581ce3 into main Apr 30, 2026
@aka-blackboots aka-blackboots deleted the polish-townhouse-example branch April 30, 2026 10:27
@aka-blackboots aka-blackboots restored the polish-townhouse-example branch May 1, 2026 22:39
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.

1 participant