import type { Application } from 'pixi.js'; import { HttpProjectStore } from '../core/store/HttpProjectStore'; import type { VStack } from '../ui'; import { installDebugHook } from './debugHook'; import { Editor } from './Editor'; import { EditorState } from './state'; const API_ENDPOINT = '/game-maker/api/index.php'; /** Wires state, store and the editor composition together and opens the first project. */ export async function startEditor(app: Application, root: VStack): Promise { const state = new EditorState(); const editor = new Editor(app, root, state, new HttpProjectStore(API_ENDPOINT)); installDebugHook(app, state, editor); await editor.boot(); }