Adds HouseEditor panel to the right sidebar with:
- Edit house name and description
- Adjust building footprint dimensions
- Add/remove floors with ceiling height control
- Add/remove rooms with name, type, and dimensions
- Edit selected room: name, type, dimensions, position, flooring
- Save house as JSON template
- Create new empty house from scratch
- Create data/ikea-catalog.json with 41 curated IKEA items across 23 series
(KALLAX, BILLY, MALM, PAX, HEMNES, LACK, etc.) with verified dimensions
- Add source tabs (All/Standard/IKEA) to catalog panel for filtering
- Add IKEA series filter bar when viewing IKEA items
- Add IKEA badge and series label on item cards
- Add mergeCatalog() to renderer for loading additional catalog files
- Add scripts/import-ikea-hf.js for importing from HuggingFace dataset
Adds a "Create Custom Furniture" button at the bottom of the catalog
sidebar that expands into a form with fields for name, dimensions
(W/D/H in meters), color picker, and category selector. Submitting
creates a simple box-geometry catalog item and adds it to the
in-memory catalog for immediate placement into rooms.
- ExportManager with JSON export (toJSON + timestamp), import with
file picker and validation, and high-res PNG screenshot capture
- Save/Load/Screenshot buttons in sidebar
- Ctrl+S keyboard shortcut for quick save
- Design load event updates info bar
- 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
Lightweight state management for furniture editing. All mutations go
through named methods that snapshot state for undo, then notify
listeners. Supports move, rotate, add, remove, full design load,
and serialization via toJSON().
- 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
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
- 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
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).