Commit Graph

6 Commits

Author SHA1 Message Date
m
e10abf4cf3 Add preserveDrawingBuffer for reliable PNG screenshot export
Without this flag, toDataURL() on the WebGL canvas can return blank
in some browsers because the drawing buffer gets cleared.
2026-02-07 12:26:30 +01:00
m
d0d9deb03a Add InteractionManager with mode system, selection outline, keyboard shortcuts
- Mode system: view | select | move | rotate | place
- Click furniture to select with cyan wireframe outline
- Keyboard: R/Shift+R rotate, Delete remove, Escape deselect,
  Ctrl+Z undo, Ctrl+Shift+Z/Ctrl+Y redo
- Listens to DesignState changes to sync scene on undo/redo
- Wired into index.html with DesignState integration
- Added furnitureIndex to mesh userData for state lookups
2026-02-07 12:22:06 +01:00
m
35300aa57a Add furniture click events, OrbitControls toggle, and floor change event
- Export COLORS for external module access (themes)
- Extend _onClick to detect furniture clicks before room clicks,
  dispatching 'furnitureclick' with catalog/room/mesh details
- Add setControlsEnabled(enabled) to toggle OrbitControls
- Dispatch 'floorchange' event from showFloor()
- Wire up furnitureclick in index.html to show item info
2026-02-07 12:19:19 +01:00
m
bf4eee8595 Improve 3D renderer: shadow camera, caching, error handling, labels
Renderer improvements:
- Configure shadow camera frustum to cover full house (was default -5..5)
- Add geometry and material caching to reduce GPU allocations
- Add proper disposal of Three.js objects on floor switch (fix memory leak)
- Add error handling for fetch failures with custom event dispatch
- Add room labels as sprites floating in each room
- Support wall-mounted furniture Y positioning via position.y
- Use cached highlight materials instead of mutating shared materials
2026-02-07 12:02:04 +01:00
m
4d76d9525f Add furniture placement to 3D renderer
- loadCatalog() and loadDesign() methods on HouseRenderer
- Builds Three.js meshes from catalog part definitions (box/cylinder)
- Places furniture in room-local coordinates with rotation
- Furniture clears and re-renders on floor switch
- index.html loads catalog and design after house data
2026-02-07 11:42:58 +01:00
m
0d3a4dddf5 Add Three.js 3D room renderer with interactive viewer
renderer.js: HouseRenderer class that loads house JSON and renders
rooms as 3D geometry - walls with door/window cutouts, floors with
material colors, translucent ceilings, orbit camera controls, room
click selection and highlighting.

index.html: Viewer page with sidebar showing floor switcher and
room list with areas. Click rooms in 3D or sidebar to focus camera.
Uses Three.js via CDN importmap (no build step needed).
2026-02-07 11:32:08 +01:00