41 lines
3.1 KiB
HTML
41 lines
3.1 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; }
|
|
#s4-world { position: absolute; inset: 0; }
|
|
#s4-cam { position: absolute; inset: 0; transform-origin: 50% 50%; }
|
|
#s4-bg { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; object-fit: cover; }
|
|
#s4-drive { position: absolute; left: 120px; top: 1120px; width: 320px; }
|
|
#s4-chip { position: absolute; left: 90px; top: 560px; display: flex; align-items: center; gap: 22px; padding: 22px 40px 22px 24px; border-radius: 32px; background: #fff; color: #28304a; box-shadow: 0 12px 34px rgba(40, 48, 74, 0.28); transform-origin: 0% 50%; }
|
|
#s4-chip img { width: 110px; height: 110px; }
|
|
#s4-chip .n { font: 800 54px/1 'Pretendard', sans-serif; letter-spacing: -1px; white-space: nowrap; }
|
|
#s4-chip .v { font: 800 92px/1 'Pretendard', sans-serif; color: #d4552a; letter-spacing: -2px; min-width: 120px; text-align: right; }
|
|
#s4-line { position: absolute; left: 90px; top: 760px; width: 900px; font: 400 76px/1.2 'Jua', sans-serif; letter-spacing: -1px; 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; }
|
|
</style>
|
|
<div id="root" data-composition-id="s4" data-width="1080" data-height="1920">
|
|
<div id="s4-world" class="clip" data-start="0" data-duration="2">
|
|
<div id="s4-cam">
|
|
<img id="s4-bg" src="assets/bg/beach.webp" alt="" />
|
|
<img id="s4-drive" src="assets/icons/drive.png" alt="" />
|
|
<div id="s4-chip"><img src="assets/icons/drive.png" alt="" /><span class="n">드라이브각</span><span class="v" id="s4-score">0</span></div>
|
|
<p id="s4-line">해안 드라이브 딱 좋은 날</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
const tl = gsap.timeline({ paused: true });
|
|
// 줌 스루 끝에서 크게 들어와 안착, 그 뒤 살짝 드리프트
|
|
tl.fromTo("#s4-cam", { scale: 1.2, filter: "blur(6px)" }, { scale: 1.06, filter: "blur(0px)", duration: 0.55, ease: "power3.out" }, 0);
|
|
tl.to("#s4-cam", { scale: 1.09, duration: 1.2, ease: "power2.inOut" }, 0.55);
|
|
tl.fromTo("#s4-drive", { x: -40, y: 10 }, { x: 70, y: -6, duration: 2, ease: "none" }, 0);
|
|
// 오늘 점수 칩: 튕겨 들어오고 숫자가 올라감 (2026-10-24 서울 중구 API 값)
|
|
tl.fromTo("#s4-chip", { scale: 0.5, x: -80, opacity: 0 }, { scale: 1, x: 0, opacity: 1, duration: 0.45, ease: "back.out(1.6)" }, 0.15);
|
|
const score = { v: 0 };
|
|
tl.to(score, { v: 82, duration: 0.6, ease: "power2.out", onUpdate: () => { document.getElementById("s4-score").textContent = Math.round(score.v); } }, 0.25);
|
|
tl.fromTo("#s4-line", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 0.28);
|
|
tl.to("#s4-cam", { y: -420, filter: "blur(16px)", duration: 0.18, ease: "power3.in" }, 1.84);
|
|
window.__timelines["s4"] = tl;
|
|
</script>
|
|
</template>
|