Spaces:
Running
Running
cutechicken
commited on
Update game.js
Browse files
game.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import * as THREE from 'three';
|
2 |
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
3 |
import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
|
4 |
-
import Stats from 'three/examples/jsm/libs/stats.module.js';
|
5 |
|
6 |
// κ²μ μμ
|
7 |
const GAME_DURATION = 180;
|
@@ -848,13 +847,6 @@ class Particle {
|
|
848 |
// Game ν΄λμ€
|
849 |
class Game {
|
850 |
constructor() {
|
851 |
-
// Stats μ΄κΈ°ν μΆκ°
|
852 |
-
this.stats = new Stats();
|
853 |
-
this.stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
|
854 |
-
this.stats.dom.style.position = 'absolute';
|
855 |
-
this.stats.dom.style.left = '0px';
|
856 |
-
this.stats.dom.style.top = '0px';
|
857 |
-
document.body.appendChild(this.stats.dom);
|
858 |
// κ²μ μμ μ¬λΆλ₯Ό μΆμ νλ νλκ·Έ μΆκ°
|
859 |
this.isStarted = false;
|
860 |
// μ€λμ€ κ΄λ ¨ μμ± μΆκ°
|
@@ -1809,7 +1801,6 @@ class Game {
|
|
1809 |
}
|
1810 |
return;
|
1811 |
}
|
1812 |
-
this.stats.begin();
|
1813 |
|
1814 |
this.animationFrameId = requestAnimationFrame(() => this.animate());
|
1815 |
// κ²μμ΄ μμλμ§ μμμΌλ©΄ λ λλ§λ§ μν
|
@@ -1842,7 +1833,6 @@ class Game {
|
|
1842 |
}
|
1843 |
|
1844 |
this.renderer.render(this.scene, this.camera);
|
1845 |
-
this.stats.end();
|
1846 |
}
|
1847 |
}
|
1848 |
|
|
|
1 |
import * as THREE from 'three';
|
2 |
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
3 |
import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
|
|
|
4 |
|
5 |
// κ²μ μμ
|
6 |
const GAME_DURATION = 180;
|
|
|
847 |
// Game ν΄λμ€
|
848 |
class Game {
|
849 |
constructor() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
// κ²μ μμ μ¬λΆλ₯Ό μΆμ νλ νλκ·Έ μΆκ°
|
851 |
this.isStarted = false;
|
852 |
// μ€λμ€ κ΄λ ¨ μμ± μΆκ°
|
|
|
1801 |
}
|
1802 |
return;
|
1803 |
}
|
|
|
1804 |
|
1805 |
this.animationFrameId = requestAnimationFrame(() => this.animate());
|
1806 |
// κ²μμ΄ μμλμ§ μμμΌλ©΄ λ λλ§λ§ μν
|
|
|
1833 |
}
|
1834 |
|
1835 |
this.renderer.render(this.scene, this.camera);
|
|
|
1836 |
}
|
1837 |
}
|
1838 |
|