AI just randomly deleted my code
All checks were successful
pedestrian-simulator / build (push) Successful in 1m2s
All checks were successful
pedestrian-simulator / build (push) Successful in 1m2s
This commit is contained in:
@@ -1482,6 +1482,30 @@ function startCameraAnimation() {
|
|||||||
idleAnimationId = requestAnimationFrame(animate);
|
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
|
// User Profile Logic
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|||||||
Reference in New Issue
Block a user