EditorOptions beta
Interface of @v12-engine/editor
export interface EditorOptions extends EditorSetupWhat the editor's client is made with: the page's canvas and engine, the game, and how the game sets its editor up (EditorSetup)
Members
canvas
canvas: HTMLCanvasElement;The canvas the editor draws on
goTo
goTo?: (scene?: string, args?: {
map?: string;
}) => void;Opens another scene of an app: a game on the map, the sandbox on it. An editor that is no scene of an app has none, and plays its maps over itself (Play here)
mapId
mapId?: string;Id of the stored map to open. A new map when left out
overlay
overlay: HTMLCanvasElement;The canvas drawn over the scene for the editor's overlays (lines, names, gizmos)
project
project?: Project;The project the editor keeps its maps and the game's files in (Project), asked of the dev server already (find), as EditorApp does before it makes the editor. One of its own, which knows of none, when left out
registry
registry: Registry;The registry of the game's definitions, built from its rules
rules
rules: Rules;The game's rules module, whose definitions the map is made of
runtime
runtime?: ClientRuntime;What the app runs with (ClientRuntime): where the editor keeps maps, drafts and files in the browser. The page's when left out
scenes
scenes?: {
editor?: string;
play?: string;
sandbox?: string;
list?: () => Promise<readonly EditorSceneInfo[]>;
};The scene this editor is, editor when left out, and those it opens to play the map and to try it out. A game without them has no Play or Sandbox button. list is every scene of the app, as it is now (asked for as it may fetch those that do not say what they are): what the Project panel shows. None in an editor that is no scene of one
shell
shell?: EditorShell;What the editor asks of the page that draws it (EditorShell): menus, dialogs, the question before changes are lost, a file to open, playing the map here, the way out, a file changed on disk. One that asks nobody and plays nothing when left out. It opens its dialogs in shellState
shellState
shellState?: ShellState;What is open in the interface apart from the panels (ShellState): the page that draws the editor owns it, to read it. One of the editor's own when left out
stage
stage: EditorLiteStage;The editor's stage on the canvas (createEditorStage of @v12-engine/editor/lite, made by EditorApp): the editor takes what draws the map, what picks on it, the handles and the panels' views from it, and its loop and clock (stage.engine). The editor disposes of it
view
view: GameView;How the game looks: the client side of its game module