import Phaser from 'phaser'; import { BootScene } from './scenes/BootScene.js'; import { GameScene } from './scenes/GameScene.js'; import { HudScene } from './scenes/HudScene.js'; /** On-screen canvas size. The raycast view is rendered at a low internal * resolution (RENDER_WIDTH x RENDER_HEIGHT) and upscaled into this space, so * the HUD stays crisp while the 3D view keeps its chunky retro look. */ export const GAME_WIDTH = 960; export const GAME_HEIGHT = 600; const config = { type: Phaser.AUTO, parent: 'game', width: GAME_WIDTH, height: GAME_HEIGHT, backgroundColor: '#000000', pixelArt: true, // nearest-neighbor upscaling of the view texture scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, }, scene: [BootScene, GameScene, HudScene], }; new Phaser.Game(config);