refactor: 캐릭터 이름을 구름·물방울로, 카드 스틸을 글자 없는 3D 장면으로, 앱 스크린샷 파일 삭제
No files matched your search
@@ -1,4 +1,4 @@
|
||||
// 날씨각 캐릭터 (career/shorts/nalssigak-shorts 에서 가져옴): 보송 = 맑은 날파 초록 털뭉치(셸 텍스처 퍼), 말랑 = 비 오는 날파 반투명 파란 젤리
|
||||
// 날씨각 캐릭터 (career/shorts/nalssigak-shorts 에서 가져옴): 구름 캐릭터 = 맑은 날파 초록 털뭉치(셸 텍스처 퍼), 물방울 캐릭터 = 비 오는 날파 반투명 파란 젤리
|
||||
import * as THREE from 'three';
|
||||
import { mergeGeometries } from 'three/addons/utils/BufferGeometryUtils.js';
|
||||
|
||||
@@ -76,8 +76,8 @@ function fur() {
|
||||
return furGeo;
|
||||
}
|
||||
|
||||
/** 보송. 돌려주는 값: { group, eyes, uniforms(uTint 0~1 노을, uNight 0~1 밤) } */
|
||||
export function makeBosong(shells = 34) {
|
||||
/** 구름 캐릭터. 돌려주는 값: { group, eyes, uniforms(uTint 0~1 노을, uNight 0~1 밤) } */
|
||||
export function makeCloud(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();
|
||||
@@ -94,8 +94,8 @@ export function makeBosong(shells = 34) {
|
||||
return { group, eyes, uniforms };
|
||||
}
|
||||
|
||||
/** 말랑. 돌려주는 값: { group, eyes, arms, front, back } — front.color 를 바꾸면 전체 색이 바뀐다 */
|
||||
export function makeMalang(envMap) {
|
||||
/** 물방울 캐릭터. 돌려주는 값: { group, eyes, arms, front, back } — front.color 를 바꾸면 전체 색이 바뀐다 */
|
||||
export function makeDrop(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 });
|
||||
|
||||
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 81 KiB |
@@ -5,14 +5,14 @@
|
||||
<script type="module">
|
||||
import * as THREE from 'three';
|
||||
import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
|
||||
import { makeBosong, makeMalang } from './assets/characters.js';
|
||||
import { makeCloud, makeDrop } 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);
|
||||
const b = makeCloud(), m = makeDrop(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';
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
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';
|
||||
import { makeCloud, makeDrop, 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; }; }
|
||||
@@ -90,11 +90,11 @@
|
||||
// 하늘에 뜬 날씨각 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 cloudA = makeCloud(), dropA = makeDrop(envTex);
|
||||
const cloudB = makeCloud(22), dropB = makeDrop(envTex);
|
||||
scene.add(cloudA.group, dropA.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; });
|
||||
@@ -136,9 +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);
|
||||
// 섬 위에 서 있는 구름·물방울 캐릭터 (섬과 함께 돈다)
|
||||
cloudB.group.position.set(-0.85, 1.42, 1.25); cloudB.group.scale.setScalar(0.36); island.add(cloudB.group);
|
||||
dropB.group.position.set(0.9, 1.5, 1.35); dropB.group.scale.setScalar(0.34); island.add(dropB.group);
|
||||
island.position.set(0, -2.6, -118); island.scale.setScalar(2.0); island.rotation.x = 0.05;
|
||||
scene.add(island);
|
||||
})();
|
||||
@@ -210,15 +210,15 @@
|
||||
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);
|
||||
cloudA.group.position.set(S.camX - 1.55, S.camY - 1.25 - drop + Math.sin(t * 1.3) * 0.08, S.camZ - 7.5); cloudA.group.scale.setScalar(0.66);
|
||||
dropA.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); dropA.group.scale.setScalar(0.64);
|
||||
cloudA.group.lookAt(camera.position); dropA.group.lookAt(camera.position);
|
||||
animateChars(cloudA, dropA, t, 0); animateChars(cloudB, dropB, 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); }
|
||||
for (const b of [cloudA, cloudB]) { b.uniforms.uTint.value = warm; b.uniforms.uNight.value = nightK; }
|
||||
for (const m of [dropA, dropB]) { 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;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"pid":54078,"host":"Minas-MacBook-Pro-2.local","boot":"29824523"}
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 65 KiB |
@@ -526,8 +526,8 @@
|
||||
z-index: 2;
|
||||
filter: drop-shadow(0 18px 14px #28304a22);
|
||||
}
|
||||
.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-cover .char-cloud { width: 440px; height: 440px; left: 90px; top: 700px; transform: rotate(-6deg); }
|
||||
.intro-cover .char-drop { width: 420px; height: 420px; right: 90px; top: 730px; transform: rotate(6deg); }
|
||||
.intro .intro-turn {
|
||||
position: absolute;
|
||||
bottom: 90px;
|
||||
@@ -600,8 +600,8 @@
|
||||
.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 .char-cloud, .intro-sky .char-cloud { left: -10px; top: 1080px; transform: rotate(-8deg); }
|
||||
.intro-home .char-drop, .intro-sky .char-drop { 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 {
|
||||
@@ -642,7 +642,7 @@
|
||||
.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-cta .rabbit { left: -10px; top: 1080px; transform: rotate(-8deg); }
|
||||
.intro-cta .bear { right: -10px; top: 1090px; transform: rotate(8deg); }
|
||||
.intro-cta .char-cloud { left: -10px; top: 1080px; transform: rotate(-8deg); }
|
||||
.intro-cta .char-drop { 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; }
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import tarotBack from '../assets/tarot-back.webp'
|
||||
import stillDay from '../assets/intro/still-day.webp'
|
||||
import bosong from '../assets/intro/bosong.webp'
|
||||
import malang from '../assets/intro/malang.webp'
|
||||
import cloudChar from '../assets/intro/cloud-char.webp'
|
||||
import dropChar from '../assets/intro/drop-char.webp'
|
||||
import stillSunset from '../assets/intro/still-sunset.webp'
|
||||
import stillNight from '../assets/intro/still-night.webp'
|
||||
import type { CardData } from './data'
|
||||
@@ -273,7 +273,7 @@ const intro: Template = {
|
||||
slides: (_d, c) => {
|
||||
// 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 chars = <><img className="intro-character char-cloud" src={cloudChar} alt="" /><img className="intro-character char-drop" src={dropChar} 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>
|
||||
@@ -281,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={bosong} alt="" />
|
||||
<img className="intro-character bear" src={malang} alt="" />
|
||||
<img className="intro-character char-cloud" src={cloudChar} alt="" />
|
||||
<img className="intro-character char-drop" src={dropChar} alt="" />
|
||||
<p className="intro-turn">넘겨 보세요 →</p>
|
||||
</>),
|
||||
frame(1, 'problem', <>
|
||||
|
||||