This commit is contained in:
2026-02-07 14:36:19 +02:00
parent 28f9202403
commit c28286e305
2 changed files with 10 additions and 1 deletions
+3 -1
View File
@@ -16,12 +16,13 @@ import { Clickable } from './Clickable.js';
import { DashBoard } from './Dashboard.js'; import { DashBoard } from './Dashboard.js';
import { MotionEngine } from './MotionEngine.js'; import { MotionEngine } from './MotionEngine.js';
import { Draggable } from './Draggable.js'; import { Draggable } from './Draggable.js';
import { EventManager } from "./EventManager";
THREE.Cache.enabled = true THREE.Cache.enabled = true
const assetPath = '/asset/default/'; const assetPath = '/asset/default/';
class GameEngine extends THREE.EventDispatcher{ class GameEngine extends EventManager{
async init(domNode, opts = {}) { async init(domNode, opts = {}) {
this.w = domNode.clientWidth || 1200, this.h = domNode.clientHeight || 800; this.w = domNode.clientWidth || 1200, this.h = domNode.clientHeight || 800;
this.aspect = this.w / this.h this.aspect = this.w / this.h
@@ -202,6 +203,7 @@ class GameEngine extends THREE.EventDispatcher{
if (opts.stats){ if (opts.stats){
this.stats = new Stats(); this.stats = new Stats();
this.stats.dom.classList.add('engine-stats');
document.body.appendChild(this.stats.dom); document.body.appendChild(this.stats.dom);
} }
+7
View File
@@ -138,3 +138,10 @@ video{
audio { audio {
min-width:400px; min-width:400px;
} }
.engine-stats {
top:unset !important;
left:unset !important;
bottom: 0 !important;
right: 0 !important;
}