From cb1304bc6d9b4bbd0839feede077c4f7d97eccaa Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Tue, 13 Jan 2026 13:19:05 -0700 Subject: [PATCH] AI just randomly deleted my code --- frontend/app.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/frontend/app.js b/frontend/app.js index 9ab857b..54b510e 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -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 // ========================================