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
This commit is contained in:
@@ -94,8 +94,10 @@
|
||||
|
||||
let selectedRoom = null;
|
||||
|
||||
renderer.loadHouse('../data/sample-house.json').then(house => {
|
||||
renderer.loadHouse('../data/sample-house.json').then(async (house) => {
|
||||
document.getElementById('house-name').textContent = house.name;
|
||||
await renderer.loadCatalog('../data/furniture-catalog.json');
|
||||
await renderer.loadDesign('../designs/sample-house-design.json');
|
||||
buildFloorButtons();
|
||||
buildRoomList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user