import { Select } from "./Applet/Init"; import { KeyName } from "./Applet/Keyboard"; import { Data } from "./Ecs/Components"; import { BindTests } from "./Ecs/test"; import { Main } from "./Game/Main"; import { LoopbackServer } from "./Net/LoopbackServer"; /* // Hot Module Reloading stub, if that's viable * declare const module: any; * if(module.hot) { * const gen = module.hot.data?.gen ?? 0; * module.hot.accept(); * module.hot.dispose((data: any) => { * data.gen = gen + 1; * }); * } */ const server = new LoopbackServer(); Select(".GameCanvas").forEachCanvas((c, cx, keys) => new Main(c, cx, keys, server)); server.resetState({}); BindTests();