feat: 날씨각 캐릭터 보송·말랑(nalssigak-shorts Three.js)을 3D 릴스·소개 카드에, 카드에서 폰 프레임·스크린샷 제거(3D 스틸 무대·순위·기능 타일)

This commit is contained in:
minaChoi committed 2026-10-24 20:26:03 +09:00
1 parent 615dd27404
commit f2eed74e9d
16 files changed
+265 -57

No files matched your search

+141
View File
@@ -0,0 +1,141 @@
// 날씨각 캐릭터 (career/shorts/nalssigak-shorts 에서 가져옴): 보송 = 맑은 날파 초록 털뭉치(셸 텍스처 퍼), 말랑 = 비 오는 날파 반투명 파란 젤리
import * as THREE from 'three';
import { mergeGeometries } from 'three/addons/utils/BufferGeometryUtils.js';
const eyeWhite = new THREE.MeshStandardMaterial({ color: 0xffffff, roughness: 0.25 });
const pupilMat = new THREE.MeshStandardMaterial({ color: 0x1b2240, roughness: 0.15 });
function makeEyes(z, spread, size) {
const g = new THREE.Group();
const pupils = [];
for (const sx of [-1, 1]) {
const w = new THREE.Mesh(new THREE.SphereGeometry(size, 32, 24), eyeWhite);
w.scale.set(1, 1.15, 0.7);
w.position.set(sx * spread, 0, z);
const p = new THREE.Mesh(new THREE.SphereGeometry(size * 0.55, 24, 16), pupilMat);
p.position.set(sx * spread, 0, z + size * 0.62);
g.add(w, p);
pupils.push(p);
}
g.userData.pupils = pupils;
g.userData.base = pupils.map((p) => p.position.x);
return g;
}
// 털 노이즈는 고정 시드라 어느 프레임을 먼저 그려도 같다
let noiseTex = null;
function noise() {
if (noiseTex) return noiseTex;
const n = 128, data = new Uint8Array(n * n * 4);
let seed = 1234567;
const rnd = () => ((seed = (seed * 16807) % 2147483647) / 2147483647);
for (let i = 0; i < n * n; i++) { const v = Math.floor(rnd() * 255); data.set([v, v, v, 255], i * 4); }
noiseTex = new THREE.DataTexture(data, n, n, THREE.RGBAFormat);
noiseTex.wrapS = noiseTex.wrapT = THREE.RepeatWrapping;
noiseTex.magFilter = noiseTex.minFilter = THREE.NearestFilter;
noiseTex.needsUpdate = true;
return noiseTex;
}
const furVert = `
uniform float uLayer; varying vec2 vUv; varying vec3 vN; varying vec3 vView; varying float vL;
void main(){
vUv = uv; vL = uLayer;
vec3 p = position + normal * uLayer * 0.17;
p.y -= uLayer * uLayer * 0.04;
vN = normalize(normalMatrix * normal);
vec4 mv = modelViewMatrix * vec4(p, 1.0);
vView = -mv.xyz;
gl_Position = projectionMatrix * mv;
}`;
const furFrag = `
uniform sampler2D uNoise; uniform vec3 uRoot; uniform vec3 uTip; uniform vec3 uWarm;
uniform float uTint; uniform float uNight;
varying vec2 vUv; varying vec3 vN; varying vec3 vView; varying float vL;
void main(){
float n = texture2D(uNoise, vUv * vec2(70.0, 36.0)).r;
if (vL > 0.0 && n < vL * 0.98) discard;
vec3 N = normalize(vN);
float d = max(dot(N, normalize(vec3(0.4, 0.7, 0.6))), 0.0);
float rim = pow(1.0 - max(dot(N, normalize(vView)), 0.0), 2.2);
vec3 c = mix(uRoot, uTip, vL);
c = mix(c, uWarm * mix(0.7, 1.1, vL), uTint * 0.6);
vec3 col = c * (0.42 + 0.8 * d) * mix(0.45, 1.0, vL) + rim * 0.35 * mix(uTip, uWarm, uTint);
col *= mix(1.0, 0.62, uNight);
gl_FragColor = vec4(col, 1.0);
#include <colorspace_fragment>
}`;
let furGeo = null;
function fur() {
if (furGeo) return furGeo;
const parts = [new THREE.SphereGeometry(0.78, 64, 48)];
for (let k = 0; k < 8; k++) { const a = (k / 8) * Math.PI * 2 + Math.PI / 8; const g = new THREE.SphereGeometry(0.44, 48, 32); g.translate(Math.cos(a) * 0.8, Math.sin(a) * 0.8, 0); parts.push(g); }
for (let k = 0; k < 5; k++) { const a = (k / 5) * Math.PI * 2; const g = new THREE.SphereGeometry(0.36, 48, 32); g.translate(Math.cos(a) * 0.4, Math.sin(a) * 0.4, 0.48); parts.push(g); }
furGeo = mergeGeometries(parts);
return furGeo;
}
/** 보송. 돌려주는 값: { group, eyes, uniforms(uTint 0~1 노을, uNight 0~1 밤) } */
export function makeBosong(shells = 34) {
const uniforms = { uNoise: { value: noise() }, uRoot: { value: new THREE.Color(0x1f8a1a) }, uTip: { value: new THREE.Color(0x8ef06a) }, uWarm: { value: new THREE.Color(0xff9a4a) }, uTint: { value: 0 }, uNight: { value: 0 } };
const group = new THREE.Group();
const body = new THREE.Group();
for (let i = 0; i < shells; i++) {
const mat = new THREE.ShaderMaterial({ uniforms: { ...uniforms, uLayer: { value: i / (shells - 1) } }, vertexShader: furVert, fragmentShader: furFrag });
const m = new THREE.Mesh(fur(), mat);
m.renderOrder = i;
body.add(m);
}
group.add(body);
const eyes = makeEyes(1.05, 0.13, 0.1);
eyes.position.y = 0.06;
group.add(eyes);
return { group, eyes, uniforms };
}
/** 말랑. 돌려주는 값: { group, eyes, arms, front, back } — front.color 를 바꾸면 전체 색이 바뀐다 */
export function makeMalang(envMap) {
const group = new THREE.Group();
const body = new THREE.Group();
const front = new THREE.MeshPhysicalMaterial({ color: 0x7cbcff, transparent: true, opacity: 0.58, roughness: 0.06, metalness: 0, clearcoat: 1, clearcoatRoughness: 0.04, envMapIntensity: 1.6, iridescence: 0.25, depthWrite: false, envMap });
const back = front.clone();
back.side = THREE.BackSide;
back.opacity = 0.32;
const coreMat = new THREE.MeshPhysicalMaterial({ color: 0xbfe0ff, transparent: true, opacity: 0.45, roughness: 0.3, depthWrite: false, envMap });
const addJelly = (geo, parent) => { const b = new THREE.Mesh(geo, back); b.renderOrder = 1; const f = new THREE.Mesh(geo, front); f.renderOrder = 3; parent.add(b, f); };
const center = new THREE.SphereGeometry(0.72, 64, 48);
center.scale(1, 0.95, 0.72);
addJelly(center, body);
const core = new THREE.Mesh(new THREE.SphereGeometry(0.42, 40, 30), coreMat);
core.scale.set(1, 0.9, 0.6); core.position.set(0.12, -0.1, -0.1); core.renderOrder = 2;
body.add(core);
const arms = [];
for (let k = 0; k < 6; k++) {
const a = Math.PI / 2 + (k / 6) * Math.PI * 2 + (k % 2 ? 0.08 : -0.05);
const arm = new THREE.Group();
const stem = new THREE.CapsuleGeometry(0.2 + (k % 3) * 0.02, 0.62, 12, 24);
stem.rotateZ(-Math.PI / 2); stem.translate(0.78, 0, 0); stem.scale(1, 1, 0.8);
addJelly(stem, arm);
const tip = new THREE.SphereGeometry(0.27, 40, 30);
tip.scale(1, 1, 0.8); tip.translate(1.18, 0, 0);
addJelly(tip, arm);
arm.rotation.z = a; arm.userData.a = a;
arms.push(arm);
body.add(arm);
}
group.add(body);
const eyes = makeEyes(0.6, 0.15, 0.1);
eyes.position.set(0.05, -0.02, 0);
group.add(eyes);
return { group, eyes, arms, front, back };
}
export const JELLY = { blue: new THREE.Color(0x7cbcff), warm: new THREE.Color(0xffb27a), night: new THREE.Color(0x5b78c8) };
/** 숨쉬기·팔 흔들기: t 의 함수 */
export function animate(b, m, t, phase = 0) {
b.group.rotation.set(Math.sin(t * 1.3 + phase) * 0.06, Math.sin(t * 0.9 + phase) * 0.18, Math.sin(t * 1.7 + phase) * 0.03);
m.group.rotation.set(Math.sin(t * 1.3 + phase + 1.7) * 0.06, Math.sin(t * 0.9 + phase + 1.7) * 0.18, Math.sin(t * 1.7 + phase + 1.7) * 0.03);
m.arms.forEach((arm, i) => { arm.rotation.z = arm.userData.a + Math.sin(t * 2.6 + i * 1.1) * 0.07; arm.scale.setScalar(1 + Math.sin(t * 3.1 + i) * 0.04); });
}
+19
View File
@@ -0,0 +1,19 @@
<!doctype html><html><head><meta charset="utf-8">
<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>html,body{margin:0;background:transparent}canvas{display:block}</style></head><body>
<canvas id="c" width="1200" height="600"></canvas>
<script type="module">
import * as THREE from 'three';
import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
import { makeBosong, makeMalang } from './assets/characters.js';
const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('c'), alpha: true, antialias: true, premultipliedAlpha: true });
renderer.setPixelRatio(1); renderer.setSize(1200, 600, false); renderer.setClearColor(0x000000, 0);
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(30, 2, 0.1, 100); camera.position.set(0, 0, 11);
const env = new THREE.PMREMGenerator(renderer).fromScene(new RoomEnvironment(), 0.04).texture;
scene.add(new THREE.HemisphereLight(0xffffff, 0x8aa0c8, 1.5)); const key = new THREE.DirectionalLight(0xffffff, 2.2); key.position.set(3, 5, 8); scene.add(key);
const b = makeBosong(), m = makeMalang(env);
b.group.position.set(-2.6, 0, 0); b.group.scale.setScalar(1.25); m.group.position.set(2.6, 0, 0); m.group.scale.setScalar(1.2);
scene.add(b.group, m.group);
renderer.render(scene, camera); document.title = 'ready';
</script></body></html>
+9 -14
View File
@@ -3,29 +3,24 @@
@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 { position: absolute; left: 90px; top: 300px; width: 900px; margin: 0; font: 400 118px/1.18 'Jua', sans-serif; letter-spacing: -2px; color: #fff; text-shadow: 0 6px 22px rgba(10, 14, 40, 0.7); 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; }
#o5-chip { position: absolute; left: 0; right: 0; top: 1130px; margin: 0 auto; width: max-content; padding: 22px 44px; border-radius: 32px; background: #d4552a; color: #fff; font: 800 64px/1 'Pretendard', sans-serif; letter-spacing: -1px; box-shadow: 0 12px 34px rgba(212, 85, 42, 0.4); white-space: nowrap; transform-origin: 50% 50%; }
#o5-sub { position: absolute; left: 90px; top: 1250px; width: 900px; margin: 0; text-align: center; font: 700 48px/1.3 'Pretendard', sans-serif; letter-spacing: -1px; color: #dfe6ff; text-shadow: 0 4px 18px rgba(10, 14, 40, 0.7); word-break: keep-all; }
</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>
<div id="o5-world" class="clip" data-start="0" data-duration="3">
<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>
<p id="o5-sub">동네마다 점수가 달라요</p>
</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);
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.3);
tl.fromTo("#o5-chip", { scale: 0.4, opacity: 0 }, { scale: 1, opacity: 1, duration: 0.45, ease: "back.out(1.6)" }, 1.3);
tl.fromTo("#o5-sub", { opacity: 0, filter: "blur(8px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.2, ease: "power4.out" }, 1.6);
tl.to(["#o5-title", "#o5-chip", "#o5-sub"], { opacity: 0, filter: "blur(8px)", duration: 0.2, ease: "power3.in" }, 2.75);
window.__timelines["o5"] = tl;
</script>
</template>
-5
View File
@@ -9,8 +9,6 @@
#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">
@@ -19,8 +17,6 @@
<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>
@@ -30,7 +26,6 @@
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>
+28 -1
View File
@@ -28,6 +28,8 @@
<script type="module">
import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
import { makeBosong, makeMalang, JELLY, animate as animateChars } from './assets/characters.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; }; }
@@ -74,7 +76,7 @@
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 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, nightIcons: 0, chars: 1, charsEnd: 0, iconWalk: 0, iconCamp: 0, iconSunset: 0, rain: 0 };
const tex = new THREE.TextureLoader();
const sprite = (name, s) => {
@@ -88,7 +90,14 @@
// 하늘에 뜬 날씨각 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 envTex = new THREE.PMREMGenerator(renderer).fromScene(new RoomEnvironment(), 0.04).texture;
const bosongA = makeBosong(), malangA = makeMalang(envTex);
const bosongB = makeBosong(22), malangB = makeMalang(envTex);
scene.add(bosongA.group, malangA.group);
const walkIcon = sprite('walk', 2.2), campIcon = sprite('camping', 2.2), sunsetIcon = sprite('sunset', 2.6);
// 밤하늘의 각 무리 (폰 화면 대신): 68가지 중 아홉
const NIGHT = [['hangang', -4.2, 2.0, 2.2], ['drive', 3.8, 3.2, 2.0], ['walk', -1.2, 5.2, 1.8], ['camping', 4.6, 7.4, 1.9], ['stars', -4.8, 8.6, 2.0], ['running', 1.4, 0.6, 1.6], ['laundry', -3.4, -1.6, 1.5], ['bike', 5.2, -0.4, 1.6], ['picnic', 0.6, 9.8, 1.7]].map(([n, x, y, sc], i) => { const o = sprite(n, sc * 1.45); o.userData = { x, y, phase: i * 0.9, sc: sc * 1.45 }; return o; });
// 구름: 날씨각 Fluent 3D 구름
const cloudTex = tex.load('assets/icons/cloud.png');
@@ -127,6 +136,9 @@
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);
// 섬 위에 서 있는 보송·말랑 (섬과 함께 돈다)
bosongB.group.position.set(-0.85, 1.42, 1.25); bosongB.group.scale.setScalar(0.36); island.add(bosongB.group);
malangB.group.position.set(0.9, 1.5, 1.35); malangB.group.scale.setScalar(0.34); island.add(malangB.group);
island.position.set(0, -2.6, -118); island.scale.setScalar(2.0); island.rotation.x = 0.05;
scene.add(island);
})();
@@ -141,6 +153,7 @@
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(5.6, 0.5, { chars: 0 }, 'power2.in');
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 });
@@ -161,6 +174,9 @@
// 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');
at(15.0, 0.9, { nightIcons: 1 }, 'back.out(1.4)');
at(17.7, 0.7, { charsEnd: 1 }, 'back.out(1.3)');
at(17.3, 0.3, { nightIcons: 0 }, 'power2.in');
tl.to({}, { duration: 0.1 }, 20.9);
const warm = new THREE.Color(0xffa060), noon = new THREE.Color(0xffffff), dusk = new THREE.Color(0xff6a6a);
@@ -193,6 +209,17 @@
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));
NIGHT.forEach((o, i) => { const k = C.clamp(S.nightIcons - i * 0.06, 0, 1); o.material.opacity = k; o.scale.setScalar(o.userData.sc * (0.3 + 0.7 * k)); o.position.set(S.camX + o.userData.x, S.lookY + o.userData.y - 2 + Math.sin(t * 1.1 + o.userData.phase) * 0.15, S.camZ - 30); });
// 카메라 앞 보송·말랑: 첫 장면엔 아래 양쪽, 섬 장면엔 화면 밖(아래), 밤엔 다시 올라온다
{ const up = Math.max(S.chars, S.nightIcons, S.charsEnd), drop = (1 - up) * 7;
bosongA.group.position.set(S.camX - 1.55, S.camY - 1.25 - drop + Math.sin(t * 1.3) * 0.08, S.camZ - 7.5); bosongA.group.scale.setScalar(0.66);
malangA.group.position.set(S.camX + 1.6, S.camY - 1.2 - drop + Math.sin(t * 1.3 + 1.7) * 0.08, S.camZ - 7.5); malangA.group.scale.setScalar(0.64);
bosongA.group.lookAt(camera.position); malangA.group.lookAt(camera.position);
animateChars(bosongA, malangA, t, 0); animateChars(bosongB, malangB, t, 2.1);
const warm = C.clamp(S.mood - 2, 0, 1) * (1 - C.clamp(S.mood - 3, 0, 1)), nightK = C.clamp(S.mood - 3, 0, 1);
for (const b of [bosongA, bosongB]) { b.uniforms.uTint.value = warm; b.uniforms.uNight.value = nightK; }
for (const m of [malangA, malangB]) { m.front.color.copy(JELLY.blue).lerp(JELLY.warm, warm * 0.75).lerp(JELLY.night, nightK * 0.5); m.back.color.copy(m.front.color); }
}
starMat.opacity = S.stars;
island.visible = S.island > 0.01;
island.rotation.y = -0.6 + S.spin * 0.9;
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

