Add FPS limit to animation loop

This commit is contained in:
2025-05-28 17:32:55 +02:00
parent 767b8c6611
commit 7933b29de0

View File

@@ -15,6 +15,9 @@ function isMobileDevice() {
const IS_MOBILE = isMobileDevice();
const LOW_PERFORMANCE = IS_MOBILE; // ... später aus FPS ableitbar
let targetFps = LOW_PERFORMANCE ? 24 : 60;
let lastAnim = 0;
const container = document.getElementById('viewer');
// ---- Basis Three.js Szene ----