Animationen außerhalb des Sichtbereichs pausieren, replaceState absichern

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kjd7UMh3HKyVziCgiZ9A2i
This commit is contained in:
Claude committed 2026-10-03 17:02:16 +00:00
1 parent 82dc9599cc
commit 88b02720d8
3 files changed
+11 -2

No files matched your search

+5
View File
@@ -115,7 +115,12 @@
inView = entries[0].isIntersecting;
if (inView) run();
}, { threshold: 0.35 }).observe(root);
// SVG-Animationen (Strömungen, Lüfter) nur laufen lassen, solange das Haus sichtbar ist
new IntersectionObserver(function (entries) {
root.classList.toggle('is-inview', entries[0].isIntersecting);
}, { threshold: 0 }).observe(root);
}
if (!('IntersectionObserver' in w)) root.classList.add('is-inview');
activate(order[0], false);
})(window, document);