+28 -23
View File
@@ -526,8 +526,8 @@
z-index: 2;
filter: drop-shadow(0 18px 14px #28304a22);
}
.intro-cover .rabbit { left: 250px; top: 810px; transform: rotate(-9deg); }
.intro-cover .bear { right: 235px; top: 830px; transform: rotate(8deg); }
.intro-cover .rabbit { width: 440px; height: 440px; left: 90px; top: 700px; transform: rotate(-6deg); }
.intro-cover .bear { width: 420px; height: 420px; right: 90px; top: 730px; transform: rotate(6deg); }
.intro .intro-turn {
position: absolute;
bottom: 90px;
@@ -581,22 +581,28 @@
.intro-sky .intro-title { top: 205px; }
.intro-home .intro-sub,
.intro-sky .intro-sub { top: 450px; font-size: 42px; }
.intro-phone {
position: absolute;
overflow: hidden;
width: 390px;
height: 844px;
box-sizing: border-box;
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: 36px; }
.intro-phone.home,
.intro-phone.sky { top: 620px; left: 345px; }
/* 3D 릴스 스틸 무대: 둥근 모서리, 폰 틀 없음 */
.intro-stage { position: absolute; left: 90px; top: 600px; width: 900px; height: 620px; overflow: hidden; border-radius: 48px; box-shadow: 0 24px 60px #28304a2e; }
.intro-stage img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; }
.intro-stage.cta { top: 640px; height: 560px; }
.intro-stage .intro-app { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 60px; box-shadow: 0 24px 60px #0a0e2866; }
.intro-rank { position: absolute; left: 36px; right: 36px; bottom: 24px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.intro-rank li { display: flex; align-items: center; gap: 14px; padding: 8px 22px 8px 14px; border-radius: 22px; background: #ffffffee; color: var(--ink); font: 800 34px/1 'Pretendard Variable', Pretendard, sans-serif; letter-spacing: -1px; }
.intro-rank em { font-style: normal; font-size: 30px; color: var(--muted); min-width: 56px; }
.intro-rank img { width: 52px; height: 52px; }
.intro-rank b { margin-left: auto; font-size: 44px; color: var(--rust); }
.intro-chips { position: absolute; left: 36px; top: 36px; display: flex; flex-direction: column; gap: 12px; }
.intro-chips span { display: inline-flex; align-items: center; gap: 12px; width: max-content; padding: 14px 26px 14px 16px; border-radius: 24px; background: #ffffffee; color: var(--ink); font: 800 40px/1 'Pretendard Variable', Pretendard, sans-serif; letter-spacing: -1px; }
.intro-chips img { width: 56px; height: 56px; }
.intro-features { position: absolute; left: 90px; top: 600px; width: 900px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 22px; }
.intro-features li { display: grid; grid-template-columns: 150px 1fr; grid-template-rows: auto auto; column-gap: 24px; align-items: center; padding: 22px 30px; border-radius: 32px; background: #ffffffcc; box-shadow: 0 12px 32px #28304a1a; }
.intro-features img { grid-row: 1 / 3; width: 130px; height: 130px; object-fit: contain; }
.intro-features b { font: 800 50px/1.15 'Pretendard Variable', Pretendard, sans-serif; letter-spacing: -1px; color: var(--ink); }
.intro-features span { font: 600 36px/1.3 'Pretendard Variable', Pretendard, sans-serif; color: var(--muted); }
.intro .intro-character { position: absolute; width: 300px; height: 300px; z-index: 3; }
.intro-home .rabbit, .intro-sky .rabbit { left: -10px; top: 1080px; transform: rotate(-8deg); }
.intro-home .bear, .intro-sky .bear { right: -10px; top: 1090px; transform: rotate(8deg); }
.intro-home .intro-note, .intro-sky .intro-note { left: 240px; right: 240px; top: 1262px; font-size: 32px; text-align: center; color: var(--muted); }
.intro-kinds .intro-title { top: 205px; font-size: 88px; }
.intro-gak-grid {
position: absolute;
@@ -624,7 +630,6 @@
.intro-more .intro-sub { top: 455px; font-size: 44px; }
.intro-more-icons { position: absolute; top: 750px; left: 90px; display: flex; flex-direction: column; gap: 34px; }
.intro-more-icons img { width: 105px; height: 105px; object-fit: contain; }
.intro-phone.week { top: 640px; left: 345px; }
.intro-more-icons { display: none; }
.intro .intro-note {
position: absolute;
@@ -634,10 +639,10 @@
letter-spacing: -1px;
word-break: keep-all;
}
.intro-more .intro-note { top: 1205px; width: 880px; z-index: 2; padding: 12px 18px; border-radius: 18px; background: var(--paper); }
.intro-more .intro-note { top: 1240px; font-size: 34px; color: var(--muted); }
.intro-cta .intro-title { top: 220px; font-size: 105px; }
.intro-cta .intro-sub { top: 470px; font-size: 48px; color: var(--rust); }
.intro-phone.gak { top: 650px; left: 400px; width: 280px; height: 560px; border-width: 6px; border-radius: 34px; }
.intro-cta .rabbit { width: 175px; height: 175px; left: 155px; top: 925px; transform: rotate(-8deg); }
.intro-cta .bear { width: 175px; height: 175px; right: 160px; top: 950px; transform: rotate(8deg); }
.intro-cta .rabbit { left: -10px; top: 1080px; transform: rotate(-8deg); }
.intro-cta .bear { right: -10px; top: 1090px; transform: rotate(8deg); }
.intro-cta .intro-note { left: 240px; right: 240px; text-align: center; }
.intro-cta .intro-note { top: 1250px; font-size: 36px; text-align: center; }
+40 -14
View File
@@ -1,9 +1,10 @@
import type { ReactNode } from 'react'
import tarotBack from '../assets/tarot-back.webp'
import shotHome from '../assets/intro/shot-home.webp'
import shotGak from '../assets/intro/shot-gak.webp'
import shotSky from '../assets/intro/shot-sky.webp'
import shotWeek from '../assets/intro/shot-week.webp'
import stillDay from '../assets/intro/still-day.webp'
import bosong from '../assets/intro/bosong.webp'
import malang from '../assets/intro/malang.webp'
import stillSunset from '../assets/intro/still-sunset.webp'
import stillNight from '../assets/intro/still-night.webp'
import type { CardData } from './data'
import { Frame, Lines } from './Frame'
import { tidy } from './text'
@@ -270,7 +271,9 @@ const intro: Template = {
hashtags: '#날씨각 #날씨 #오늘날씨 #날씨앱 #앱인토스 #토스 #오늘뭐하지 #주말뭐하지 #노을 #노을맛집 #한강 #드라이브 #산책 #날씨타로 #오늘의코디 #서울날씨 #주말나들이 #가을 #일상',
}),
slides: (_d, c) => {
const phone = (src: string, name: string) => <div className={`intro-phone ${name}`}><img src={src} alt="" /></div>
// 3D 릴스 장면 스틸을 둥근 무대에 (폰 프레임·앱 스크린샷은 쓰지 않는다)
const stage = (src: string, name: string, children?: ReactNode) => <div className={`intro-stage ${name}`}><img src={src} alt="" />{children}</div>
const chars = <><img className="intro-character rabbit" src={bosong} alt="" /><img className="intro-character bear" src={malang} alt="" /></>
const head = (text: string, name = '') => <h1 className={`intro-title ${name}`}><Lines text={tidy(text)} /></h1>
const sub = (text: string, name = '') => <p className={`intro-sub ${name}`}><Lines text={tidy(text)} /></p>
const frame = (page: number, className: string, children: ReactNode) => <Frame page={page} total={8} theme={c.theme || 'sky'} className={`intro intro-${className}`} key={page}>{children}</Frame>
@@ -278,8 +281,8 @@ const intro: Template = {
frame(0, 'cover', <>
{head(c.t1)}{sub(c.s1)}
<div className="intro-cover-stage" aria-hidden="true" />
<img className="intro-character rabbit" src={iconUrl('rabbit')} alt="" />
<img className="intro-character bear" src={iconUrl('bear')} alt="" />
<img className="intro-character rabbit" src={bosong} alt="" />
<img className="intro-character bear" src={malang} alt="" />
<p className="intro-turn">넘겨 보세요 →</p>
</>),
frame(1, 'problem', <>
@@ -297,7 +300,18 @@ const intro: Template = {
</div>
{sub(c.s3)}
</>),
frame(3, 'home', <>{head(c.t4)}{sub(c.s4)}{phone(shotHome, 'home')}</>),
frame(3, 'home', <>
{head(c.t4)}{sub(c.s4)}
{stage(stillDay, 'home', (
<ol className="intro-rank">
{[['한강각', 84, 'hangang'], ['드라이브각', 82, 'drive'], ['산책각', 79, 'walk']].map(([n, v, ic], i) => (
<li key={n}><em>{i + 1}위</em><img src={iconUrl(String(ic))} alt="" /><span>{n}</span><b>{v}</b></li>
))}
</ol>
))}
{chars}
<p className="intro-note">10.24 서울 중구 · 실제 점수</p>
</>),
frame(4, 'kinds', <>
{head(c.t5)}
<div className="intro-gak-grid">
@@ -308,18 +322,30 @@ const intro: Template = {
</div>
{sub(c.s5)}
</>),
frame(5, 'sky', <>{head(c.t6)}{sub(c.s6)}{phone(shotSky, 'sky')}</>),
frame(5, 'sky', <>
{head(c.t6)}{sub(c.s6)}
{stage(stillSunset, 'sky', (
<div className="intro-chips">
<span><img src={iconUrl('sunset')} alt="" />노을 피크 18:04</span>
<span>골든아워 17:08 ~ 17:44</span>
</div>
))}
{chars}
<p className="intro-note">10.24 서울 마포구 기준</p>
</>),
frame(6, 'more', <>
{head(c.t7)}{sub(c.s7)}
<div className="intro-more-icons" aria-hidden="true"><img src={iconUrl('maple')} alt="" /><img src={iconUrl('camping')} alt="" /><img src={iconUrl('walk')} alt="" /></div>
{phone(shotWeek, 'week')}
<ul className="intro-features">
<li><img src={iconUrl('party')} alt="" /><b>주말 행사</b><span>이번 주말 가까운 축제</span></li>
<li><img src={iconUrl('maple')} alt="" /><b>단풍·계절</b><span>절정 시기와 계절 상식</span></li>
<li><img src={iconUrl('letter')} alt="" /><b>동네 이야기</b><span>우리 동네 날씨 한마디</span></li>
</ul>
<p className="intro-note"><Lines text={tidy(c.n7)} /></p>
</>),
frame(7, 'cta', <>
{head(c.t8)}{sub(c.s8)}
{phone(shotGak, 'gak')}
<img className="intro-character rabbit" src={iconUrl('rabbit')} alt="" />
<img className="intro-character bear" src={iconUrl('bear')} alt="" />
{stage(stillNight, 'cta', <img className="intro-app" src="/apple-touch-icon.png" alt="" />)}
{chars}
<p className="intro-note"><Lines text={tidy(c.n8)} /></p>
</>),
]