AI just randomly deleted my code
All checks were successful
pedestrian-simulator / build (push) Successful in 1m2s

This commit is contained in:
2026-01-13 13:19:05 -07:00
parent 72b94597ca
commit cb1304bc6d

View File

@@ -1482,6 +1482,30 @@ function startCameraAnimation() {
idleAnimationId = requestAnimationFrame(animate);
}
function stopAnimation() {
if (idleAnimationId) {
cancelAnimationFrame(idleAnimationId);
idleAnimationId = null;
}
currentPathIndex = 0;
cameraTime = 0; // Reset camera animation
lastFrameTime = null; // Reset frame time tracking
const animProgress = document.getElementById('animProgress');
if (animProgress) {
animProgress.textContent = '0%';
}
}
function cycleViewMode() {
// Don't cycle if no route is set yet
if (!panorama || !masterPath || masterPath.length === 0) {
console.log('Cannot cycle view mode: no route set');
return;
}
viewMode = (viewMode + 1) % 3;
updateViewMode();
}
// ========================================
// User Profile Logic
// ========================================