|
|
|
|
@ -11,6 +11,7 @@ function MainAirspaceTransition() {
|
|
|
|
|
const lineRef = useRef([]); |
|
|
|
|
const dotRef = useRef(null); |
|
|
|
|
const uamImageRef = useRef(null); // ← 추가 |
|
|
|
|
const isMobile = window.innerWidth <= 768; |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
const ctx = gsap.context(() => { |
|
|
|
|
@ -19,7 +20,12 @@ function MainAirspaceTransition() {
|
|
|
|
|
gsap.set(dotRef.current, { x: -320, opacity: 0, scale: 1 }); |
|
|
|
|
gsap.set(".airspace-uam-content", { opacity: 0, y: 36 }); |
|
|
|
|
gsap.set(uamImageRef.current, { opacity: 0 }); // ← 추가 |
|
|
|
|
|
|
|
|
|
// dot 초기 x 이동거리 |
|
|
|
|
gsap.set(dotRef.current, { |
|
|
|
|
x: isMobile ? -160 : -320, |
|
|
|
|
opacity: 0, |
|
|
|
|
scale: 1, |
|
|
|
|
}); |
|
|
|
|
const tl = gsap.timeline({ |
|
|
|
|
scrollTrigger: { |
|
|
|
|
trigger: sectionRef.current, |
|
|
|
|
@ -72,11 +78,10 @@ function MainAirspaceTransition() {
|
|
|
|
|
tl.to(dotRef.current, { |
|
|
|
|
x: 0, |
|
|
|
|
y: 0, |
|
|
|
|
scale: 52, |
|
|
|
|
scale: isMobile ? 42 : 52, |
|
|
|
|
duration: 1.2, |
|
|
|
|
ease: "power2.inOut", |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// airspace-uam-content + UAM 이미지 동시 등장 ← 수정 |
|
|
|
|
tl.to( |
|
|
|
|
[".airspace-uam-content", uamImageRef.current], |
|
|
|
|
@ -102,7 +107,11 @@ function MainAirspaceTransition() {
|
|
|
|
|
|
|
|
|
|
<div className="airspace-panel airspace-panel--uam" ref={rightRef}> |
|
|
|
|
<p>UAM SYSTEM</p> |
|
|
|
|
<h2>도심 항공 네트워크로</h2> |
|
|
|
|
<h2> |
|
|
|
|
도심 항공 |
|
|
|
|
<span className="airspace-mobile-br"> </span> |
|
|
|
|
네트워크로 |
|
|
|
|
</h2> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className="airspace-lines"> |
|
|
|
|
|