import Phaser from 'phaser'; import { initRegistry } from '../engine/registry.js'; import { EditorScene } from './EditorScene.js'; // Load the content registries (walls/overlays/items/enemies JSON) before the // editor builds its palette from them. Top-level await is supported by every // browser that supports import maps, which this project already requires. await initRegistry(); // The editor fills the window and redraws a top-down grid. RESIZE scale mode // lets it follow the browser size; the toolbar is plain DOM in editor.html. const config = { type: Phaser.AUTO, parent: 'editor', backgroundColor: '#1b1b1f', scale: { mode: Phaser.Scale.RESIZE, width: window.innerWidth, height: window.innerHeight, }, scene: [EditorScene], }; // Exposed for debugging / automated smoke tests. window.editorGame = new Phaser.Game(config);