cutechicken commited on
Commit
989a374
·
verified ·
1 Parent(s): 9676487

Update game.js

Browse files
Files changed (1) hide show
  1. game.js +4 -2
game.js CHANGED
@@ -318,8 +318,9 @@ startReload() {
318
  }
319
 
320
  createMuzzleFlash(scene) {
 
321
  const flashGroup = new THREE.Group();
322
-
323
  // 화염 크기 증가
324
  const flameGeometry = new THREE.SphereGeometry(1.0, 8, 8);
325
  const flameMaterial = new THREE.MeshBasicMaterial({
@@ -761,7 +762,7 @@ class Game {
761
  this.renderer.setSize(window.innerWidth, window.innerHeight);
762
  this.renderer.shadowMap.enabled = true;
763
  this.renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 부드러운 그림자
764
- this.renderer.outputEncoding = THREE.sRGBEncoding; // 더 정확한 색상 표현
765
  document.getElementById('gameContainer').appendChild(this.renderer.domElement);
766
 
767
 
@@ -877,6 +878,7 @@ ground.geometry.attributes.position.needsUpdate = true;
877
  ground.geometry.computeVertexNormals();
878
  this.ground = ground;
879
  this.scene.add(ground);
 
880
 
881
  // 격자 효과
882
  const gridHelper = new THREE.GridHelper(flatlandRadius * 2, 50, 0x000000, 0x000000);
 
318
  }
319
 
320
  createMuzzleFlash(scene) {
321
+ if (!this.turret) return;
322
  const flashGroup = new THREE.Group();
323
+
324
  // 화염 크기 증가
325
  const flameGeometry = new THREE.SphereGeometry(1.0, 8, 8);
326
  const flameMaterial = new THREE.MeshBasicMaterial({
 
762
  this.renderer.setSize(window.innerWidth, window.innerHeight);
763
  this.renderer.shadowMap.enabled = true;
764
  this.renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 부드러운 그림자
765
+ this.renderer.outputColorSpace = THREE.SRGBColorSpace;
766
  document.getElementById('gameContainer').appendChild(this.renderer.domElement);
767
 
768
 
 
878
  ground.geometry.computeVertexNormals();
879
  this.ground = ground;
880
  this.scene.add(ground);
881
+ const flatlandRadius = MAP_SIZE / 2;
882
 
883
  // 격자 효과
884
  const gridHelper = new THREE.GridHelper(flatlandRadius * 2, 50, 0x000000, 0x000000);