Spaces:
Running
Running
Download script.js from jacodejong/pixelcraft-studio: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/spaces/jacodejong/pixelcraft-studio/resolve/main/script.js
- Command line
-
hf download hf://spaces/jacodejong/pixelcraft-studio/script.js
-
curl -L -o script.js https://huggingface.co/spaces/jacodejong/pixelcraft-studio/resolve/main/script.js
537 Bytes
| // Intersection Observer for scroll animations | |
| const observerOptions = { | |
| threshold: 0.1 | |
| }; | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('animate-fade-in'); | |
| observer.unobserve(entry.target); | |
| } | |
| }); | |
| }, observerOptions); | |
| document.querySelectorAll('.animate-on-scroll').forEach(element => { | |
| observer.observe(element); | |
| }); | |
| }); |