UNPKG

the-world-engine

Version:

three.js based, unity like game engine for browser

84 lines (82 loc) 1.49 kB
import { InputHandler } from "./input/InputHandler"; import { Instantiater } from "./Instantiater"; export class EngineGlobalObject { t; i; _; o; h; p; u; g; m; l=null; v; P; G; constructor(t, e, r, s, i, n, a, _, o, h) { this.t = t; this.i = e; this._ = r; this.p = s; this.u = i; this.v = n; this.P = a; this.G = _; this.g = o; this.m = h; this.o = new InputHandler(h); this.h = new Instantiater(this); } applyGameSetting(t) { this.g.applyPhysicsSettings(t.physics); } setWebGLGlobalObject(t) { this.l = t; } dispose() { this.o.dispose(); } get scene() { return this.t; } get cameraContainer() { return this.i; } get screen() { return this.u; } get input() { return this.o; } get time() { return this._; } get physics() { return this.g; } get gameState() { return this.p; } get instantiater() { return this.h; } get domElement() { return this.m; } get webGL() { return this.l; } get sceneProcessor() { return this.v; } get coroutineProcessor() { return this.P; } get transformMatrixProcessor() { return this.G; } get physics2DProcessor() { return this.g; } }