OpenEditorOptions
Interface of @v12-engine/editor
export interface OpenEditorOptions extends EditorSetup, Pick<EditorAppProps, 'map' | 'leave' | 'id'>, RuntimeOptionsWhat a game's map editor is opened with, on a page
Members
game
game: Game<unknown> | LoadedGame;The game whose maps it makes (createGame): its rules, its view (fetched as the editor opens) and its start, which Play here runs where onStart is left out. Or one loaded already (LoadedGame)
onLoaded
onLoaded?: (editor: PanelClient) => void;Told the editor once it is there, to drive it from code (editor.dock, editor.dropAt, ...)
onStart
onStart?: GameSource['onStart'];What the game does once the world of a map being tried is made (Play here), before anyone plays: computer players, a mission given, the first wave sent. As launch's onStart; the game's (Game.onStart) when left out
playHere
playHere?: EditorAppProps['playHere'] | false;Plays the map being edited another way than launch would: makes the game's client itself. false for an editor that only makes maps
project
project?: boolean;Whether maps are kept in the files of a project (a dev server with the editorFiles plugin) or in the browser. Asked of the dev server when left out
target
target: HTMLElement | string;Where on the page the editor goes: an element, or a selector of one. The editor fills it, so it has a size of its own