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
This commit is contained in:
m
2026-02-07 12:02:04 +01:00
parent a2b5211d30
commit bf4eee8595
2 changed files with 177 additions and 54 deletions

View File

@@ -100,6 +100,9 @@
await renderer.loadDesign('../designs/sample-house-design.json');
buildFloorButtons();
buildRoomList();
}).catch(err => {
document.getElementById('house-name').textContent = 'Error loading data';
document.getElementById('info').textContent = err.message;
});
function buildFloorButtons() {