RandomMapSceneOptions beta
Interface of @v12-engine/client/app
export interface RandomMapSceneOptionsWhat a scene of a random map is made with (randomMapScene)
Members
back
back?: {
label?: string;
scene?: SceneRef;
};The button back out: what it says (Back), and the scene it goes to (the list of scenes when left out)
game
game: LoadedGame;The game whose rules, view and generator the random map is made and played with
generator
generator?: MapGenerator;The generator: the game's own (Rules.generator) when left out
generatorWorker
generatorWorker?: () => NavigationWorkerLike;What makes the worker the preview's maps are made in, so that the form does not stop the page while one is made: a worker whose file serves the game's generator (serveMapGenerator(rules)), made as the project's bundler wants it, () => new Worker(new URL('./generate.worker.ts', import.meta.url), { type: 'module' }). Made as the first map is asked for. This thread when left out, and where generator is given (a worker knows only the game's own)
id
id?: string;The scene's id: random-map when left out
initial
initial?: Partial<GeneratorOptions>;What the form starts at: 128 a side, two players, no symmetry, the parameters' defaults, when left out
name
name?: string;What the scene is called in the list of scenes
play
play: SceneRef;The scene of the game it plays the map in (a gameScene): handed the generator's options as SceneArgs.generated
title
title?: string;What is over the form: A random map when left out