Skip to content

EditorAppProps beta ​

Interface of @v12-engine/editor

ts
export interface EditorAppProps extends EditorSetup

What the map editor is opened with

Members ​

game ​

ts
game: LoadedGame;

The game whose maps it makes: its rules, and how it looks

goTo ​

ts
goTo?: EditorOptions['goTo'];

For an editor that is a scene of an app: how it opens the app's other scenes, and which (EditorOptions)

id ​

ts
id?: string;

Which editor it is, by a name of its own: its dock's layout is kept under it. editor when left out

leave ​

ts
leave?: {
        label: string;
        tip?: string;
        run: () => void;
    };

The way out of the editor: what its button says, and does. No button without

map ​

ts
map?: string;

A map kept in the browser to open, by its id. A new map when left out

onLoaded ​

ts
onLoaded?: (editor: EditorClient) => void;

Told the editor once it is there: to drive it from code

playHere ​

ts
playHere?: (context: PlayHereContext) => Promise<GameClient>;

Plays the map as it is being edited, over the editor: makes the game's client on what it is handed. No Play here without

project ​

ts
project?: Project;

The project the editor keeps its maps and the game's files in (Project): asked of the dev server as the editor opens, unless it was said (set). One of its own when left out

runtime ​

ts
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 ​

ts
scenes?: Omit<NonNullable<EditorOptions['scenes']>, 'editor'>;

The app's other scenes, which the editor can open (EditorOptions.scenes), without the editor's own

shell ​

ts
shell?: Partial<EditorShell>;

What the editor asks of this page, in the place of its own: any of the members of EditorShell (a dialog of its own, another question before changes are lost)

watchReplay ​

ts
watchReplay?: (replay: Replay, context: GameRunContext) => Promise<GameClient>;

Plays a replay of the map back over the editor, in the game's place (Play › Replays): makes its client on what it is handed, with its bar (the client's watchReplay, as the app's editor scene hands it). No replays opened without