This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user