cutechicken commited on
Commit
85020fd
β€’
1 Parent(s): 71f9ded

Update game.js

Browse files
Files changed (1) hide show
  1. game.js +27 -27
game.js CHANGED
@@ -1189,8 +1189,8 @@ checkPathClear(start, end) {
1189
  // 쀑심 폭발
1190
  const explosionGroup = new THREE.Group();
1191
 
1192
- // μ£Ό 폭발 ν”Œλž˜μ‹œ
1193
- const flashGeometry = new THREE.SphereGeometry(8);
1194
  const flashMaterial = new THREE.MeshBasicMaterial({
1195
  color: 0xffff00,
1196
  transparent: true,
@@ -1200,13 +1200,13 @@ checkPathClear(start, end) {
1200
  flash.position.copy(this.mesh.position);
1201
  this.scene.add(flash);
1202
 
1203
- // 닀쀑 폭발 νŒŒν‹°ν΄
1204
- for (let i = 0; i < 100; i++) { // νŒŒν‹°ν΄ 수 증가
1205
- const size = Math.random() * 2 + 1;
1206
  const geometry = new THREE.SphereGeometry(size);
1207
 
1208
  // λ‹€μ–‘ν•œ 폭발 색상
1209
- const colors = [0xff4500, 0xff8c00, 0xff0000, 0xffd700, 0xff6347];
1210
  const material = new THREE.MeshBasicMaterial({
1211
  color: colors[Math.floor(Math.random() * colors.length)],
1212
  transparent: true,
@@ -1216,8 +1216,8 @@ checkPathClear(start, end) {
1216
  const particle = new THREE.Mesh(geometry, material);
1217
  particle.position.copy(this.mesh.position);
1218
 
1219
- // 더 κ°•λ ₯ν•œ 폭발 효과λ₯Ό μœ„ν•œ 속도 증가
1220
- const speed = Math.random() * 2 + 1;
1221
  const angle = Math.random() * Math.PI * 2;
1222
  const elevation = Math.random() * Math.PI - Math.PI / 2;
1223
 
@@ -1227,8 +1227,8 @@ checkPathClear(start, end) {
1227
  Math.sin(angle) * Math.cos(elevation) * speed
1228
  );
1229
 
1230
- particle.gravity = -0.1;
1231
- particle.life = Math.random() * 60 + 60;
1232
  particle.fadeRate = 0.98;
1233
 
1234
  this.scene.add(particle);
@@ -1241,9 +1241,9 @@ checkPathClear(start, end) {
1241
  });
1242
  }
1243
 
1244
- // 폭발 링 μ΄νŽ™νŠΈ
1245
- for (let i = 0; i < 3; i++) {
1246
- const ringGeometry = new THREE.RingGeometry(0.1, 4, 32);
1247
  const ringMaterial = new THREE.MeshBasicMaterial({
1248
  color: 0xff8c00,
1249
  transparent: true,
@@ -1256,10 +1256,10 @@ checkPathClear(start, end) {
1256
  ring.rotation.y = Math.random() * Math.PI;
1257
  this.scene.add(ring);
1258
 
1259
- // 링 ν™•μž₯ μ• λ‹ˆλ©”μ΄μ…˜
1260
  const expandRing = () => {
1261
- ring.scale.x += 0.3;
1262
- ring.scale.y += 0.3;
1263
  ring.material.opacity *= 0.96;
1264
 
1265
  if (ring.material.opacity > 0.01) {
@@ -1271,17 +1271,17 @@ checkPathClear(start, end) {
1271
  expandRing();
1272
  }
1273
 
1274
- // ν™”μ—Ό κΈ°λ‘₯ 효과
1275
  const fireColumn = new THREE.Group();
1276
- for (let i = 0; i < 20; i++) {
1277
- const fireGeometry = new THREE.ConeGeometry(2, 8, 8);
1278
  const fireMaterial = new THREE.MeshBasicMaterial({
1279
  color: 0xff4500,
1280
  transparent: true,
1281
  opacity: 0.8
1282
  });
1283
  const fire = new THREE.Mesh(fireGeometry, fireMaterial);
1284
- fire.position.y = i * 0.5;
1285
  fire.rotation.x = Math.random() * Math.PI;
1286
  fire.rotation.z = Math.random() * Math.PI;
1287
  fireColumn.add(fire);
@@ -1289,9 +1289,9 @@ checkPathClear(start, end) {
1289
  fireColumn.position.copy(this.mesh.position);
1290
  this.scene.add(fireColumn);
1291
 
1292
- // ν™”μ—Ό κΈ°λ‘₯ μ• λ‹ˆλ©”μ΄μ…˜
1293
  const animateFireColumn = () => {
1294
- fireColumn.scale.y += 0.1;
1295
  fireColumn.children.forEach(fire => {
1296
  fire.material.opacity *= 0.95;
1297
  });
@@ -1304,7 +1304,7 @@ checkPathClear(start, end) {
1304
  };
1305
  animateFireColumn();
1306
 
1307
- // 폭발 μ‚¬μš΄λ“œ νš¨κ³Όλ“€
1308
  const explosionSounds = [
1309
  new Audio('sounds/explosion.ogg'),
1310
  new Audio('sounds/bang.ogg')
@@ -1314,13 +1314,13 @@ checkPathClear(start, end) {
1314
  sound.play();
1315
  });
1316
 
1317
- // 카메라 흔듀림 효과
1318
  if (window.gameInstance && window.gameInstance.camera) {
1319
  const camera = window.gameInstance.camera;
1320
  const originalPosition = camera.position.clone();
1321
  let shakeTime = 0;
1322
- const shakeIntensity = 1.0;
1323
- const shakeDuration = 1000;
1324
 
1325
  const shakeCamera = () => {
1326
  if (shakeTime < shakeDuration) {
@@ -1340,7 +1340,7 @@ checkPathClear(start, end) {
1340
  // 쀑심 ν”Œλž˜μ‹œ 제거
1341
  setTimeout(() => {
1342
  this.scene.remove(flash);
1343
- }, 200);
1344
  }
1345
 
1346
 
 
1189
  // 쀑심 폭발
1190
  const explosionGroup = new THREE.Group();
1191
 
1192
+ // μ£Ό 폭발 ν”Œλž˜μ‹œ (크기 κ°μ†Œ)
1193
+ const flashGeometry = new THREE.SphereGeometry(4); // 8μ—μ„œ 4둜 κ°μ†Œ
1194
  const flashMaterial = new THREE.MeshBasicMaterial({
1195
  color: 0xffff00,
1196
  transparent: true,
 
1200
  flash.position.copy(this.mesh.position);
1201
  this.scene.add(flash);
1202
 
1203
+ // 닀쀑 폭발 νŒŒν‹°ν΄ (μˆ˜μ™€ 크기 κ°μ†Œ)
1204
+ for (let i = 0; i < 50; i++) { // 100μ—μ„œ 50으둜 κ°μ†Œ
1205
+ const size = Math.random() * 1 + 0.5; // 크기 λ²”μœ„ κ°μ†Œ
1206
  const geometry = new THREE.SphereGeometry(size);
1207
 
1208
  // λ‹€μ–‘ν•œ 폭발 색상
1209
+ const colors = [0xff4500, 0xff8c00, 0xff0000, 0xffd700];
1210
  const material = new THREE.MeshBasicMaterial({
1211
  color: colors[Math.floor(Math.random() * colors.length)],
1212
  transparent: true,
 
1216
  const particle = new THREE.Mesh(geometry, material);
1217
  particle.position.copy(this.mesh.position);
1218
 
1219
+ // νŒŒν‹°ν΄ 속도 κ°μ†Œ
1220
+ const speed = Math.random() * 1 + 0.5; // 속도 λ²”μœ„ κ°μ†Œ
1221
  const angle = Math.random() * Math.PI * 2;
1222
  const elevation = Math.random() * Math.PI - Math.PI / 2;
1223
 
 
1227
  Math.sin(angle) * Math.cos(elevation) * speed
1228
  );
1229
 
1230
+ particle.gravity = -0.05; // 쀑λ ₯ 효과 κ°μ†Œ
1231
+ particle.life = Math.random() * 30 + 30; // 수λͺ… κ°μ†Œ
1232
  particle.fadeRate = 0.98;
1233
 
1234
  this.scene.add(particle);
 
1241
  });
1242
  }
1243
 
1244
+ // 폭발 링 μ΄νŽ™νŠΈ (크기와 ν™•μž₯ 속도 κ°μ†Œ)
1245
+ for (let i = 0; i < 2; i++) { // 3μ—μ„œ 2둜 κ°μ†Œ
1246
+ const ringGeometry = new THREE.RingGeometry(0.1, 2, 32);
1247
  const ringMaterial = new THREE.MeshBasicMaterial({
1248
  color: 0xff8c00,
1249
  transparent: true,
 
1256
  ring.rotation.y = Math.random() * Math.PI;
1257
  this.scene.add(ring);
1258
 
1259
+ // 링 ν™•μž₯ μ• λ‹ˆλ©”μ΄μ…˜ (ν™•μž₯ 속도 κ°μ†Œ)
1260
  const expandRing = () => {
1261
+ ring.scale.x += 0.15; // 0.3μ—μ„œ 0.15둜 κ°μ†Œ
1262
+ ring.scale.y += 0.15;
1263
  ring.material.opacity *= 0.96;
1264
 
1265
  if (ring.material.opacity > 0.01) {
 
1271
  expandRing();
1272
  }
1273
 
1274
+ // ν™”μ—Ό κΈ°λ‘₯ 효과 (크기와 수 κ°μ†Œ)
1275
  const fireColumn = new THREE.Group();
1276
+ for (let i = 0; i < 10; i++) { // 20μ—μ„œ 10으둜 κ°μ†Œ
1277
+ const fireGeometry = new THREE.ConeGeometry(1, 4, 8); // 크기 κ°μ†Œ
1278
  const fireMaterial = new THREE.MeshBasicMaterial({
1279
  color: 0xff4500,
1280
  transparent: true,
1281
  opacity: 0.8
1282
  });
1283
  const fire = new THREE.Mesh(fireGeometry, fireMaterial);
1284
+ fire.position.y = i * 0.3; // 0.5μ—μ„œ 0.3으둜 κ°μ†Œ
1285
  fire.rotation.x = Math.random() * Math.PI;
1286
  fire.rotation.z = Math.random() * Math.PI;
1287
  fireColumn.add(fire);
 
1289
  fireColumn.position.copy(this.mesh.position);
1290
  this.scene.add(fireColumn);
1291
 
1292
+ // ν™”μ—Ό κΈ°λ‘₯ μ• λ‹ˆλ©”μ΄μ…˜ (ν™•μž₯ 속도 κ°μ†Œ)
1293
  const animateFireColumn = () => {
1294
+ fireColumn.scale.y += 0.05; // 0.1μ—μ„œ 0.05둜 κ°μ†Œ
1295
  fireColumn.children.forEach(fire => {
1296
  fire.material.opacity *= 0.95;
1297
  });
 
1304
  };
1305
  animateFireColumn();
1306
 
1307
+ // 폭발 μ‚¬μš΄λ“œ 효과
1308
  const explosionSounds = [
1309
  new Audio('sounds/explosion.ogg'),
1310
  new Audio('sounds/bang.ogg')
 
1314
  sound.play();
1315
  });
1316
 
1317
+ // 카메라 흔듀림 효과 (강도 κ°μ†Œ)
1318
  if (window.gameInstance && window.gameInstance.camera) {
1319
  const camera = window.gameInstance.camera;
1320
  const originalPosition = camera.position.clone();
1321
  let shakeTime = 0;
1322
+ const shakeIntensity = 0.5; // 1.0μ—μ„œ 0.5둜 κ°μ†Œ
1323
+ const shakeDuration = 500; // 1000μ—μ„œ 500으둜 κ°μ†Œ
1324
 
1325
  const shakeCamera = () => {
1326
  if (shakeTime < shakeDuration) {
 
1340
  // 쀑심 ν”Œλž˜μ‹œ 제거
1341
  setTimeout(() => {
1342
  this.scene.remove(flash);
1343
+ }, 100); // 200μ—μ„œ 100으둜 κ°μ†Œ
1344
  }
1345
 
1346