From c28286e3053809d413e72e13d1fa8063618d2ad2 Mon Sep 17 00:00:00 2001 From: goynov Date: Sat, 7 Feb 2026 14:36:19 +0200 Subject: [PATCH] #55 --- src/lib/GameEngine.js | 4 +++- src/styles/style.scss | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/GameEngine.js b/src/lib/GameEngine.js index 8136cc3..2abd0e4 100644 --- a/src/lib/GameEngine.js +++ b/src/lib/GameEngine.js @@ -16,12 +16,13 @@ import { Clickable } from './Clickable.js'; import { DashBoard } from './Dashboard.js'; import { MotionEngine } from './MotionEngine.js'; import { Draggable } from './Draggable.js'; +import { EventManager } from "./EventManager"; THREE.Cache.enabled = true const assetPath = '/asset/default/'; -class GameEngine extends THREE.EventDispatcher{ +class GameEngine extends EventManager{ async init(domNode, opts = {}) { this.w = domNode.clientWidth || 1200, this.h = domNode.clientHeight || 800; this.aspect = this.w / this.h @@ -202,6 +203,7 @@ class GameEngine extends THREE.EventDispatcher{ if (opts.stats){ this.stats = new Stats(); + this.stats.dom.classList.add('engine-stats'); document.body.appendChild(this.stats.dom); } diff --git a/src/styles/style.scss b/src/styles/style.scss index b8521fb..85ffb1c 100644 --- a/src/styles/style.scss +++ b/src/styles/style.scss @@ -137,4 +137,11 @@ video{ audio { min-width:400px; +} + +.engine-stats { + top:unset !important; + left:unset !important; + bottom: 0 !important; + right: 0 !important; } \ No newline at end of file