Spaces:
Running
Running
cutechicken
commited on
Commit
โข
c0a7f64
1
Parent(s):
762fa4e
Update game.js
Browse files
game.js
CHANGED
@@ -821,20 +821,21 @@ class Game {
|
|
821 |
|
822 |
// ๋ฉ์ธ ํ์๊ด ์ค์
|
823 |
const mainLight = new THREE.DirectionalLight(0xffffff, 1.0);
|
824 |
-
mainLight.position.set(
|
825 |
mainLight.castShadow = true;
|
826 |
|
827 |
// ๊ทธ๋ฆผ์ ํ์ง ํฅ์
|
828 |
-
mainLight.shadow.mapSize.width =
|
829 |
-
mainLight.shadow.mapSize.height =
|
830 |
mainLight.shadow.camera.near = 0.5;
|
831 |
-
mainLight.shadow.camera.far =
|
832 |
-
mainLight.shadow.camera.left = -
|
833 |
-
mainLight.shadow.camera.right =
|
834 |
-
mainLight.shadow.camera.top =
|
835 |
-
mainLight.shadow.camera.bottom = -
|
836 |
mainLight.shadow.bias = -0.001;
|
837 |
mainLight.shadow.radius = 2;
|
|
|
838 |
|
839 |
this.scene.add(mainLight);
|
840 |
|
|
|
821 |
|
822 |
// ๋ฉ์ธ ํ์๊ด ์ค์
|
823 |
const mainLight = new THREE.DirectionalLight(0xffffff, 1.0);
|
824 |
+
mainLight.position.set(MAP_SIZE/2, MAP_SIZE/2, MAP_SIZE/2);
|
825 |
mainLight.castShadow = true;
|
826 |
|
827 |
// ๊ทธ๋ฆผ์ ํ์ง ํฅ์
|
828 |
+
mainLight.shadow.mapSize.width = 4096; // ๊ทธ๋ฆผ์ ํด์๋ ์ฆ๊ฐ
|
829 |
+
mainLight.shadow.mapSize.height = 4096;
|
830 |
mainLight.shadow.camera.near = 0.5;
|
831 |
+
mainLight.shadow.camera.far = MAP_SIZE * 2; // ๊ทธ๋ฆผ์ ๊ฑฐ๋ฆฌ ์ฆ๊ฐ
|
832 |
+
mainLight.shadow.camera.left = -MAP_SIZE; // ๊ทธ๋ฆผ์ ์์ญ ํ์ฅ
|
833 |
+
mainLight.shadow.camera.right = MAP_SIZE;
|
834 |
+
mainLight.shadow.camera.top = MAP_SIZE;
|
835 |
+
mainLight.shadow.camera.bottom = -MAP_SIZE;
|
836 |
mainLight.shadow.bias = -0.001;
|
837 |
mainLight.shadow.radius = 2;
|
838 |
+
mainLight.shadow.normalBias = 0.02; // ๊ทธ๋ฆผ์ ์ํฐํฉํธ ๊ฐ์
|
839 |
|
840 |
this.scene.add(mainLight);
|
841 |
|