implement stats.min.js, improve fps

This commit is contained in:
LabyStudio
2022-02-01 08:30:51 +01:00
parent ac850a5101
commit ed49c9f776
7 changed files with 56 additions and 25 deletions
+8 -1
View File
@@ -8,9 +8,16 @@ window.GameWindow = class {
this.mouseMotionY = 0;
this.mouseLocked = false;
let wrapper = document.getElementById(this.canvasWrapperId);
// Stats
this.stats = new Stats()
this.stats.showPanel(1);
wrapper.appendChild(this.stats.dom);
// Add web renderer canvas to wrapper
let canvas = renderer.canvasElement;
document.getElementById(this.canvasWrapperId).appendChild(canvas);
wrapper.appendChild(canvas);
// Init
this.onResize();