Files

34 lines
2.2 KiB
HTML

<template>
<style>
@font-face { font-family: 'Jua'; src: url('assets/fonts/Jua-Regular.ttf'); }
@font-face { font-family: 'Pretendard'; src: url('assets/fonts/PretendardVariable.woff2'); font-weight: 100 900; }
#root { position: absolute; inset: 0; overflow: hidden; background: #cfe3fb; color: #fff; }
#s1-world { position: absolute; inset: 0; }
#s1-cam { position: absolute; inset: 0; transform-origin: 50% 45%; }
#s1-bg { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; object-fit: cover; }
#s1-fog { position: absolute; left: -120px; top: 1450px; width: 620px; filter: blur(6px); opacity: 0.9; }
#s1-title { position: absolute; left: 90px; top: 300px; width: 900px; font: 400 120px/1.18 'Jua', sans-serif; letter-spacing: -2px; color: #28304a; text-shadow: 0 0 22px rgba(255, 255, 255, 0.85), 0 4px 14px rgba(255, 255, 255, 0.6); word-break: keep-all; }
#s1-title .w { display: inline-block; margin-right: 0.22em; }
</style>
<div id="root" data-composition-id="s1" data-width="1080" data-height="1920">
<div id="s1-world" class="clip" data-start="0" data-duration="2.5">
<div id="s1-cam">
<img id="s1-bg" src="assets/bg/sky.webp" alt="" />
<h1 id="s1-title"><span class="w">오늘</span><span class="w">뭐</span><span class="w">하기</span><br /><span class="w">좋은</span><span class="w">날이지?</span></h1>
<img id="s1-fog" src="assets/icons/cloud.png" alt="" />
</div>
</div>
</div>
<script>
const tl = gsap.timeline({ paused: true });
// 카메라: 천천히 밀어 들어감 (배경 1.0, 해 1.6배, 앞 구름 2.2배로 깊이)
tl.fromTo("#s1-cam", { scale: 1.14, y: 0, filter: "blur(0px)" }, { scale: 1.08, duration: 2.25, ease: "power2.inOut" }, 0);
tl.fromTo("#s1-fog", { x: 40 }, { x: -70, duration: 2.5, ease: "none" }, 0);
// 제목: 단어마다 블러로 맺힘, 착지 뒤엔 멈춤
tl.fromTo("#s1-title .w", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.13, ease: "power4.out", stagger: 0.07 }, 0.05);
// 휩 아웃: 다음 세상으로
tl.to("#s1-cam", { y: -420, filter: "blur(16px)", duration: 0.25, ease: "power3.in" }, 2.25);
window.__timelines["s1"] = tl;
</script>
</template>