main.js 468 B

12345678910111213
  1. import { GameView } from './viewer/GameView.js';
  2. import { CanvasRenderer } from './libraries/CanvasRenderer.js';
  3. document.addEventListener("DOMContentLoaded", () => {
  4. let viewer = document.getElementById('viewer');
  5. let renderer = new CanvasRenderer();
  6. let view = new GameView();
  7. view.init().then(() => {
  8. renderer.init(viewer,view);
  9. renderer.start();
  10. setInterval(() => {view.update(1000/60);}, Math.floor(1000/60));
  11. });
  12. });