hwihwalab commited on
Commit
dc82bb3
ยท
verified ยท
1 Parent(s): 1aa6d73

feat(wasm): deploy real 60FPS MuJoCo WebAssembly physics engine (Zero Docker, Zero GIFs)

Browse files
app.js CHANGED
@@ -846,8 +846,8 @@ class EngineLoadingManager {
846
  this.isReady = false;
847
  this.isDismissed = false;
848
  this.startTime = performance.now();
849
- this.minDurationMs = 1600; // Minimum 1.6s pacing so users can comfortably perceive milestones
850
- this.holdDurationMs = 550; // Hold at 100% for 550ms so user clearly perceives completion
851
  this.timer = null;
852
  this.overlay = null;
853
  this._startTicker();
@@ -882,15 +882,16 @@ class EngineLoadingManager {
882
  // Desired progress based on minimum pacing and actual milestone
883
  let desired = this.targetVal;
884
  if (!this.isReady) {
885
- // Smoothly pace progress up to 94% until physical engine is 100% ready
886
- desired = Math.min(94, Math.max(this.targetVal, timeRatio * 92));
887
  } else {
888
  // Once engine is ready, glide smoothly all the way to 100%
889
  desired = 100;
890
  }
891
 
892
  if (this.currentVal < desired) {
893
- const step = Math.max(0.5, (desired - this.currentVal) * 0.14);
 
894
  this.currentVal = Math.min(desired, this.currentVal + step);
895
  }
896
 
@@ -976,7 +977,7 @@ async function initWasmEngine() {
976
  try {
977
  if (!MujocoWasmPlayer) {
978
  engineLoadingMgr.setProgress(50, "๐Ÿ“ฆ MuJoCo WebAssembly ๋ชจ๋“ˆ ๋กœ๋”ฉ ์ค‘...", "๐Ÿ“ฆ Loading MuJoCo WASM Module...");
979
- const mod = await import(withSign("./mujoco_wasm_player.js?v=20261107_v14"));
980
  MujocoWasmPlayer = mod.MujocoWasmPlayer;
981
  }
982
  wasmPlayer = new MujocoWasmPlayer(container);
 
846
  this.isReady = false;
847
  this.isDismissed = false;
848
  this.startTime = performance.now();
849
+ this.minDurationMs = 1800; // Minimum 1.8s pacing so users can comfortably perceive milestones
850
+ this.holdDurationMs = 650; // Hold at 100% for 650ms so user clearly perceives completion
851
  this.timer = null;
852
  this.overlay = null;
853
  this._startTicker();
 
882
  // Desired progress based on minimum pacing and actual milestone
883
  let desired = this.targetVal;
884
  if (!this.isReady) {
885
+ // Smoothly pace progress up to 92% until physical engine is 100% ready
886
+ desired = Math.min(92, Math.max(this.targetVal, timeRatio * 90));
887
  } else {
888
  // Once engine is ready, glide smoothly all the way to 100%
889
  desired = 100;
890
  }
891
 
892
  if (this.currentVal < desired) {
893
+ // Steady, comfortable step so numbers are clearly readable (never jump wildly)
894
+ const step = Math.min(1.6, Math.max(0.4, (desired - this.currentVal) * 0.09));
895
  this.currentVal = Math.min(desired, this.currentVal + step);
896
  }
897
 
 
977
  try {
978
  if (!MujocoWasmPlayer) {
979
  engineLoadingMgr.setProgress(50, "๐Ÿ“ฆ MuJoCo WebAssembly ๋ชจ๋“ˆ ๋กœ๋”ฉ ์ค‘...", "๐Ÿ“ฆ Loading MuJoCo WASM Module...");
980
+ const mod = await import(withSign("./mujoco_wasm_player.js?v=20261107_v15"));
981
  MujocoWasmPlayer = mod.MujocoWasmPlayer;
982
  }
983
  wasmPlayer = new MujocoWasmPlayer(container);
assets/anim_01.gif ADDED

Git LFS Details

  • SHA256: 78f9d0531dc68e7237cd094211e33a7189ebb28b7420e1eb9a20f5cc92c4953e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.56 MB
assets/anim_02.gif ADDED

Git LFS Details

  • SHA256: ae228a9f60d90efd2702f12210d2e3280deb7de889df9289dadf7c4058affde9
  • Pointer size: 132 Bytes
  • Size of remote file: 1.27 MB
assets/anim_03.gif ADDED

Git LFS Details

  • SHA256: 51ce89892a69bbfd5526d2df197be3b57ed1d4734269db61046f40379ad42031
  • Pointer size: 131 Bytes
  • Size of remote file: 858 kB
assets/anim_04.gif ADDED

Git LFS Details

  • SHA256: cee0b6c042a8445414a301e75fd391d29cb4fc362ed664f290e8e255e9b9435e
  • Pointer size: 131 Bytes
  • Size of remote file: 958 kB
assets/anim_05.gif ADDED

Git LFS Details

  • SHA256: bfda3c9869621623f63b822aac039765b5f7c77e240136864b054c6e63011732
  • Pointer size: 132 Bytes
  • Size of remote file: 1.19 MB
assets/anim_06.gif ADDED

Git LFS Details

  • SHA256: 760deddbeae619d194f7935572a4ab1ed42483350dffca6512ec3493a8656ab6
  • Pointer size: 131 Bytes
  • Size of remote file: 951 kB
assets/anim_07.gif ADDED

Git LFS Details

  • SHA256: 9b2db9772cd7296adcabcd044b918635dbb67bd75ce80932137e9a696bd5f183
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB
assets/anim_08.gif ADDED

Git LFS Details

  • SHA256: f7b4deef955f8a821e0c3d51aa84da25efc2883de5bd71ee76f7109579d19cd1
  • Pointer size: 132 Bytes
  • Size of remote file: 1.65 MB
assets/anim_09.gif ADDED

Git LFS Details

  • SHA256: 7f9975916ae50d7d715fbf4a63a8b19314121914b3c058b55ffc492eb57ef9a4
  • Pointer size: 131 Bytes
  • Size of remote file: 845 kB
assets/anim_10.gif ADDED

Git LFS Details

  • SHA256: 757a42f9747c5688dc90f1368a8e53ecd983a899b1b712024ddd72729d9f290d
  • Pointer size: 131 Bytes
  • Size of remote file: 987 kB
assets/cleared_03.png ADDED
assets/cleared_06.png ADDED
assets/cleared_10.png ADDED
assets/game01.png ADDED
assets/game02.png ADDED
assets/game03.png ADDED
assets/game04.png ADDED
assets/game05.png ADDED
assets/game06.png ADDED
assets/game07.png ADDED
assets/game08.png ADDED
assets/game09.png ADDED
assets/game10.png ADDED
index.html CHANGED
@@ -6,7 +6,7 @@
6
  <title>Jelly Bean PlayEngine ยท 10 Pop Physics | HWIHWA LAB</title>
7
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
8
  <link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Jua&family=Noto+Sans+KR:wght@400;500;700&family=Nunito:wght@600;700;800;900&family=JetBrains+Mono:wght@600;700&display=swap" rel="stylesheet">
9
- <link rel="stylesheet" href="style.css?v=20261107_v14">
10
  <!-- Three.js WebGL Engine for 60 FPS Client-Side Real-time Simulation -->
11
  <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.min.js"></script>
12
  </head>
@@ -360,7 +360,7 @@
360
  ================================================================ -->
361
  <script>
362
  (function () {
363
- var VER = "20261107_v14";
364
  var GAMES = [
365
  [1, "BEAN PARTY", "Jelly Bean Skydiving Party", "01 ยท ์ ค๋ฆฌ๋นˆ ์Šค์นด์ด๋‹ค์ด๋น™ ํŒŒํ‹ฐ"],
366
  [2, "BALL POOL", "Jelly Bean Ball Pool Pinball", "02 ยท ์ ค๋ฆฌ๋นˆ ๋ณผํ’€์žฅ & ํ•€๋ณผ ํ”Œ๋ฆฌํผ"],
 
6
  <title>Jelly Bean PlayEngine ยท 10 Pop Physics | HWIHWA LAB</title>
7
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
8
  <link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Jua&family=Noto+Sans+KR:wght@400;500;700&family=Nunito:wght@600;700;800;900&family=JetBrains+Mono:wght@600;700&display=swap" rel="stylesheet">
9
+ <link rel="stylesheet" href="style.css?v=20261107_v15">
10
  <!-- Three.js WebGL Engine for 60 FPS Client-Side Real-time Simulation -->
11
  <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.min.js"></script>
12
  </head>
 
360
  ================================================================ -->
361
  <script>
362
  (function () {
363
+ var VER = "20261107_v15";
364
  var GAMES = [
365
  [1, "BEAN PARTY", "Jelly Bean Skydiving Party", "01 ยท ์ ค๋ฆฌ๋นˆ ์Šค์นด์ด๋‹ค์ด๋น™ ํŒŒํ‹ฐ"],
366
  [2, "BALL POOL", "Jelly Bean Ball Pool Pinball", "02 ยท ์ ค๋ฆฌ๋นˆ ๋ณผํ’€์žฅ & ํ•€๋ณผ ํ”Œ๋ฆฌํผ"],
mujoco_wasm_player.js CHANGED
@@ -124,48 +124,49 @@ export class MujocoWasmPlayer {
124
  this.renderer.shadowMap.enabled = true;
125
  this.renderer.shadowMap.type = THREE.PCFSoftShadowMap;
126
 
127
- // โ˜… ํ•ต์‹ฌ: ์—์…‹ ์›๋ณธ์˜ ์‚ฐ๋œปํ•˜๊ณ  ํ™”์‚ฌํ•œ ์บ”๋”” ์ปฌ๋Ÿฌ 100% ์žฌํ˜„ (๋ชจ๋‹ˆํ„ฐ ๊ฐ๋งˆ ์•”์ „ ์™œ๊ณก ๋ฐฉ์ง€)
128
  this.renderer.toneMapping = THREE.NoToneMapping;
129
- if (typeof THREE.SRGBColorSpace !== 'undefined') {
130
- this.renderer.outputColorSpace = THREE.SRGBColorSpace;
131
  }
132
 
133
  // Camera (Z-up coordinate space to match MuJoCo native physics)
134
  this.camera = new THREE.PerspectiveCamera(45, (this.canvas.width || 640) / (this.canvas.height || 480), 0.05, 50);
135
  this.camera.up.set(0, 0, 1);
136
 
137
- // โ˜… 5-Way High-Key Carnival Studio Lighting: ์—์…‹ ์ด๋ฏธ์ง€์™€ 1:1 ์ผ์น˜ํ•˜๋Š” ๋ˆˆ๋ถ€์‹œ๊ณ  ์จํ•œ ์กฐ๋ช…
138
- // 1. ํ—ค๋“œ๋ผ์ดํŠธ ์•ฐ๋น„์–ธํŠธ: ๋ฐ”๋‹ฅ๊ณผ ์Œ์˜ ์˜์—ญ์„ ๋ฐ๊ณ  ํ™”์‚ฌํ•˜๊ฒŒ ์œ ์ง€ (์น™์น™ํ•œ ํšŒ์ƒ‰ ์•”์ „ ์›์ฒœ ์ฐจ๋‹จ)
139
- const ambientLight = new THREE.AmbientLight(0xffffff, 1.15);
140
  this.scene.add(ambientLight);
141
 
142
- // 2. ํ—ค๋ฏธ์Šคํ”ผ์–ด ๋ผ์ดํŠธ: ํ•˜๋Š˜๋น› ๋ผ์ผ๋ฝ & ๋ฐ”๋‹ฅ ๋ฐ˜์‚ฌ๊ด‘
143
- const hemiLight = new THREE.HemisphereLight(0xfff6fe, 0xf0f4ff, 0.60);
144
  hemiLight.position.set(0, 0, 10);
145
  this.scene.add(hemiLight);
146
 
147
- // 3. ์ฃผ๊ด‘ (Key Light): ๋ถ€๋“œ๋Ÿฌ์šด ์†Œํ”„ํŠธ ์„€๋„์šฐ๋ฅผ ๋“œ๋ฆฌ์šฐ๋Š” ๋ฉ”์ธ ์ŠคํŠœ๋””์˜ค ๋ผ์ดํŠธ
148
- const dirLight = new THREE.DirectionalLight(0xffffff, 0.80);
149
- dirLight.position.set(1.5, -3.2, 5.5);
150
  dirLight.castShadow = true;
151
  dirLight.shadow.mapSize.width = 2048;
152
  dirLight.shadow.mapSize.height = 2048;
153
  dirLight.shadow.camera.near = 0.5;
154
- dirLight.shadow.camera.far = 18;
155
- dirLight.shadow.camera.left = -10;
156
- dirLight.shadow.camera.right = 10;
157
- dirLight.shadow.camera.top = 10;
158
- dirLight.shadow.camera.bottom = -10;
159
- dirLight.shadow.bias = -0.0003;
 
160
  this.scene.add(dirLight);
161
 
162
- // 4. ํ›„๋ฐฉ ๋ณด์กฐ๊ด‘ (Fill Light): ์บ๋ฆญํ„ฐ ์‹ค๋ฃจ์—ฃ์— ํ™”์‚ฌํ•œ ์บ”๋”” ์œค๊ณฝ๊ด‘ ํ˜•์„ฑ
163
- const fillLight = new THREE.DirectionalLight(0xffeefa, 0.45);
164
- fillLight.position.set(-2.0, 2.5, 4.0);
165
  this.scene.add(fillLight);
166
 
167
- // 5. ์นด๋ฉ”๋ผ ํ—ค๋“œ๋ผ์ดํŠธ (MuJoCo Native Headlight 1:1): ์นด๋ฉ”๋ผ์™€ ํ•จ๊ป˜ ์ด๋™ํ•˜๋ฉฐ ์บ๋ฆญํ„ฐ ์ •๋ฉด์„ ํ•ญ์ƒ ๋ฐ๊ณ  ์จํ•˜๊ฒŒ ์กฐ๋ช…
168
- const headLight = new THREE.DirectionalLight(0xffffff, 0.40);
169
  headLight.position.set(0, 0, 1);
170
  this.camera.add(headLight);
171
  this.scene.add(this.camera);
@@ -244,6 +245,8 @@ export class MujocoWasmPlayer {
244
 
245
  this.resetGame();
246
  this.updateCameraView();
 
 
247
  }
248
 
249
  buildThreeGeoms() {
@@ -272,31 +275,31 @@ export class MujocoWasmPlayer {
272
  a = this.model.geom_rgba[g * 4 + 3];
273
  }
274
 
275
- // โ˜… ์—์…‹ ์›๋ณธ์˜ ์‚ฐ๋œปํ•˜๊ณ  ํƒฑ๊ธ€ํ•œ ์ ค๋ฆฌ๋นˆ ์งˆ๊ฐ (MuJoCo OpenGL Blinn-Phong 1:1 ์ผ์น˜, ๊ฐ๋งˆ ํƒˆ์ƒ‰ ์ฐจ๋‹จ)
276
  const color = new THREE.Color();
277
  if (type === 0) {
278
  // Floor Plane: ์—์…‹ ์›๋ณธ๊ณผ 100% ๋™์ผํ•œ ์ˆœ๋ฐฑ์ƒ‰ ์บ”๋ฒ„์Šค (RGB 255, 255, 255)
279
  color.setRGB(1.0, 1.0, 1.0);
280
  } else {
281
- if (typeof THREE.SRGBColorSpace !== 'undefined') {
282
- color.setRGB(r, gc, b, THREE.SRGBColorSpace);
283
- } else {
284
- color.setRGB(r, gc, b);
285
- }
286
  }
287
 
 
288
  const mat = new THREE.MeshPhongMaterial({
289
  color: color,
290
- specular: type === 0 ? new THREE.Color(0.04, 0.04, 0.04) : new THREE.Color(0.35, 0.35, 0.35),
291
- shininess: type === 0 ? 0 : 36, // ๋ฐ”๋‹ฅ์€ ๋ง‘๊ณ  ๊นจ๋—ํ•œ ํด๋ฆฐ ๋งคํŠธ, ์ ค๋ฆฌ๋นˆ ์บ๋ฆญํ„ฐ๋Š” ์ด‰์ด‰ํ•˜๊ณ  ์œค๊ธฐ๋‚˜๋Š” ์บ”๋”” ํ•˜์ด๋ผ์ดํŠธ!
292
  transparent: a < 0.99,
293
  opacity: a
294
  });
295
 
296
  let geom = null;
297
  if (type === 0) {
298
- // Plane: ์ง€ํ‰์„ ๊นŒ์ง€ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ด์–ด์ง€๋„๋ก ์ถฉ๋ถ„ํžˆ ๋„“์€ 80m x 80m ๊ด‘์žฅ ํ‰๋ฉด์œผ๋กœ ์ƒ์„ฑ (์ž˜๋ฆฐ ํšŒ์ƒ‰ ์‚ฌ๊ฐํ˜• ๊ฒฝ๊ณ„ ์ œ๊ฑฐ)
299
- geom = new THREE.PlaneGeometry(80, 80);
 
 
300
  } else if (type === 2) {
301
  // Sphere
302
  geom = new THREE.SphereGeometry(size[0], 24, 24);
@@ -393,8 +396,14 @@ export class MujocoWasmPlayer {
393
  this.camera.position.set(0, -0.01, 4.0);
394
  this.camera.lookAt(0, 0, 0.5);
395
  } else {
396
- this.camera.position.set(0, -2.8, 1.3);
397
- this.camera.lookAt(0, 0, 0.5);
 
 
 
 
 
 
398
  }
399
  }
400
  }
@@ -1023,8 +1032,8 @@ export class MujocoWasmPlayer {
1023
  renderLoop(time) {
1024
  if (!this.isRunning) return;
1025
 
1026
- // โ˜… 3D ์ฒซ ํ”„๋ ˆ์ž„ ๋ Œ๋”๋ง ์‹œ ๋กœ๋”ฉ ๋งค๋‹ˆ์ €์— 100% ์™„๋ฃŒ ์‹ ํ˜ธ ์ „๋‹ฌ
1027
- if (!this._firstFrameRendered) {
1028
  this._firstFrameRendered = true;
1029
  if (typeof window !== "undefined" && window.__engineLoadingMgr) {
1030
  window.__engineLoadingMgr.complete();
 
124
  this.renderer.shadowMap.enabled = true;
125
  this.renderer.shadowMap.type = THREE.PCFSoftShadowMap;
126
 
127
+ // โ˜… MuJoCo OpenGL Blinn-Phong 1:1 Color & Lighting Pipeline (anim_07.gif ์›๋ณธ 100% ์ผ์น˜)
128
  this.renderer.toneMapping = THREE.NoToneMapping;
129
+ if (typeof THREE.LinearSRGBColorSpace !== 'undefined') {
130
+ this.renderer.outputColorSpace = THREE.LinearSRGBColorSpace;
131
  }
132
 
133
  // Camera (Z-up coordinate space to match MuJoCo native physics)
134
  this.camera = new THREE.PerspectiveCamera(45, (this.canvas.width || 640) / (this.canvas.height || 480), 0.05, 50);
135
  this.camera.up.set(0, 0, 1);
136
 
137
+ // โ˜… MuJoCo Native Studio Lighting (anim_07.gif 1:1 ์ผ์น˜): ์„ ๋ช…ํ•œ ๋ช…์•”๋น„์™€ ๊นŠ์ด๊ฐ ์žˆ๋Š” ๋“œ๋กญ ์„€๋„์šฐ
138
+ // 1. ํ—ค๋“œ๋ผ์ดํŠธ ์•ฐ๋น„์–ธํŠธ: 0.55 (๊ณผ๋„ํ•œ ํƒˆ์ƒ‰์„ ๋ง‰๊ณ  ์ง„ํ•˜๊ณ  ์„ ๋ช…ํ•œ ์บ”๋”” ์›์ƒ‰ ์œ ์ง€)
139
+ const ambientLight = new THREE.AmbientLight(0xfff7fb, 0.55);
140
  this.scene.add(ambientLight);
141
 
142
+ // 2. ํ—ค๋ฏธ์Šคํ”ผ์–ด ๋ผ์ดํŠธ: ํ•˜๋Š˜๋น› ํŒŒ์Šคํ…” & ๋ฐ”๋‹ฅ ๋ถ€๋“œ๋Ÿฌ์šด ๋ฐ˜์‚ฌ๊ด‘
143
+ const hemiLight = new THREE.HemisphereLight(0xdde8fa, 0xf6f0f8, 0.35);
144
  hemiLight.position.set(0, 0, 10);
145
  this.scene.add(hemiLight);
146
 
147
+ // 3. ์ฃผ๊ด‘ (Key Light): anim_07.gif์™€ 1:1 ์ผ์น˜ํ•˜๋Š” ๊ฐ๋„์™€ ๋˜๋ ทํ•œ ๊ทธ๋ฆผ์ž๋ฅผ ๋“œ๋ฆฌ์šฐ๋Š” ๋ฉ”์ธ ์ŠคํŠœ๋””์˜ค ๋ผ์ดํŠธ
148
+ const dirLight = new THREE.DirectionalLight(0xffffff, 1.25);
149
+ dirLight.position.set(1.6, -3.2, 5.0);
150
  dirLight.castShadow = true;
151
  dirLight.shadow.mapSize.width = 2048;
152
  dirLight.shadow.mapSize.height = 2048;
153
  dirLight.shadow.camera.near = 0.5;
154
+ dirLight.shadow.camera.far = 16;
155
+ dirLight.shadow.camera.left = -5.0;
156
+ dirLight.shadow.camera.right = 5.0;
157
+ dirLight.shadow.camera.top = 5.0;
158
+ dirLight.shadow.camera.bottom = -5.0;
159
+ dirLight.shadow.bias = -0.0004;
160
+ dirLight.shadow.normalBias = 0.02;
161
  this.scene.add(dirLight);
162
 
163
+ // 4. ํ›„๋ฐฉ ๋ณด์กฐ๊ด‘ (Fill Light): ์บ๋ฆญํ„ฐ ์™ธ๊ณฝ ์œค๊ณฝ์„ ์‚ด๋ ค์ฃผ๋Š” ๋ถ€๋“œ๋Ÿฌ์šด ๋ฆผ๋ผ์ดํŠธ
164
+ const fillLight = new THREE.DirectionalLight(0xe8f2ff, 0.35);
165
+ fillLight.position.set(-2.0, 2.5, 3.5);
166
  this.scene.add(fillLight);
167
 
168
+ // 5. ์นด๋ฉ”๋ผ ํ—ค๋“œ๋ผ์ดํŠธ (MuJoCo Headlight 1:1): ์นด๋ฉ”๋ผ์™€ ํ•จ๊ป˜ ์ •๋ฉด์„ ๋น„์ถ”์–ด ์•”์ „ ๋ฐฉ์ง€
169
+ const headLight = new THREE.DirectionalLight(0xffffff, 0.25);
170
  headLight.position.set(0, 0, 1);
171
  this.camera.add(headLight);
172
  this.scene.add(this.camera);
 
245
 
246
  this.resetGame();
247
  this.updateCameraView();
248
+ this.isGameLoaded = true;
249
+ this._firstFrameRendered = false;
250
  }
251
 
252
  buildThreeGeoms() {
 
275
  a = this.model.geom_rgba[g * 4 + 3];
276
  }
277
 
278
+ // โ˜… ์—์…‹ ์›๋ณธ์˜ ์‚ฐ๋œปํ•˜๊ณ  ํƒฑ๊ธ€ํ•œ ์ ค๋ฆฌ๋นˆ ์งˆ๊ฐ (MuJoCo OpenGL Blinn-Phong 1:1 ์ผ์น˜)
279
  const color = new THREE.Color();
280
  if (type === 0) {
281
  // Floor Plane: ์—์…‹ ์›๋ณธ๊ณผ 100% ๋™์ผํ•œ ์ˆœ๋ฐฑ์ƒ‰ ์บ”๋ฒ„์Šค (RGB 255, 255, 255)
282
  color.setRGB(1.0, 1.0, 1.0);
283
  } else {
284
+ // MuJoCo XML์˜ ์ˆœ์ˆ˜ ์›์ƒ‰(์ผ๋ ‰ํŠธ๋ฆญ ์‹œ์•ˆ, ์ŠคํŠธ๋กœ๋ฒ ๋ฆฌ ํ•‘ํฌ ๋“ฑ)์„ ๊ฐ๋งˆ ์™œ๊ณก ์—†์ด 1:1 ๋ณด์กด
285
+ color.setRGB(r, gc, b);
 
 
 
286
  }
287
 
288
+ const isFloor = (type === 0);
289
  const mat = new THREE.MeshPhongMaterial({
290
  color: color,
291
+ specular: isFloor ? new THREE.Color(0.02, 0.02, 0.02) : new THREE.Color(0.65, 0.65, 0.65),
292
+ shininess: isFloor ? 0 : 50, // ๋ฐ”๋‹ฅ์€ ํด๋ฆฐ ๋งคํŠธ, ์ ค๋ฆฌ๋นˆ ์บ๋ฆญํ„ฐ๋Š” ์ด‰์ด‰ํ•˜๊ณ  ์œค๊ธฐ๋‚˜๋Š” ์บ”๋”” ํ•˜์ด๋ผ์ดํŠธ!
293
  transparent: a < 0.99,
294
  opacity: a
295
  });
296
 
297
  let geom = null;
298
  if (type === 0) {
299
+ // Plane: ๊ฒฝ๊ธฐ์žฅ ๊ทœ๊ฒฉ์— ๋งž์ถฐ ์ž์—ฐ์Šค๋Ÿฌ์šด ์ง€ํ‰์„ (Horizon)๊ณผ ์Šค์นด์ด๋ฐ•์Šค๊ฐ€ ๋ณด์ด๋„๋ก ์ƒ์„ฑ (XML size 4 4์˜ 2๋ฐฐ = 8x8)
300
+ const planeW = (size[0] && size[0] > 0 ? size[0] * 2 : 8);
301
+ const planeH = (size[1] && size[1] > 0 ? size[1] * 2 : 8);
302
+ geom = new THREE.PlaneGeometry(planeW, planeH);
303
  } else if (type === 2) {
304
  // Sphere
305
  geom = new THREE.SphereGeometry(size[0], 24, 24);
 
396
  this.camera.position.set(0, -0.01, 4.0);
397
  this.camera.lookAt(0, 0, 0.5);
398
  } else {
399
+ if (this.currentId === 7) {
400
+ // anim_07.gif 1:1 ์ผ์น˜: XML ์ •๋ฉด ์นด๋ฉ”๋ผ (pos: 0 -3.35 1.25, lookAt: 0 0.1 0.6)
401
+ this.camera.position.set(0, -3.35, 1.25);
402
+ this.camera.lookAt(0, 0.1, 0.6);
403
+ } else {
404
+ this.camera.position.set(0, -2.8, 1.3);
405
+ this.camera.lookAt(0, 0, 0.5);
406
+ }
407
  }
408
  }
409
  }
 
1032
  renderLoop(time) {
1033
  if (!this.isRunning) return;
1034
 
1035
+ // โ˜… ์‹ค์ œ 3D ๊ฒŒ์ž„ ๋ฉ”์‰ฌ๊ฐ€ ์”ฌ์— ๋ฐฐ์น˜๋˜๊ณ  ์ฒซ ์œ ํšจ ํ”„๋ ˆ์ž„์ด ๋ Œ๋”๋ง๋œ ์ˆœ๊ฐ„์—๋งŒ ์™„๋ฃŒ ์‹ ํ˜ธ ์ „๋‹ฌ
1036
+ if (!this._firstFrameRendered && this.isGameLoaded && this.model && this.geomMeshes.length > 0) {
1037
  this._firstFrameRendered = true;
1038
  if (typeof window !== "undefined" && window.__engineLoadingMgr) {
1039
  window.__engineLoadingMgr.complete();