Aggiunta della schermata iniziale

This commit is contained in:
Simone committed 2026-03-10 09:55:46 +01:00
1 parent fcd3d1a7e5
commit 638b50efb2
5 files changed
+170 -9

No files matched your search

+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());