1 2gsap.registerPlugin(ScrollTrigger); 3 4/** 5 * â äºç´ãã¿ã³scrollæã«é表示ã«ãã 6 */ 7// ã¹ã¯ãã¼ã«ä¸ãã©ã°ã <html> ã«ä»ä¸ 8let showTimer; 9ScrollTrigger.addEventListener("scrollStart", () => { 10 document.documentElement.classList.add("is-scrolling"); 11 // é£ç¶ã¹ã¯ãã¼ã«ã«åãã¦ä¸æ¦ã¿ã¤ãã¼ã¯æ¶ã 12 if (showTimer) showTimer.kill(); 13}); 14 15// ã¹ã¯ãã¼ã«åæ¢å¾ã«å°ãé ããã¦å表示ï¼ä½æãè¯ãããï¼ 16ScrollTrigger.addEventListener("scrollEnd", () => { 17 // 200ms å¾ã«è¡¨ç¤ºï¼æ°å¤ã¯å¥½ã¿ã§ï¼ 18 showTimer = gsap.delayedCall(0.2, () => { 19 document.documentElement.classList.remove("is-scrolling"); 20 }); 21}); 22 23 24/** 25 * promo-text h2 strong â span ã®é ã«ï¼letterSpacing(0.15emâ0.03em) + fade 26 * ãµãã£ã¨ãçµç¤ã¾ã§æ®ãã¦ãæå¾ã»ã©æ¸é 27 */ 28(() => { 29 const h2 = document.querySelector(".promo-text h2"); 30 if (!h2) return; 31 32 const strong = h2.querySelector("strong"); 33 const span = h2.querySelector("span"); 34 if (!strong || !span) return; 35 36 // åæï¼ãµãã£ã¨ï¼åºãï¼èãï¼å°ãä¸ï¼å°ããã±ï¼ 37 gsap.set([strong, span], { 38 autoAlpha: 0, 39 letterSpacing: "0.05em", 40 filter: "blur(3px)" 41 }); 42 43 const tl = gsap.timeline({ 44 scrollTrigger: { 45 trigger: ".promo-text", 46 start: "top 75%", 47 toggleActions: "play none none reverse" 48 // once: true ã«ããããªãâãæ¶ã㦠once: true ã追å ã§ãOK 49 } 50 }); 51
52 // --- strongï¼å ï¼ --- 53 tl.to(strong, { 54 duration: 0.6, 55 autoAlpha: 0.75, 56 letterSpacing: "0.05em", 57 filter: "blur(3px)", 58 ease: "power2.out" 59 }) 60 .to(strong, { 61 duration: 1.05, 62 autoAlpha: 1, 63 letterSpacing: "0.03em", 64 filter: "blur(0px)", 65 ease: "expo.out" // çµç¤ã»ã©ãã£ãã 66 }, ">-0.10") 67 68 // --- spanï¼ç´å¾ï¼ --- 69 .to(span, { 70 duration: 0.6, 71 autoAlpha: 0.75, 72 letterSpacing: "0.05em", 73 filter: "blur(3px)", 74 ease: "power2.out" 75 }, ">-0.45") 76 .to(span, { 77 duration: 1.05, 78 autoAlpha: 1, 79 letterSpacing: "0.03em", 80 filter: "blur(0px)", 81 ease: "expo.out" 82 }, ">-0.10"); 83})(); 84/** 85 * â .viproom-contentsã®ã¢ãã¡ã¼ã·ã§ã³çºç« 86 */ 87gsap.fromTo(".viproom-contents", 88 { autoAlpha: 0, y: 20 }, 89 { 90 autoAlpha: 1, 91 y: 0, 92 duration: 2, 93 ease: "power3.out", 94 scrollTrigger: { 95 trigger: ".viproom-contents", 96 start: "top 80%", 97 end: "bottom 20%", 98 toggleActions: "play reverse play reverse", 99 // å ¥ãã¨ãã«åçãåºãã¨ãã«éåç 100 } 101 } 102); 103 104gsap.utils.toArray(".service-item").forEach(item => { 105 gsap.fromTo(item, 106 { autoAlpha: 0, y: 0 }, 107 { 108 autoAlpha: 1, 109 y: 0, 110 duration: 0.5, 111 ease: "power3.out", 112 scrollTrigger: { 113 trigger: item, 114 start: "top 80%", 115 end: "bottom 30%", 116 toggleActions: "play none none none", // ã¢ãã¡ã¼ã·ã§ã³ã¯ä¸æ¹åã ã 117 onLeave: () => gsap.to(item, { autoAlpha: 0, duration: 0 }), 118 onEnterBack: () => gsap.to(item, { autoAlpha: 1, duration: 0.5 }) 119 } 120 } 121 ); 122}); 123 124/** 125 * â .reasonãé çªã«çºç« 126 */ 127gsap.utils.toArray('.reason').forEach((el) => { 128 ScrollTrigger.create({ 129 trigger: el, 130 start: "top 75%", 131 onEnter: () => el.classList.add('visible'), 132 once: true // ä¸åº¦å¯è¦ã«ãªã£ãã以å¾ã¯çºç«ããªã 133 }); 134}); 135 136document.addEventListener("DOMContentLoaded", () => { 137 const wrap = document.querySelector(".page-title__position"); 138 if (!wrap) return; 139 140 // åå²å¯¾è±¡ï¼è±åããããªãããããªããã°å ¨ä½ 141 const target = wrap.querySelector(".page-title__en") || wrap; 142 143 // äºéã«åå²ããªã 144 if (target.dataset.splitted === "1") return; 145 target.dataset.splitted = "1"; 146 147 const text = (target.textContent || "").trimEnd(); 148 target.textContent = ""; 149 150 const delayStep = 45; // 1æåãã¨ã®é å»¶(ms) 151 152 [...text].forEach((ch, i) => { 153 const span = document.createElement("span"); 154 span.className = "char"; 155 span.textContent = ch === " " ? "\u00A0" : ch; // ã¹ãã¼ã¹ç¶æ 156 span.style.transitionDelay = `${i * delayStep}ms`; 157 target.appendChild(span); 158 }); 159 160 wrap.classList.add("is-ready"); 161 requestAnimationFrame(() => wrap.classList.add("is-in")); 162});
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.