Spaces:
Running
Running
Update game.js
Browse files
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.
|
| 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);
|