From f2eed74e9dd9ed8737892fd0d1be94dfa48ccb38 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Sat, 24 Oct 2026 20:26:03 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=82=A0=EC=94=A8=EA=B0=81=20=EC=BA=90?= =?UTF-8?q?=EB=A6=AD=ED=84=B0=20=EB=B3=B4=EC=86=A1=C2=B7=EB=A7=90=EB=9E=91?= =?UTF-8?q?(nalssigak-shorts=20Three.js)=EC=9D=84=203D=20=EB=A6=B4?= =?UTF-8?q?=EC=8A=A4=C2=B7=EC=86=8C=EA=B0=9C=20=EC=B9=B4=EB=93=9C=EC=97=90?= =?UTF-8?q?,=20=EC=B9=B4=EB=93=9C=EC=97=90=EC=84=9C=20=ED=8F=B0=20?= =?UTF-8?q?=ED=94=84=EB=A0=88=EC=9E=84=C2=B7=EC=8A=A4=ED=81=AC=EB=A6=B0?= =?UTF-8?q?=EC=83=B7=20=EC=A0=9C=EA=B1=B0(3D=20=EC=8A=A4=ED=8B=B8=20?= =?UTF-8?q?=EB=AC=B4=EB=8C=80=C2=B7=EC=88=9C=EC=9C=84=C2=B7=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=ED=83=80=EC=9D=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/reels/intro3d/assets/characters.js | 141 +++++++++++++++++++++++ admin/reels/intro3d/chars.html | 19 +++ admin/reels/intro3d/compositions/o5.html | 23 ++-- admin/reels/intro3d/compositions/o6.html | 5 - admin/reels/intro3d/index.html | 29 ++++- admin/src/assets/intro/bosong.webp | Bin 0 -> 48676 bytes admin/src/assets/intro/malang.webp | Bin 0 -> 17758 bytes admin/src/assets/intro/shot-gak.webp | Bin 113436 -> 112690 bytes admin/src/assets/intro/shot-home.webp | Bin 83722 -> 83400 bytes admin/src/assets/intro/shot-sky.webp | Bin 83572 -> 82708 bytes admin/src/assets/intro/shot-week.webp | Bin 148388 -> 146216 bytes admin/src/assets/intro/still-day.webp | Bin 0 -> 44942 bytes admin/src/assets/intro/still-night.webp | Bin 0 -> 36188 bytes admin/src/assets/intro/still-sunset.webp | Bin 0 -> 53146 bytes admin/src/cards/cards.css | 51 ++++---- admin/src/cards/templates.tsx | 54 ++++++--- 16 files changed, 265 insertions(+), 57 deletions(-) create mode 100644 admin/reels/intro3d/assets/characters.js create mode 100644 admin/reels/intro3d/chars.html create mode 100644 admin/src/assets/intro/bosong.webp create mode 100644 admin/src/assets/intro/malang.webp create mode 100644 admin/src/assets/intro/still-day.webp create mode 100644 admin/src/assets/intro/still-night.webp create mode 100644 admin/src/assets/intro/still-sunset.webp diff --git a/admin/reels/intro3d/assets/characters.js b/admin/reels/intro3d/assets/characters.js new file mode 100644 index 0000000..e8f856c --- /dev/null +++ b/admin/reels/intro3d/assets/characters.js @@ -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 + }`; + +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); }); +} diff --git a/admin/reels/intro3d/chars.html b/admin/reels/intro3d/chars.html new file mode 100644 index 0000000..b174257 --- /dev/null +++ b/admin/reels/intro3d/chars.html @@ -0,0 +1,19 @@ + + + + + diff --git a/admin/reels/intro3d/compositions/o5.html b/admin/reels/intro3d/compositions/o5.html index 95549ab..60aba74 100644 --- a/admin/reels/intro3d/compositions/o5.html +++ b/admin/reels/intro3d/compositions/o5.html @@ -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; }
-
+

지금내동네
1위는?

-

실제 화면 · 10.24 마포구

-
날씨각 홈 화면
68가지 각
+

동네마다 점수가 달라요

diff --git a/admin/reels/intro3d/compositions/o6.html b/admin/reels/intro3d/compositions/o6.html index aa2f767..10bde32 100644 --- a/admin/reels/intro3d/compositions/o6.html +++ b/admin/reels/intro3d/compositions/o6.html @@ -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; }
@@ -19,8 +17,6 @@

설치 없이 바로, 무료

weather.o2o.kr

토스 앱에서 '날씨각' 검색해도 열려요

- -
diff --git a/admin/reels/intro3d/index.html b/admin/reels/intro3d/index.html index 4e8a2ee..975f76a 100644 --- a/admin/reels/intro3d/index.html +++ b/admin/reels/intro3d/index.html @@ -28,6 +28,8 @@