Skip to content

Scenes beta ​

Interface of @v12-engine/client/app

ts
export interface Scenes

The scenes an app has, and the list it starts with: what App shows one of at a time. An app makes its own (createScenes) and hands it to startApp; nothing of it is shared between two apps on a page

Members ​

all ​

ts
all(): readonly Scene[];

Every scene the app can open, by id

entries ​

ts
entries(): readonly SceneEntry[];

The list the app starts with, to pick from: read where it is shown, so that one added later shows too

find ​

ts
find(id: string): Scene | undefined;

Returns the scene with that id, or undefined when the app has none

register ​

ts
register(scene: Scene, entry?: Omit<SceneEntry, 'scene'>): void;

Adds a scene to what the app can open (one with the same id is replaced), and, with entry, a line for it on the list the app starts with: once, however often it is registered

remove ​

ts
remove(id: string): boolean;

Takes a scene away again, and its line on the list. Whether it was there