1234567891011121314151617 |
- import { Game } from './game/Game.js';
- import { CanvasRenderer } from './libraries/CanvasRenderer.js';
- import { Global } from './libraries/Global.js';
- document.addEventListener("DOMContentLoaded", () => {
- let viewer = document.getElementById('viewer');
- let renderer = new CanvasRenderer();
- let game = new Game();
- game.init().then(() => {
- renderer.init(viewer,game);
- renderer.start();
- Global.updateTickRate = Math.floor(1000/60)
- setInterval(() => {
- game.update();
- }, Global.updateTickRate);
- });
- });
|