import './runtime/index.css'; import { GameContext } from './runtime/controller/gamecontext'; import { Renderer } from './runtime/view/renderer/renderer'; window.onload = async () => { const app = document.getElementById('app'); if (!app) return; const canvas = document.createElement('canvas'); const renderer = new Renderer(canvas); const resize = () => { canvas.width = window.innerWidth; canvas.height = window.innerHeight; renderer.resize(); }; window.addEventListener('resize', resize); resize(); app.append(canvas); GameContext.load(renderer); };