cutechicken commited on
Commit
989a374
โ€ข
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);