refactor: 캐릭터 이름을 구름·물방울로, 카드 스틸을 글자 없는 3D 장면으로, 앱 스크린샷 파일 삭제

This commit is contained in:
minaChoi committed 2026-10-24 20:34:55 +09:00
1 parent f2eed74e9d
commit c1d2d7c74a
18 files changed
+33 -34

No files matched your search

+5 -5
View File
@@ -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 });
Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

+2 -2
View File
@@ -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';
+15 -15
View File
@@ -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"}