1let vantaEffect = null; 2 3function initBackground() { 4 if (!vantaEffect) { 5 vantaEffect = VANTA.TRUNK({ 6 el: "#vanta-background", 7 mouseControls: true, 8 touchControls: true, 9 gyroControls: false, 10 minHeight: window.innerHeight, 11 minWidth: window.innerWidth, 12 scale: 1.00, 13 scaleMobile: 1.00, 14 backgroundColor: 0x2c3641 15 }); 16 } 17} 18 19function setThemeColors(bgColor, lineColor) { 20 if (!vantaEffect) return; 21 vantaEffect.setOptions({ backgroundColor: bgColor, color: lineColor }); 22 vantaEffect.restart(); 23} 24 25function setDayColors() { 26 setThemeColors(0xd6c4b0, 0x8B6B4A); 27} 28 29function setNightColors() { 30 setThemeColors(0x2c3641, 0x983E3F); 31} 32 33document.getElementById("indexModeToggle").addEventListener("click", function () { 34 if (document.body.classList.contains("night-mode")) { 35 setDayColors(); 36 37 gsap.to(".fade-button", { 38 opacity: 0, 39 y: -20, 40 duration: 0.5, 41 ease: "power2.inOut", 42 onComplete: function () { 43 gsap.set(".fade-button", { opacity: 1, y: 0 }); 44 gsap.fromTo(".fade-button", 45 { opacity: 0, y: 15 }, 46 { opacity: 1, y: 0, duration: 0.8, ease: "power2.out", stagger: 0.1 } 47 ); 48 } 49 }); 50 51 if (isSwinging) { 52 isShakingQueued = true; 53 } else { 54 startLampShake(); 55 } 56 } else { 57 setNightColors(); 58 randomizeNeonEffect(); 59 60 gsap.fromTo(".fade-button", 61 { opacity: 0, y: -20 }, 62 { opacity: 1, y: 0, duration: 0.8, ease: "power2.out", stagger: 0.1 } 63 ); 64 } 65 66 document.body.classList.toggle("day-mode"); 67 document.body.classList.toggle("night-mode"); 68}); 69 70const headerEl = document.getElementById("header"); 71let touchStartY = 0; 72 73if (headerEl) { 74 headerEl.addEventListener("touchstart", function (e) { 75 touchStartY = e.touches[0].clientY; 76 }, { passive: true }); 77 78 headerEl.addEventListener("touchmove", function (e) { 79 const movedY = e.touches[0].clientY - touchStartY; 80 if (movedY > 0 && movedY < 80) { 81 gsap.to(headerEl, { y: movedY * 0.5, opacity: 1 - movedY / 150, ease: "power1.out" }); 82 } 83 }); 84 85 headerEl.addEventListener("touchend", function () { 86 gsap.to(headerEl, { y: 0, opacity: 1, duration: 0.3, ease: "elastic.out(1, 0.5)" }); 87 }); 88}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.