Feat: Interactive doors with physical wall cutouts

- Implemented door selection and interaction model (walk-to + click).
- Added modal for opening doors.
- Refactored wall rendering to create physical holes (CSG-like wall segments).
- Aligned door meshes to perfectly fit wall cutouts.
- Managed door visibility states to prevent Z-fighting on open doors.
This commit is contained in:
2025-12-23 13:50:05 +01:00
parent 3c599093cf
commit 0e5b885236
4 changed files with 515 additions and 60 deletions

View File

@@ -121,4 +121,66 @@ canvas {
#compass-w {
grid-column: 1;
grid-row: 2;
}
}
/* Modal Styles */
#door-modal {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
pointer-events: auto;
}
#door-modal.hidden {
display: none;
}
.modal-content {
background: #2a2a2a;
padding: 20px;
border: 2px solid #555;
border-radius: 8px;
text-align: center;
color: #fff;
box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.modal-content p {
margin-bottom: 20px;
font-size: 1.2rem;
}
.modal-content button {
padding: 8px 20px;
margin: 0 10px;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
font-size: 1rem;
}
#btn-open-yes {
background: #4CAF50;
color: white;
}
#btn-open-yes:hover {
background: #45a049;
}
#btn-open-no {
background: #f44336;
color: white;
}
#btn-open-no:hover {
background: #d32f2f;
}