1/* svg animation */ 2// html 3// <div class="svg-loader" data-src="./img/main_copy.svg"></div> 4 5// å¤é¨SVGãã¡ã¤ã«ãèªã¿è¾¼ãã§ã¤ã³ã©ã¤ã³å±éãã颿° 6// async function loadSVG() { 7// const containers = document.querySelectorAll(".svg-loader"); 8 9// if (containers.length === 0) { 10// startTitleObserver(); 11// return; 12// } 13 14// // awaitã使ãããã«ãé常ã®forEachã§ã¯ãªã for...of ã«ã¼ãã使ãã¾ã 15// for (const container of containers) { 16// const svgUrl = container.getAttribute("data-src"); 17// if (!svgUrl) continue; // URLã空ãªãã¹ããã 18 19// try { 20// const response = await fetch(svgUrl); 21// if (!response.ok) { 22// throw new Error(`ãã¼ã¿ã®èªã¿è¾¼ã¿ã«å¤±æãã¾ãã: ${response.status}`); 23// } 24 25// const svgText = await response.text(); 26 27// container.innerHTML = svgText; 28 29// container.querySelectorAll(".draw-line").forEach((path) => { 30// const length = path.getTotalLength(); 31// const buffer = 0; 32// path.style.strokeDasharray = length + buffer; 33// path.style.strokeDashoffset = length + buffer; 34// }); 35// } catch (error) { 36// console.error(error); 37// } 38// } 39// startTitleObserver(); 40// } 41 42// // æ¢åã®IntersectionObserverãã¸ãã¯ï¼é¢æ°ã¨ãã¦ã«ãã»ã«åï¼ 43// function startTitleObserver() { 44// const options = { 45// root: null, 46// rootMargin: "0px", 47// threshold: 0.2, 48// }; 49 50// const scrollAnimationObserver = new IntersectionObserver((entries, obs) => {
51// entries.forEach((entry) => { 52// if (entry.isIntersecting) { 53// // ã«ã¹ã¿ã ããããã£ã®ä»ä¸ 54// const lines = entry.target.querySelectorAll( 55// ".draw-line, .copy-text, .dot , .download", 56// ); 57// lines.forEach((line, index) => { 58// line.style.setProperty("--i", index + 5); 59// }); 60 61// // activeã¯ã©ã¹ã®ä»ä¸ 62// entry.target.classList.add("active"); 63 64// // RSKã¢ããªã«ã¤ãã¦ã®ãã¤ãã¦ãã®è¡¨ç¤º 65// const animeLastEl = document.querySelector(".animelast"); 66// if (animeLastEl) { 67// animeLastEl.addEventListener( 68// "animationend", 69// () => { 70// const aboutText = entry.target.querySelector(".about-text"); 71// if (aboutText) aboutText.classList.add("active"); 72// }, 73// { once: true }, 74// ); 75// } 76 77// obs.unobserve(entry.target); 78// } 79// }); 80// }, options); 81 82// const scrollElements = document.querySelectorAll("h1, .jp-title , section"); 83// scrollElements.forEach((el) => { 84// scrollAnimationObserver.observe(el); 85// const rect = el.getBoundingClientRect(); 86// if (rect.top < window.innerHeight) { 87// // ãã¼ã¸èªã¿è¾¼ã¿æã«ããã§ã«ç»é¢å ã«ããè¦ç´ ã«å¯¾ãã¦activeãä»ä¸ãã 88// el.classList.add("active"); 89// } 90// }); 91// } 92// // ç»é¢ã®èªã¿è¾¼ã¿å®äºæã«å®è¡ 93// document.addEventListener("DOMContentLoaded", loadSVG); 94/* /svg animation */ 95 96const options = { 97 root: null, 98 rootMargin: "0px", 99 threshold: 0.2, 100}; 101 102const scrollAnimationObserver = new IntersectionObserver((entries, obs) => { 103 entries.forEach((entry) => { 104 if (entry.isIntersecting) { 105 // activeã¯ã©ã¹ã®ä»ä¸ 106 entry.target.classList.add("active"); 107 obs.unobserve(entry.target); 108 } 109 }); 110}, options); 111 112const scrollElements = document.querySelectorAll("section"); 113 114scrollElements.forEach((el) => { 115 scrollAnimationObserver.observe(el);
116 const rect = el.getBoundingClientRect(); 117 if (rect.top < window.innerHeight) { 118 // ãã¼ã¸èªã¿è¾¼ã¿æã«ããã§ã«ç»é¢å ã«ããè¦ç´ ã«å¯¾ãã¦activeãä»ä¸ãã 119 el.classList.add("active"); 120 } 121}); 122 123//////////////////////////////// 124let resizeTimer; 125window.addEventListener("resize", () => { 126 document.body.classList.add("is-resizing"); 127 128 clearTimeout(resizeTimer); 129 resizeTimer = setTimeout(() => { 130 document.body.classList.remove("is-resizing"); 131 }, 200); 132});
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.