Aggiunta della schermata iniziale

This commit is contained in:
Simone
2026-03-10 09:55:46 +01:00
parent fcd3d1a7e5
commit 638b50efb2
5 changed files with 170 additions and 9 deletions
+5 -1
View File
@@ -24,11 +24,15 @@ function lock() {
document.getElementById('start').style.display = 'none';
document.getElementById('punti').style.display = 'block';
document.getElementById('tempo').style.display = 'block';
document.getElementById('crosshair').style.display = 'block';
}
function unlock() {
document.getElementById('start').style.display = 'flex';
const startDiv = document.getElementById('start');
startDiv.style.display = 'flex'; // Forza il layout Flexbox
// Nascondi l'HUD
document.getElementById('punti').style.display = 'none';
document.getElementById('tempo').style.display = 'none';
document.getElementById('crosshair').style.display = 'none';
}
const controls = new PointerLockControls(camera, document.body);
document.getElementById('start').addEventListener('click', () => controls.lock());