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:
3 files changed
+11
-2
No files matched your search
@@ -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);
|
||||
Reference in new issue
Block a user