main.ts

src/main.ts
import { Game } from './core/Game';
import { PreloadScene } from './scenes/PreloadScene';
/**
* App entry. Bootstraps the Game (PIXI app + Rapier + systems) and hands
* off to the first scene.
*
* The game canvas is appended into #game in index.html. PIXI sizes itself
* to the window automatically (resizeTo: window) — see core/Game.ts.
*/
async function main(): Promise<void> {
const parent = document.getElementById('game');
if (!parent) throw new Error('Missing #game mount point in index.html');
const game = new Game();
await game.init(parent);
await game.scenes.switch(PreloadScene);
}
void main();

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC