import { Game } from './game/Game.js';
import { CanvasRenderer } from './libraries/CanvasRenderer.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();
        setInterval(() => {game.update(1000/60);}, Math.floor(1000/60));
    });
});
