feat: 3D 소개 릴스(intro3d) — test-design/weather 디오라마(Three.js 섬·구름·아이콘)를 HyperFrames로, 브랜드 색 하늘 돔, 글 오버레이 6장면; 폰 베젤 띠 제거
No files matched your search
@@ -266,4 +266,7 @@
|
||||
| [x] | 10/24 나들이 타로(등산각·드라이브각·한강각, 질문 "어느 곳으로 나들이를 가면 좋을까요?") 킹서버 카드 2 → 포스트 3648, 인스타 https://www.instagram.com/p/De3N7LnIJyZ/ 게시. 같은 날 오늘의 코디(캐주얼, mild 구간 그림 재사용) 킹서버 카드 3 → 포스트 3649, 인스타 https://www.instagram.com/p/De3OVz6oC9e/. 그림 생성 모델: `gpt-6-luna`는 그림을 파일로 저장 못 해 실패, `gpt-6-sol`·low로 바꿔 성공(장당 ~28k 토큰) | 사용자 요청 (10/24) | `admin/scripts/gen-image.mjs` |
|
||||
| [x] | 10/24 날씨각 소개 카드(인스타 전용, 8장, `intro` 템플릿 — Codex gpt-6-sol이 설계) 인스타 https://www.instagram.com/p/De3SUTtoDGR/ 게시. 킹서버엔 카드 4로 저장만(승인 대기, 피드엔 안 나감). 해시태그는 `card_set.hashtags`로 인스타 캡션에만 붙음(타로·코디 템플릿도 적용) | 사용자 요청 (10/24) | `admin/src/cards/templates.tsx`, `backend/router/v1/card/card.py` |
|
||||
| [ ] | 인스타 릴스(20초, 2.5D: Codex 3D 렌더풍 배경 + 카메라 패럴랙스, 무료 BGM, API로 업로드) — 백엔드에 mp4 공개 주소 + REELS 게시 추가 필요 | 사용자 요청 (10/24) | `backend/services/external/instagram.py` |
|
||||
| [ ] | 인스타에 올라간 불량 게시물 삭제(앱에서만 가능): 소개 카드 De3SUTtoDGR·De3ycbAIPVw(스샷 잘림)·De31G7VIBEc(7·8번 장 치우침), 릴스 18152745022535272(폰 잘림) | 10/24 검수 실패 | — |
|
||||
| [ ] | 소개 카드 최종본(`admin/out/2026-10-24/소개카드_1~8.jpg`, 19:41)과 3D 릴스(`admin/reels/intro3d/renders/intro3d.mp4`) — 사용자가 "올려"라고 할 때만 올림. 릴스 음악은 HeyGen 로그인(`~/.local/bin/heygen auth login --oauth`) 뒤 `npx hyperframes media-use resolve --type bgm` | 10/24 | `admin/reels/intro3d/` |
|
||||
| [ ] | 앱 헤더가 400~448px 폭에서 컨테이너를 넘쳐 로그인 버튼이 잘림(`frontend/src/b/BLayout.tsx` TopBar). 캡처는 456px로 찍어 피했지만 실제 폰(430·440px)에서도 잘릴 수 있음 | 10/24 캡처 중 발견 | `frontend/src/b/BLayout.tsx` |
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
# HyperFrames Composition Project
|
||||
|
||||
This folder is a [HyperFrames](https://hyperframes.heygen.com) video: HTML, CSS and seekable
|
||||
animations (GSAP by default) that the `hyperframes` CLI previews in the browser and renders to
|
||||
MP4.
|
||||
|
||||
## Skills — read these first
|
||||
|
||||
**Invoke the relevant skill before writing or modifying compositions.** Skills encode framework-specific patterns (e.g., `window.__timelines` registration, `data-*` attribute semantics, shader-compatible CSS rules) that generic web docs don't cover, so compositions written without them break.
|
||||
|
||||
**Doing anything with HyperFrames?** Start at `/hyperframes`. Make any video by asking for it; the `/hyperframes` skill carries the contract and the references (each kind of film, story, motion, look, sound, review, captions, overlays). Read it first, especially when there's no project context to orient you.
|
||||
|
||||
- `/hyperframes` — read first for any request to make, edit, animate or render a video, motion graphic, captions or overlays. Holds the render contract and the work loop.
|
||||
- `/hyperframes-cli` — the CLI by job: scaffold, check, look at frames, edit the timeline, preview, render, publish, project history.
|
||||
- `/hyperframes-registry` — ready-made blocks and components installed as editable source. Search it before hand-building any named visual.
|
||||
- `/media-use` — get or make any media (music, sound effects, images, voiceover, avatar and generated video, transcripts, cutouts, colour grades) and mix placed audio.
|
||||
- `/figma` — bring a Figma design, frame, logo or brand into a video.
|
||||
- `/slideshow` — a presentation or pitch deck. Output is a navigable deck, not a rendered MP4.
|
||||
- `/remotion-to-hyperframes` — bring existing video code or footage into HyperFrames (Remotion first; also Motion Canvas, Lottie, Three.js, canvas, or renders from other tools) and verify it frame by frame against the original.
|
||||
|
||||
**Changing how real footage or images look or reveal?** Load `/media-use` and read its `references/media-treatments.md` before editing, even when the request only says dark, flat, boring, retro, private, or “make the reveal cooler.” It governs how footage is treated, never whether media may be used. Use canonical media treatments and seek-safe motion; do not improvise equivalent CSS/SVG filters or overlays.
|
||||
|
||||
> **Tailwind v4 projects** (`hyperframes init --tailwind`): see `hyperframes-cli/references/init-and-scaffold.md` (Tailwind).
|
||||
|
||||
> **Using a HyperFrames plugin?** Load skills from that installed bundle and follow
|
||||
> its `hyperframes/references/plugin-installation.md` execution rules. Update via
|
||||
> the plugin manager, not the standalone commands below.
|
||||
>
|
||||
> **Standalone skill missing or stale?** Run `npx hyperframes skills update <name>` to install/refresh
|
||||
> the specific skill you need, or bare `npx hyperframes skills update` to refresh the core set plus
|
||||
> everything already installed — neither pulls the full set. Restart the agent session so
|
||||
> newly installed skills load.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
npm run dev # human-operated foreground preview (blocks until stopped)
|
||||
npx hyperframes preview --background # agent-safe persistent Studio preview
|
||||
npx hyperframes preview --status # verify the persistent preview is listening
|
||||
npx hyperframes preview --stop # stop it when review is finished
|
||||
npm run check # lint + runtime + layout + motion + contrast (one command)
|
||||
npx hyperframes snapshot --at 1,3,5 # PNG frames at those seconds, to look at before rendering
|
||||
npm run render # render to MP4
|
||||
npm run publish # publish and get a shareable link
|
||||
npx hyperframes lint --verbose # include info-level findings
|
||||
npx hyperframes lint --json # machine-readable output for CI
|
||||
npx hyperframes docs <topic> # reference docs in terminal
|
||||
```
|
||||
|
||||
> **Agents must use `npx hyperframes preview --background` for Studio handoff.** Do not rely
|
||||
> on a shell/tool `run_in_background` wrapper around `npm run dev`: that foreground process
|
||||
> remains owned by the invoking session and can disappear while the browser stays open,
|
||||
> leaving refreshes at `ERR_CONNECTION_TIMED_OUT`. Verify with `preview --status`, keep it
|
||||
> alive through review, and stop it explicitly with `preview --stop` afterward.
|
||||
|
||||
> **Back from the desktop app.** Once this project was opened in the HyperFrames desktop app, run `npx hyperframes catch-up` before your next change here: it lists what the person asked Framey in the app and which files changed since.
|
||||
|
||||
> **Pinned CLI version.** These scripts pin an exact `hyperframes@X.Y.Z` so this project re-renders identically over time. Weeks later that pin lags fixes shipped since. To move up: `npx hyperframes@latest upgrade --project . --check` (shows the delta), then `npx hyperframes@latest upgrade --project .` to rewrite the pins. Always unpinned — the pinned script re-runs the old version against itself.
|
||||
|
||||
## Documentation
|
||||
|
||||
**For quick reference**, use the local CLI docs command (no network required):
|
||||
|
||||
```bash
|
||||
npx hyperframes docs <topic>
|
||||
```
|
||||
|
||||
Topics: `data-attributes`, `gsap`, `compositions`, `rendering`, `examples`, `troubleshooting`
|
||||
|
||||
**For full documentation**, discover pages via the machine-readable index — do NOT guess URLs:
|
||||
|
||||
```
|
||||
https://hyperframes.heygen.com/llms.txt
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `index.html` — main composition (root timeline)
|
||||
- `compositions/` — sub-compositions referenced via `data-composition-src`
|
||||
- `meta.json` — project metadata (id, name)
|
||||
- `transcript.json` — whisper word-level transcript (if generated)
|
||||
|
||||
## Linting — ALWAYS RUN AFTER CHANGES
|
||||
|
||||
After creating or editing any `.html` composition, **always** run the full check before considering the task complete:
|
||||
|
||||
```bash
|
||||
npm run check
|
||||
```
|
||||
|
||||
Fix all errors before presenting the result. Warnings should be reviewed before rendering.
|
||||
|
||||
Then look at what you changed: `npx hyperframes snapshot --at <seconds>` (or `--range START,END`, `--composition <id>`) at the moments you edited, and read the frames before you reply. A passing check does not show how it looks.
|
||||
|
||||
## Key Rules
|
||||
|
||||
1. Every timed element needs `data-start` and a duration. `data-start` is what marks it as timed; `data-track-index` is an optional Studio display lane the render never reads
|
||||
2. Give timed visual elements `class="clip"`. The framework keys visibility off `data-start`, not the class, but the shared `.clip` CSS is what gives a scene its full-frame box, and `lint` warns without it
|
||||
3. Register one paused root timeline per composition on `window.__timelines`:
|
||||
```js
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["composition-id"] = gsap.timeline({ paused: true });
|
||||
```
|
||||
Scene timelines manually added to this root must not be paused. A paused
|
||||
child does not advance when the root is seeked. The runtime activates
|
||||
registered composition siblings, not arbitrary nested scene timelines.
|
||||
4. A video with sound keeps it on the `<video>` (`data-has-audio="true"`, no `muted`). Use a separate `<audio>` for music, voiceover, replacement audio, J/L cuts, or audio detached in Studio. Silent footage and b-roll: `muted`.
|
||||
5. Sub-compositions use `data-composition-src="compositions/file.html"` to reference other HTML files
|
||||
6. Only deterministic logic — no `Date.now()`, no `Math.random()`, no network fetches
|
||||
@@ -0,0 +1,15 @@
|
||||
GOAL: 20~50대가 "날씨를 보면 오늘 할 일을 알려 주는 앱"을 20초 안에 알고 프로필 링크(또는 토스 검색)로 열어 본다. 진짜 3D(Three.js 섬·하늘·구름·아이콘)로.
|
||||
OUTPUT: HyperFrames, 1080 x 1920, 30 fps, 21 s = 630 frames. 음악은 HeyGen 로그인 후 붙인다(지금 무음).
|
||||
WORLD: index.html 의 Three.js 장면 하나가 21초 내내 돈다. test-design/weather 디오라마(Kenney Nature Kit CC0 모델 15개, Fluent 3D 아이콘 스프라이트, 구름 스프라이트)를 가져오고
|
||||
하늘은 브랜드 색 그라데이션 돔(새벽 복숭아 → 낮 파랑 #3f8fe0 → 흐림 회색 → 노을 보라·주황 → 밤 남색) + 해 글로우. 섬은 가을 팔레트(잎 #ff7a2e, 잔디 #c8b25a), 섬 z=-118, scale 2.
|
||||
결정적: 별·구름 자리는 mulberry32(20261024), 모든 움직임은 t 의 함수(hf-seek). 모델 로드는 window.__hf.buildReady.main.
|
||||
LOOK: 글은 sub-composition(o1~o6)으로 얹음. 낮 장면 글자는 흰색+남색 그림자, 위쪽 980px 에 어둠 띠(0.5→0)로 가독성. 첫 제목만 잉크색+흰 후광. 칩은 흰 둥근 사각, 점수 주황 #d4552a.
|
||||
글자 x ≤ 900(오른쪽 액션 레일), y 168~1330. 폰은 720px 폭, 테두리 12px, 스크린샷 696px(여백 0), 가운데(좌우 180).
|
||||
SHOTS: 0–3 새벽→낮. 해가 뜨고(rise) 카메라가 구름 덩어리를 뚫고 전진(camZ 12→-20). 하늘 아이콘 해·우산·자전거·빨래가 둥둥. "오늘 뭐 하기 / 좋은 날이지?"
|
||||
3–6 흐림. 하늘 회색, 비 아이콘 낙하, 칩 흐림·19°·습도 70%, "…그래서 오늘 뭐 하죠?"
|
||||
6–8.5 맑아지며 섬으로 하강(camZ -34→-103, lookY 3.2). 앱 아이콘 스프링 + "날씨각" + "날씨를 할 일로 바꿔요".
|
||||
8.5–14.5 섬 주위를 돌며(spin 1.6) 하늘이 황금→노을로. 산책각 79(걷기 아이콘) → 캠핑각 75(캠핑 아이콘·텐트) → 한강각 84(노을 아이콘). 2026-10-24 서울 중구 API 점수.
|
||||
14.5–17.5 밤. 별이 켜지고 카메라가 위를 본다. 폰(실제 홈 화면, 밤 테마)이 아래서 올라옴, "지금 내 동네 1위는?", "68가지 각".
|
||||
17.5–21 엔드카드: 아이콘·날씨각·설치 없이 바로 무료·weather.o2o.kr·토스 검색, 토끼·곰.
|
||||
BANNED: 검은 보이드, 글로우 남발(해 글로우만), 유리 카드, 세 카드 나란히, 코너 로고, 착지 뒤 떠다니는 제목, 지어낸 점수, 사용자 글 노출, 잘린 폰 화면.
|
||||
QA: 전체 프레임 1초 간격 21장을 본다(잘라서 보지 않는다). 16.5초 폰 테두리 좌우 180/180 을 픽셀로 잰다. 글자가 오른쪽 레일(x>900)에 걸리지 않는지. 썸네일(cover)은 4:5 가운데 영역(y 285~1635) 안에 글이 들어가는 프레임.
|
||||
@@ -0,0 +1 @@
|
||||
3D icons in this folder are from Microsoft Fluent Emoji (https://github.com/microsoft/fluentui-emoji), licensed under the MIT License. Copyright (c) Microsoft Corporation.
|
||||
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 81 KiB |
@@ -0,0 +1,7 @@
|
||||
# 3D 모델 출처
|
||||
|
||||
| 파일 | 출처 | 라이선스 |
|
||||
|---|---|---|
|
||||
| `*.glb` | Nature Kit 2.1 by Kenney, https://kenney.nl/assets/nature-kit | CC0 1.0 |
|
||||
|
||||
구름과 아이콘(`../icons`)은 Microsoft Fluent Emoji, MIT. `../icons/LICENSE-fluent-emoji.txt` 참고.
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<style>
|
||||
@font-face { font-family: 'Jua'; src: url('assets/fonts/Jua-Regular.ttf'); }
|
||||
#root { position: absolute; inset: 0; overflow: hidden; }
|
||||
#o1-title { position: absolute; left: 90px; top: 300px; width: 900px; margin: 0; font: 400 120px/1.18 'Jua', sans-serif; letter-spacing: -2px; color: #28304a; text-shadow: 0 0 22px rgba(255, 255, 255, 0.9), 0 4px 14px rgba(255, 255, 255, 0.7); word-break: keep-all; }
|
||||
#o1-title .w { display: inline-block; margin-right: 0.22em; }
|
||||
</style>
|
||||
<div id="root" data-composition-id="o1" data-width="1080" data-height="1920">
|
||||
<div id="o1-world" class="clip" data-start="0" data-duration="3">
|
||||
<h1 id="o1-title"><span class="w">오늘</span><span class="w">뭐</span><span class="w">하기</span><br /><span class="w">좋은</span><span class="w">날이지?</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.fromTo("#o1-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("#o1-title", { y: -120, opacity: 0, filter: "blur(10px)", duration: 0.25, ease: "power3.in" }, 2.7);
|
||||
window.__timelines["o1"] = tl;
|
||||
</script>
|
||||
</template>
|
||||
@@ -0,0 +1,30 @@
|
||||
<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; }
|
||||
#o2-shade { position: absolute; left: 0; top: 0; width: 1080px; height: 980px; background: linear-gradient(180deg, rgba(20, 26, 50, 0.5) 0%, rgba(20, 26, 50, 0.25) 55%, rgba(20, 26, 50, 0) 100%); }
|
||||
.o2-chip { position: absolute; padding: 18px 40px; border-radius: 28px; background: #fff; color: #28304a; font: 800 60px/1 'Pretendard', sans-serif; letter-spacing: -1px; box-shadow: 0 10px 30px rgba(40, 48, 74, 0.25); white-space: nowrap; }
|
||||
#o2-c1 { left: 90px; top: 380px; }
|
||||
#o2-c2 { left: 330px; top: 520px; }
|
||||
#o2-c3 { left: 150px; top: 660px; }
|
||||
#o2-ask { position: absolute; left: 90px; top: 960px; width: 900px; margin: 0; font: 400 112px/1.18 'Jua', sans-serif; letter-spacing: -2px; color: #fff; text-shadow: 0 6px 22px rgba(20, 26, 50, 0.6); word-break: keep-all; }
|
||||
#o2-ask .w { display: inline-block; margin-right: 0.22em; }
|
||||
</style>
|
||||
<div id="root" data-composition-id="o2" data-width="1080" data-height="1920">
|
||||
<div id="o2-shade" aria-hidden="true" data-layout-ignore></div>
|
||||
<div id="o2-world" class="clip" data-start="0" data-duration="3">
|
||||
<div id="o2-c1" class="o2-chip">흐림</div>
|
||||
<div id="o2-c2" class="o2-chip">19°</div>
|
||||
<div id="o2-c3" class="o2-chip">습도 70%</div>
|
||||
<h1 id="o2-ask"><span class="w">…그래서</span><br /><span class="w">오늘</span><span class="w">뭐</span><span class="w">하죠?</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.fromTo(["#o2-c1", "#o2-c2", "#o2-c3"], { y: -220, scale: 0.6, opacity: 0 }, { y: 0, scale: 1, opacity: 1, duration: 0.45, ease: "back.out(1.6)", stagger: 0.1 }, 0.2);
|
||||
tl.fromTo("#o2-ask .w", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.13, ease: "power4.out", stagger: 0.07 }, 1.1);
|
||||
tl.to(["#o2-c1", "#o2-c2", "#o2-c3", "#o2-ask"], { opacity: 0, filter: "blur(8px)", duration: 0.25, ease: "power3.in" }, 2.7);
|
||||
window.__timelines["o2"] = tl;
|
||||
</script>
|
||||
</template>
|
||||
@@ -0,0 +1,29 @@
|
||||
<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; }
|
||||
#o3-shade { position: absolute; left: 0; top: 0; width: 1080px; height: 980px; background: linear-gradient(180deg, rgba(20, 26, 50, 0.5) 0%, rgba(20, 26, 50, 0.25) 55%, rgba(20, 26, 50, 0) 100%); }
|
||||
#o3-icon { position: absolute; left: 400px; top: 420px; width: 280px; height: 280px; border-radius: 64px; box-shadow: 0 24px 60px rgba(20, 26, 50, 0.35); transform-origin: 50% 50%; }
|
||||
#o3-name { position: absolute; left: 0; top: 760px; width: 1080px; margin: 0; text-align: center; font: 400 150px/1 'Jua', sans-serif; letter-spacing: -3px; color: #fff; text-shadow: 0 8px 28px rgba(20, 26, 50, 0.55); }
|
||||
#o3-name .l { display: inline-block; }
|
||||
#o3-sub { position: absolute; left: 90px; top: 950px; width: 900px; margin: 0; text-align: center; font: 700 56px/1.3 'Pretendard', sans-serif; letter-spacing: -1px; color: #fff; text-shadow: 0 4px 18px rgba(20, 26, 50, 0.6); word-break: keep-all; }
|
||||
#o3-sub b { color: #ffb48a; font-weight: 800; }
|
||||
</style>
|
||||
<div id="root" data-composition-id="o3" data-width="1080" data-height="1920">
|
||||
<div id="o3-shade" aria-hidden="true" data-layout-ignore></div>
|
||||
<div id="o3-world" class="clip" data-start="0" data-duration="2.5">
|
||||
<img id="o3-icon" src="assets/img/app-icon.png" alt="" />
|
||||
<h1 id="o3-name"><span class="l">날</span><span class="l">씨</span><span class="l">각</span></h1>
|
||||
<p id="o3-sub">날씨를 <b>할 일</b>로 바꿔요</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.fromTo("#o3-icon", { scale: 0.2, opacity: 0 }, { scale: 1, opacity: 1, duration: 0.5, ease: "back.out(1.7)" }, 0.1);
|
||||
tl.fromTo("#o3-name .l", { opacity: 0, filter: "blur(6px)", y: 14 }, { opacity: 1, filter: "blur(0px)", y: 0, duration: 0.2, ease: "power4.out", stagger: 0.1 }, 0.4);
|
||||
tl.fromTo("#o3-sub", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 0.55);
|
||||
tl.to(["#o3-icon", "#o3-name", "#o3-sub"], { opacity: 0, y: -60, filter: "blur(8px)", duration: 0.25, ease: "power3.in" }, 2.3);
|
||||
window.__timelines["o3"] = tl;
|
||||
</script>
|
||||
</template>
|
||||
@@ -0,0 +1,43 @@
|
||||
<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; }
|
||||
#o4-shade { position: absolute; left: 0; top: 0; width: 1080px; height: 980px; background: linear-gradient(180deg, rgba(20, 26, 50, 0.5) 0%, rgba(20, 26, 50, 0.25) 55%, rgba(20, 26, 50, 0) 100%); }
|
||||
.o4-chip { position: absolute; left: 90px; top: 300px; 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(20, 26, 50, 0.3); transform-origin: 0% 50%; }
|
||||
.o4-chip img { width: 110px; height: 110px; }
|
||||
.o4-chip .n { font: 800 54px/1 'Pretendard', sans-serif; letter-spacing: -1px; white-space: nowrap; }
|
||||
.o4-chip .v { font: 800 92px/1 'Pretendard', sans-serif; color: #d4552a; letter-spacing: -2px; min-width: 120px; text-align: right; }
|
||||
.o4-line { position: absolute; left: 90px; top: 500px; width: 900px; margin: 0; font: 400 76px/1.2 'Jua', sans-serif; letter-spacing: -1px; color: #fff; text-shadow: 0 6px 22px rgba(20, 26, 50, 0.6); word-break: keep-all; }
|
||||
#o4-head { position: absolute; left: 90px; top: 210px; margin: 0; font: 700 44px/1 'Pretendard', sans-serif; color: #fff; text-shadow: 0 3px 12px rgba(20, 26, 50, 0.6); }
|
||||
</style>
|
||||
<div id="root" data-composition-id="o4" data-width="1080" data-height="1920">
|
||||
<div id="o4-shade" aria-hidden="true" data-layout-ignore></div>
|
||||
<div id="o4-world" class="clip" data-start="0" data-duration="6">
|
||||
<p id="o4-head">오늘 서울 · 실제 점수</p>
|
||||
<div id="o4-c1" class="o4-chip"><img src="assets/icons/walk.png" alt="" /><span class="n">산책각</span><span class="v" id="o4-v1">0</span></div>
|
||||
<p id="o4-l1" class="o4-line">숲길 산책 딱 좋은 날</p>
|
||||
<div id="o4-c2" class="o4-chip"><img src="assets/icons/camping.png" alt="" /><span class="n">캠핑각</span><span class="v" id="o4-v2">0</span></div>
|
||||
<p id="o4-l2" class="o4-line">텐트 치고 모닥불 딱</p>
|
||||
<div id="o4-c3" class="o4-chip"><img src="assets/icons/hangang.png" alt="" /><span class="n">한강각</span><span class="v" id="o4-v3">0</span></div>
|
||||
<p id="o4-l3" class="o4-line">노을 보며 돗자리 딱</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
const beat = (chip, line, vid, value, t0) => {
|
||||
tl.fromTo(chip, { scale: 0.5, x: -80, opacity: 0 }, { scale: 1, x: 0, opacity: 1, duration: 0.45, ease: "back.out(1.6)" }, t0);
|
||||
const s = { v: 0 };
|
||||
tl.to(s, { v: value, duration: 0.6, ease: "power2.out", onUpdate: () => { document.getElementById(vid).textContent = Math.round(s.v); } }, t0 + 0.1);
|
||||
tl.fromTo(line, { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, t0 + 0.25);
|
||||
tl.to([chip, line], { opacity: 0, y: -40, filter: "blur(8px)", duration: 0.2, ease: "power3.in" }, t0 + 1.78);
|
||||
};
|
||||
tl.fromTo("#o4-head", { opacity: 0 }, { opacity: 1, duration: 0.2 }, 0.1);
|
||||
// 2026-10-24 서울 중구 API 점수
|
||||
beat("#o4-c1", "#o4-l1", "o4-v1", 79, 0.3);
|
||||
beat("#o4-c2", "#o4-l2", "o4-v2", 75, 2.3);
|
||||
beat("#o4-c3", "#o4-l3", "o4-v3", 84, 4.3);
|
||||
tl.to("#o4-head", { opacity: 0, duration: 0.2 }, 5.75);
|
||||
window.__timelines["o4"] = tl;
|
||||
</script>
|
||||
</template>
|
||||
@@ -0,0 +1,31 @@
|
||||
<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; }
|
||||
#o5-title { position: absolute; left: 90px; top: 230px; width: 900px; margin: 0; font: 400 112px/1.18 'Jua', sans-serif; letter-spacing: -2px; color: #fff; text-shadow: 0 6px 22px rgba(20, 26, 50, 0.6); word-break: keep-all; }
|
||||
#o5-title .w { display: inline-block; margin-right: 0.22em; }
|
||||
#o5-note { position: absolute; left: 90px; top: 500px; margin: 0; font: 600 36px/1 'Pretendard', sans-serif; color: #dfe6ff; }
|
||||
#o5-phone { position: absolute; left: 180px; top: 560px; width: 720px; height: 1500px; box-sizing: border-box; border: 12px solid #28304a; border-radius: 88px; background: #28304a; box-shadow: 0 30px 70px rgba(10, 14, 40, 0.5); overflow: hidden; }
|
||||
#o5-phone img { display: block; width: 696px; height: auto; max-width: none; border-radius: 76px; }
|
||||
#o5-chip { position: absolute; left: 560px; top: 480px; padding: 18px 36px; border-radius: 28px; background: #d4552a; color: #fff; font: 800 56px/1 'Pretendard', sans-serif; letter-spacing: -1px; box-shadow: 0 12px 34px rgba(212, 85, 42, 0.35); white-space: nowrap; transform-origin: 50% 50%; z-index: 2; }
|
||||
</style>
|
||||
<div id="root" data-composition-id="o5" data-width="1080" data-height="1920">
|
||||
<div id="o5-world" class="clip" data-start="0" data-duration="3" data-layout-allow-overlap>
|
||||
<h1 id="o5-title"><span class="w">지금</span><span class="w">내</span><span class="w">동네</span><br /><span class="w">1위는?</span></h1>
|
||||
<p id="o5-note">실제 화면 · 10.24 마포구</p>
|
||||
<div id="o5-phone"><img src="assets/img/shot-home.webp" alt="날씨각 홈 화면" /></div>
|
||||
<div id="o5-chip">68가지 각</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.fromTo("#o5-phone", { y: 1400 }, { y: 0, duration: 0.7, ease: "power4.out" }, 0.05);
|
||||
tl.fromTo("#o5-title .w", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.13, ease: "power4.out", stagger: 0.07 }, 0.4);
|
||||
tl.fromTo("#o5-note", { opacity: 0 }, { opacity: 1, duration: 0.2 }, 0.6);
|
||||
tl.fromTo("#o5-chip", { scale: 0.4, opacity: 0, rotate: -8 }, { scale: 1, opacity: 1, rotate: -6, duration: 0.45, ease: "back.out(1.6)" }, 1.2);
|
||||
tl.to("#o5-phone", { y: 1500, duration: 0.3, ease: "power3.in" }, 2.7);
|
||||
tl.to(["#o5-title", "#o5-chip", "#o5-note"], { opacity: 0, filter: "blur(8px)", duration: 0.2, ease: "power3.in" }, 2.75);
|
||||
window.__timelines["o5"] = tl;
|
||||
</script>
|
||||
</template>
|
||||
@@ -0,0 +1,37 @@
|
||||
<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; }
|
||||
#o6-icon { position: absolute; left: 410px; top: 520px; width: 260px; height: 260px; border-radius: 60px; box-shadow: 0 24px 60px rgba(10, 14, 40, 0.5); transform-origin: 50% 50%; }
|
||||
#o6-name { position: absolute; left: 0; top: 830px; width: 1080px; margin: 0; text-align: center; font: 400 140px/1 'Jua', sans-serif; letter-spacing: -3px; color: #fff; text-shadow: 0 8px 28px rgba(10, 14, 40, 0.6); }
|
||||
#o6-claim { position: absolute; left: 90px; top: 1010px; width: 900px; margin: 0; text-align: center; font: 800 64px/1.2 'Pretendard', sans-serif; letter-spacing: -1px; color: #fff; text-shadow: 0 4px 18px rgba(10, 14, 40, 0.6); word-break: keep-all; }
|
||||
#o6-claim b { color: #ffb48a; }
|
||||
#o6-url { position: absolute; left: 90px; top: 1125px; width: 900px; margin: 0; text-align: center; font: 700 58px/1.2 'Pretendard', sans-serif; letter-spacing: -1px; color: #9ecbff; text-shadow: 0 4px 18px rgba(10, 14, 40, 0.6); }
|
||||
#o6-toss { position: absolute; left: 90px; top: 1215px; width: 900px; margin: 0; text-align: center; font: 600 50px/1.2 'Pretendard', sans-serif; letter-spacing: -1px; color: #dfe6ff; text-shadow: 0 4px 18px rgba(10, 14, 40, 0.6); word-break: keep-all; }
|
||||
#o6-rabbit { position: absolute; left: 90px; top: 1520px; width: 260px; }
|
||||
#o6-bear { position: absolute; left: 730px; top: 1540px; width: 260px; }
|
||||
</style>
|
||||
<div id="root" data-composition-id="o6" data-width="1080" data-height="1920">
|
||||
<div id="o6-world" class="clip" data-start="0" data-duration="3.5">
|
||||
<img id="o6-icon" src="assets/img/app-icon.png" alt="" />
|
||||
<h1 id="o6-name">날씨각</h1>
|
||||
<p id="o6-claim">설치 없이 바로, <b>무료</b></p>
|
||||
<p id="o6-url">weather.o2o.kr</p>
|
||||
<p id="o6-toss">토스 앱에서 '날씨각' 검색해도 열려요</p>
|
||||
<img id="o6-rabbit" src="assets/icons/rabbit.png" alt="" />
|
||||
<img id="o6-bear" src="assets/icons/bear.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.fromTo("#o6-icon", { scale: 0.2, opacity: 0 }, { scale: 1, opacity: 1, duration: 0.5, ease: "back.out(1.7)" }, 0.1);
|
||||
tl.fromTo("#o6-name", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 0.4);
|
||||
tl.fromTo("#o6-claim", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 0.7);
|
||||
tl.fromTo("#o6-url", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 1.0);
|
||||
tl.fromTo("#o6-toss", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 1.3);
|
||||
tl.fromTo(["#o6-rabbit", "#o6-bear"], { y: 240 }, { y: 0, duration: 0.6, ease: "expo.out", stagger: 0.08 }, 0.3);
|
||||
tl.to({}, { duration: 0.2 }, 3.3);
|
||||
window.__timelines["o6"] = tl;
|
||||
</script>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"$schema": "https://hyperframes.heygen.com/schema/hyperframes.json",
|
||||
"registry": "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry",
|
||||
"paths": {
|
||||
"blocks": "compositions",
|
||||
"components": "compositions/components",
|
||||
"assets": "assets"
|
||||
},
|
||||
"media": {
|
||||
"autoProxy": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=1080, height=1920" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script type="importmap">
|
||||
{ "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.169.0/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.169.0/examples/jsm/" } }
|
||||
</script>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
html, body { margin: 0; width: 1080px; height: 1920px; overflow: hidden; background: #0f1535; }
|
||||
#root { position: relative; width: 100%; height: 100%; }
|
||||
#world { position: absolute; inset: 0; width: 1080px; height: 1920px; display: block; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 날씨각 소개 릴스(3D). 세상은 Three.js 한 장면(섬·하늘·구름·아이콘, test-design/weather 디오라마를 가져옴), 글·칩·폰은 위에 얹는 sub-composition -->
|
||||
<div id="root" data-composition-id="main" data-start="0" data-duration="21" data-width="1080" data-height="1920">
|
||||
<canvas id="world" width="1080" height="1920"></canvas>
|
||||
<div id="o1" data-composition-id="o1" data-composition-src="compositions/o1.html" data-start="0" data-duration="3" data-track-index="2" data-track-kind="graphics" data-width="1080" data-height="1920"></div>
|
||||
<div id="o2" data-composition-id="o2" data-composition-src="compositions/o2.html" data-start="3" data-duration="3" data-track-index="2" data-track-kind="graphics" data-width="1080" data-height="1920"></div>
|
||||
<div id="o3" data-composition-id="o3" data-composition-src="compositions/o3.html" data-start="6" data-duration="2.5" data-track-index="2" data-track-kind="graphics" data-width="1080" data-height="1920"></div>
|
||||
<div id="o4" data-composition-id="o4" data-composition-src="compositions/o4.html" data-start="8.5" data-duration="6" data-track-index="2" data-track-kind="graphics" data-width="1080" data-height="1920"></div>
|
||||
<div id="o5" data-composition-id="o5" data-composition-src="compositions/o5.html" data-start="14.5" data-duration="3" data-track-index="2" data-track-kind="graphics" data-width="1080" data-height="1920"></div>
|
||||
<div id="o6" data-composition-id="o6" data-composition-src="compositions/o6.html" data-start="17.5" data-duration="3.5" data-track-index="2" data-track-kind="graphics" data-width="1080" data-height="1920"></div>
|
||||
</div>
|
||||
<script type="module">
|
||||
import * as THREE from 'three';
|
||||
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
||||
|
||||
// 결정적 난수: 프레임을 어느 순서로 그려도 같은 별·구름 자리
|
||||
function mulberry32(a) { return () => { a |= 0; a = (a + 0x6d2b79f5) | 0; let t = Math.imul(a ^ (a >>> 15), 1 | a); t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t; return ((t ^ (t >>> 14)) >>> 0) / 4294967296; }; }
|
||||
const rand = mulberry32(20261024);
|
||||
const rnd = (a, b) => a + rand() * (b - a);
|
||||
|
||||
const W = 1080, H = 1920;
|
||||
const canvas = document.getElementById('world');
|
||||
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, preserveDrawingBuffer: true });
|
||||
renderer.setPixelRatio(1);
|
||||
renderer.setSize(W, H, false);
|
||||
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
||||
renderer.outputColorSpace = THREE.SRGBColorSpace;
|
||||
|
||||
const scene = new THREE.Scene();
|
||||
const camera = new THREE.PerspectiveCamera(62, W / H, 0.1, 3000);
|
||||
|
||||
// 하늘: 브랜드 색 그라데이션 돔 (위 색 → 지평선 색). 분위기(mood) 0 새벽 · 1 낮 · 2 흐림 · 3 노을 · 4 밤 사이를 보간
|
||||
const PAL = [['#ffb7a3', '#ffe6cf'], ['#3f8fe0', '#dff0ff'], ['#8a95ad', '#d3d8e2'], ['#4a3f8f', '#ff8a4a'], ['#0b1230', '#2a3570']].map(([a, b]) => [new THREE.Color(a), new THREE.Color(b)]);
|
||||
const domeMat = new THREE.ShaderMaterial({
|
||||
side: THREE.BackSide, depthWrite: false, toneMapped: false,
|
||||
uniforms: { top: { value: new THREE.Color('#3f8fe0') }, bottom: { value: new THREE.Color('#dff0ff') }, sun: { value: new THREE.Vector3(0, 1, 0) }, glow: { value: 0.0 }, glowColor: { value: new THREE.Color('#ffd27a') } },
|
||||
vertexShader: 'varying vec3 vDir; void main(){ vDir = normalize(position); gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }',
|
||||
fragmentShader: 'uniform vec3 top; uniform vec3 bottom; uniform vec3 sun; uniform float glow; uniform vec3 glowColor; varying vec3 vDir; void main(){ float h = clamp(vDir.y * 1.6 + 0.25, 0.0, 1.0); vec3 c = mix(bottom, top, smoothstep(0.0, 1.0, h)); float d = max(dot(normalize(vDir), normalize(sun)), 0.0); c += glowColor * glow * pow(d, 28.0) * 1.4 + glowColor * glow * pow(d, 4.0) * 0.25; gl_FragColor = vec4(c, 1.0); }',
|
||||
});
|
||||
const dome = new THREE.Mesh(new THREE.SphereGeometry(2000, 32, 24), domeMat);
|
||||
scene.add(dome);
|
||||
const sunDir = new THREE.Vector3();
|
||||
|
||||
const hemi = new THREE.HemisphereLight(0xdfefff, 0x6a7aa0, 1.4);
|
||||
const sunLight = new THREE.DirectionalLight(0xffffff, 2.2);
|
||||
const fill = new THREE.DirectionalLight(0xfff4ea, 0);
|
||||
scene.add(hemi, sunLight, sunLight.target, fill, fill.target);
|
||||
|
||||
// 별
|
||||
const starN = 1600, sp = new Float32Array(starN * 3);
|
||||
for (let i = 0; i < starN; i++) {
|
||||
const th = rand() * Math.PI * 2, ph = Math.acos(rand() * 0.92);
|
||||
sp.set([Math.sin(ph) * Math.cos(th) * 900, Math.cos(ph) * 900 - 40, Math.sin(ph) * Math.sin(th) * 900], i * 3);
|
||||
}
|
||||
const starGeo = new THREE.BufferGeometry();
|
||||
starGeo.setAttribute('position', new THREE.BufferAttribute(sp, 3));
|
||||
const starMat = new THREE.PointsMaterial({ color: 0xffffff, size: 2.4, sizeAttenuation: false, transparent: true, opacity: 0, depthWrite: false });
|
||||
scene.add(new THREE.Points(starGeo, starMat));
|
||||
|
||||
// 상태: 타임라인이 이 값을 움직이고, 프레임마다 읽어서 그린다
|
||||
const S = { elev: 9, azim: 168, turb: 3, ray: 2.4, mie: 0.004, g: 0.8, exp: 0.38, camX: 0, camY: 1.4, camZ: 12, lookY: 4.5, lookX: 0, cloud: 1, stars: 0, island: 0, pass: 0, rise: 0, spin: 0, mood: 0, glow: 0.6, iconWalk: 0, iconCamp: 0, iconSunset: 0, rain: 0 };
|
||||
|
||||
const tex = new THREE.TextureLoader();
|
||||
const sprite = (name, s) => {
|
||||
const map = tex.load(`assets/icons/${name}.png`);
|
||||
map.colorSpace = THREE.SRGBColorSpace;
|
||||
const spr = new THREE.Sprite(new THREE.SpriteMaterial({ map, transparent: true, depthWrite: false, toneMapped: false, opacity: 0 }));
|
||||
spr.scale.set(s, s, 1);
|
||||
scene.add(spr);
|
||||
return spr;
|
||||
};
|
||||
// 하늘에 뜬 날씨각 3D 아이콘 (첫 장면), 비 (흐림 장면), 섬 옆 활동 아이콘 (증명 장면)
|
||||
const skyIcons = [['sun', 3.0, 2.6, -9, 2.2], ['umbrella', -3.0, 1.2, -11, 1.8], ['bike', 2.6, -0.4, -5, 1.4], ['laundry', -1.4, -1.2, -15, 1.7]].map(([n, x, y, z, s], i) => { const o = sprite(n, s); o.position.set(x, y, z); o.userData = { x, y, z, phase: i * 1.3, amp: 0.18 + (i % 3) * 0.07 }; return o; });
|
||||
const rainIcon = sprite('rain', 3.2); rainIcon.position.set(-2.4, 6.5, -12);
|
||||
const walkIcon = sprite('walk', 2.2), campIcon = sprite('camping', 2.2), sunsetIcon = sprite('sunset', 2.6);
|
||||
|
||||
// 구름: 날씨각 Fluent 3D 구름
|
||||
const cloudTex = tex.load('assets/icons/cloud.png');
|
||||
cloudTex.colorSpace = THREE.SRGBColorSpace;
|
||||
const cloudMat = new THREE.SpriteMaterial({ map: cloudTex, transparent: true, depthWrite: false, toneMapped: false });
|
||||
const passMat = cloudMat.clone();
|
||||
const clouds = new THREE.Group(), passClouds = new THREE.Group();
|
||||
scene.add(clouds, passClouds);
|
||||
const side = () => (rand() < 0.3 ? -1 : 1);
|
||||
const addCloud = (group, mat, x, y, z, s) => { const c = new THREE.Sprite(mat); c.scale.set(s * (rand() < 0.5 ? -1 : 1), s, 1); c.position.set(x, y, z); c.userData = { drift: rnd(0.15, 0.5), x }; group.add(c); };
|
||||
for (let i = 0; i < 7; i++) addCloud(clouds, cloudMat, side() * rnd(12, 40), rnd(9, 19), rnd(-70, -40), rnd(8, 16));
|
||||
for (let i = 0; i < 18; i++) addCloud(passClouds, passMat, rnd(-8, 8), rnd(-1, 8), rnd(-38, -18), rnd(6, 12));
|
||||
for (let i = 0; i < 12; i++) addCloud(clouds, cloudMat, side() * rnd(30, 130), rnd(16, 40), rnd(-280, -170), rnd(24, 44));
|
||||
|
||||
// 가을 섬 (Kenney Nature Kit, CC0)
|
||||
const loader = new GLTFLoader();
|
||||
const load = (url) => loader.loadAsync(url).then((g) => g.scene);
|
||||
const names = ['cliff_block_rock', 'tree_oak', 'tree_default', 'tree_fat', 'tree_pineRoundA', 'tree_pineRoundC', 'rock_largeA', 'rock_smallC', 'flower_redA', 'flower_yellowB', 'mushroom_redGroup', 'tent_smallOpen', 'campfire_stones', 'grass_large', 'plant_bushLarge'];
|
||||
const island = new THREE.Group();
|
||||
const mats = {
|
||||
leaf: new THREE.MeshStandardMaterial({ color: 0xff7a2e, roughness: 0.9, flatShading: true }),
|
||||
pine: new THREE.MeshStandardMaterial({ color: 0x3a8f6a, roughness: 0.9, flatShading: true }),
|
||||
grass: new THREE.MeshStandardMaterial({ color: 0xc8b25a, roughness: 1, flatShading: true }),
|
||||
dirt: new THREE.MeshStandardMaterial({ color: 0xc77a52, roughness: 1, flatShading: true }),
|
||||
wood: new THREE.MeshStandardMaterial({ color: 0x9a5a3c, roughness: 1, flatShading: true }),
|
||||
};
|
||||
const pick = (mat, model) => { const n = mat.name.toLowerCase(); if (n.startsWith('leafs')) return model.startsWith('tree_pine') ? mats.pine : mats.leaf; if (n === 'grass') return mats.grass; if (n === 'dirt') return mats.dirt; if (n.startsWith('wood')) return mats.wood; return mat; };
|
||||
const build = (async () => {
|
||||
const M = Object.fromEntries(await Promise.all(names.map(async (n) => [n, await load(`assets/models/${n}.glb`)])));
|
||||
const put = (name, x, z, s = 1, ry = 0, y = 1) => { const o = M[name].clone(true); o.traverse((m) => { if (m.isMesh) m.material = pick(m.material, name); }); o.position.set(x, y, z); o.scale.setScalar(s); o.rotation.y = ry; island.add(o); return o; };
|
||||
for (let x = -1; x <= 1; x++) for (let z = -1; z <= 1; z++) put('cliff_block_rock', x, z, 1, 0, 0);
|
||||
put('cliff_block_rock', 0, 0, 0.7, 0.4, -0.7);
|
||||
put('tree_oak', -0.95, -0.85, 1.25, 0.3); put('tree_default', 0.2, -1, 1.05, 1.2); put('tree_fat', -1.1, 0.3, 0.95, 2);
|
||||
put('tree_pineRoundA', 1.05, -0.55, 1.1); put('tree_pineRoundC', 1.15, 0.55, 0.9, 0.8);
|
||||
put('tent_smallOpen', 0.15, 0.45, 0.9, -0.5); put('campfire_stones', -0.35, 0.95, 0.8);
|
||||
put('rock_largeA', 0.95, 1.05, 0.55, 1.1); put('rock_smallC', -0.75, 1.15, 0.8);
|
||||
put('grass_large', 0.55, -0.05, 0.8); put('plant_bushLarge', -0.4, -0.05, 0.7, 1.5);
|
||||
put('flower_redA', -1.15, 1.1); put('flower_yellowB', 0.55, 1.15, 1, 1); put('mushroom_redGroup', -0.05, -0.55, 0.8);
|
||||
island.position.set(0, -2.6, -118); island.scale.setScalar(2.0); island.rotation.x = 0.05;
|
||||
scene.add(island);
|
||||
})();
|
||||
window.__hf = window.__hf || {}; window.__hf.buildReady = window.__hf.buildReady || {};
|
||||
window.__hf.buildReady.main = build;
|
||||
|
||||
// 타임라인: 하늘·카메라·아이콘 상태 (절대 초). 위에 얹는 글과 같은 박자
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
const at = (pos, dur, vars, ease = 'sine.inOut') => tl.to(S, { ...vars, duration: Math.max(0.01, dur), ease }, pos);
|
||||
// 0~3 새벽에서 낮으로: 해가 뜨고 카메라가 구름을 뚫고 앞으로
|
||||
at(0, 2.6, { rise: 1 }, 'power2.out');
|
||||
at(0, 2.4, { mood: 1, glow: 0.9 });
|
||||
at(3, 0.8, { mood: 2, glow: 0.1 });
|
||||
at(5.9, 0.9, { mood: 1, glow: 0.8 });
|
||||
at(8.5, 5.5, { mood: 3, glow: 1.2 });
|
||||
at(14.3, 1.2, { mood: 4, glow: 0 });
|
||||
at(0, 3, { camZ: -20, camY: 2.2, lookY: 9, elev: 40, azim: 196, turb: 2.0, ray: 2.6, mie: 0.003, exp: 0.36 });
|
||||
at(0.2, 0.8, { pass: 0.85 }); at(1.3, 0.9, { pass: 0 });
|
||||
// 3~6 흐림: 하늘이 탁해지고 비 아이콘
|
||||
at(3, 0.8, { turb: 14, ray: 0.8, mie: 0.02, g: 0.7, cloud: 0.4, exp: 0.26, elev: 18, pass: 0.45 });
|
||||
at(3.2, 0.5, { rain: 1 }, 'back.out(1.5)');
|
||||
at(3, 3, { camZ: -34, lookY: 5 }, 'none');
|
||||
// 6~8.5 맑게 걷히고 섬으로 하강
|
||||
at(5.9, 0.9, { turb: 2.2, ray: 2.6, mie: 0.004, g: 0.8, cloud: 1, exp: 0.38, rain: 0, pass: 0 });
|
||||
at(6, 2.5, { camZ: -103, camY: 1.4, lookY: 3.2, island: 1 }, 'power2.inOut');
|
||||
// 8.5~14.5 섬 주위: 황금빛으로 기울며 세 아이콘이 차례로 뜬다
|
||||
at(8.5, 6, { spin: 1.6, camX: -1.2, lookX: -0.3, camZ: -106, lookY: 3.0 }, 'none');
|
||||
at(8.5, 6, { elev: 2.4, turb: 4.0, ray: 3.2, mie: 0.008, g: 0.93, exp: 0.5 });
|
||||
at(8.8, 0.5, { iconWalk: 1 }, 'back.out(1.6)');
|
||||
at(10.8, 0.5, { iconCamp: 1 }, 'back.out(1.6)');
|
||||
at(12.8, 0.5, { iconSunset: 1 }, 'back.out(1.6)');
|
||||
// 14.5~21 밤: 해가 지고 별이 켜지고 카메라가 위를 본다
|
||||
at(14.3, 1.2, { elev: -9, exp: 0.26, stars: 1, camY: 5, lookY: 13, camX: 0, lookX: 0, iconWalk: 0, iconCamp: 0, iconSunset: 0 });
|
||||
at(15.5, 5.5, { camY: 7, lookY: 16 }, 'none');
|
||||
tl.to({}, { duration: 0.1 }, 20.9);
|
||||
|
||||
const warm = new THREE.Color(0xffa060), noon = new THREE.Color(0xffffff), dusk = new THREE.Color(0xff6a6a);
|
||||
const cloudDay = new THREE.Color(0xffffff), cloudGray = new THREE.Color(0x9aa3b5);
|
||||
const tintDay = new THREE.Color(0xffffff), tintDusk = new THREE.Color(0xffb59a), tintNight = new THREE.Color(0x3a4378), cloudTint = new THREE.Color();
|
||||
const C = THREE.MathUtils;
|
||||
|
||||
function renderAt(t) {
|
||||
tl.seek(t, false);
|
||||
camera.position.set(S.camX, S.camY, S.camZ);
|
||||
camera.lookAt(S.camX + S.lookX, S.lookY, S.camZ - 30);
|
||||
const elev = S.elev - (1 - S.rise) * 12;
|
||||
sunDir.setFromSphericalCoords(1, C.degToRad(90 - elev), C.degToRad(S.azim));
|
||||
{ const m = C.clamp(S.mood, 0, 4), i = Math.min(3, Math.floor(m)), f = m - i; domeMat.uniforms.top.value.copy(PAL[i][0]).lerp(PAL[i + 1][0], f); domeMat.uniforms.bottom.value.copy(PAL[i][1]).lerp(PAL[i + 1][1], f); domeMat.uniforms.sun.value.copy(sunDir); domeMat.uniforms.glow.value = S.glow; domeMat.uniforms.glowColor.value.set(m > 2.5 ? '#ffb070' : '#fff1c2'); }
|
||||
renderer.toneMappingExposure = 0.9;
|
||||
const day = C.clamp(elev / 30, 0, 1), low = C.clamp(1 - elev / 12, 0, 1), night = C.clamp(-elev / 6, 0, 1);
|
||||
sunLight.position.copy(sunDir).multiplyScalar(100).add(camera.position); sunLight.target.position.copy(camera.position);
|
||||
sunLight.color.copy(noon).lerp(warm, low).lerp(dusk, C.clamp(-elev / 3, 0, 1));
|
||||
sunLight.intensity = C.clamp((elev + 4) / 10, 0.05, 1) * 2.4;
|
||||
hemi.intensity = 0.35 + day * 1.1; hemi.color.setHSL(0.6 - low * 0.55, 0.5, 0.75 - low * 0.1);
|
||||
cloudTint.copy(tintDay).lerp(tintDusk, low).lerp(tintNight, night);
|
||||
cloudMat.color.copy(cloudDay).lerp(cloudGray, 1 - S.cloud).multiply(cloudTint);
|
||||
passMat.color.copy(cloudMat.color); passMat.opacity = S.pass; passClouds.visible = S.pass > 0.01;
|
||||
fill.position.copy(camera.position).add(new THREE.Vector3(-4, 6, 6)); fill.target.position.copy(island.position); fill.intensity = S.island * (1.6 - night * 0.8);
|
||||
for (const c of [...clouds.children, ...passClouds.children]) c.position.x = c.userData.x + Math.sin(t * 0.05 + c.userData.drift * 9) * c.userData.drift * 6;
|
||||
skyIcons.forEach((s, i) => { const fall = C.clamp(1 - S.rise, 0, 1); s.position.y = s.userData.y + fall * 14 + Math.sin(t * 1.1 + s.userData.phase) * s.userData.amp; s.material.opacity = S.rise * (1 - C.clamp((t - 2.4) / 0.6, 0, 1)); s.material.rotation = Math.sin(t * 0.8 + s.userData.phase) * 0.06; });
|
||||
rainIcon.material.opacity = S.rain; rainIcon.position.y = 6.5 - (1 - S.rain) * 3 + Math.sin(t * 1.3) * 0.15; rainIcon.position.z = S.camZ - 14;
|
||||
// 섬 옆 활동 아이콘: 섬 기준 자리, 카메라 쪽으로 살짝 띄움
|
||||
const ip = island.position;
|
||||
walkIcon.position.set(ip.x - 4.2, ip.y + 5.2 + Math.sin(t * 1.2) * 0.12, ip.z + 2.2); walkIcon.material.opacity = S.iconWalk; walkIcon.scale.setScalar(2.2 * (0.4 + 0.6 * S.iconWalk));
|
||||
campIcon.position.set(ip.x + 4.0, ip.y + 4.8 + Math.sin(t * 1.1 + 1) * 0.12, ip.z + 2.6); campIcon.material.opacity = S.iconCamp; campIcon.scale.setScalar(2.2 * (0.4 + 0.6 * S.iconCamp));
|
||||
sunsetIcon.position.set(ip.x + 0.4, ip.y + 7.6 + Math.sin(t * 0.9 + 2) * 0.12, ip.z + 1.5); sunsetIcon.material.opacity = S.iconSunset; sunsetIcon.scale.setScalar(2.6 * (0.4 + 0.6 * S.iconSunset));
|
||||
starMat.opacity = S.stars;
|
||||
island.visible = S.island > 0.01;
|
||||
island.rotation.y = -0.6 + S.spin * 0.9;
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
|
||||
window.addEventListener('hf-seek', (e) => { e.detail.waitUntil?.(build); renderAt(e.detail.time); });
|
||||
build.then(() => renderAt(0));
|
||||
window.__timelines["main"] = gsap.timeline({ paused: true });
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "intro3d",
|
||||
"name": "intro3d",
|
||||
"createdAt": "2026-10-24T10:57:06.229Z"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "intro3d",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "npx --yes hyperframes@0.8.191 preview",
|
||||
"check": "npx --yes hyperframes@0.8.191 check",
|
||||
"render": "npx --yes hyperframes@0.8.191 render",
|
||||
"publish": "npx --yes hyperframes@0.8.191 publish"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"pid":54078,"host":"Minas-MacBook-Pro-2.local","boot":"29824523"}
|
||||
@@ -587,14 +587,14 @@
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
box-sizing: border-box;
|
||||
padding: 12px;
|
||||
padding: 0;
|
||||
border: 8px solid var(--ink);
|
||||
border-radius: 44px;
|
||||
background: var(--ink);
|
||||
box-shadow: 0 18px 0 var(--soft), 0 30px 58px #28304a28;
|
||||
}
|
||||
/* 스크린샷은 자르지 않고 베젤 안에 통째로 (가장자리 칩이 테두리·둥근 모서리에 먹히지 않게) */
|
||||
.intro-phone img { display: block; width: 100%; height: auto; border-radius: 26px; }
|
||||
.intro-phone img { display: block; width: 100%; height: auto; border-radius: 36px; }
|
||||
.intro-phone.home,
|
||||
.intro-phone.sky { top: 620px; left: 345px; }
|
||||
.intro-kinds .intro-title { top: 205px; font-size: 88px; }
|
||||
|
||||