GeneratorParamDef beta
Interface of @v12-engine/engine
ts
export interface GeneratorParamDefA parameter of a generator (MapGenerator.params): a slider, a switch or a choice in the editor's dialog and the page's form, and a value in code (GeneratorOptions.params)
Members
choices
ts
choices?: {
value: string;
label: string;
}[];Of a choice: the values it can be, each with the label shown for it
default
ts
default: number | string | boolean;The value used when the options do not say: a number, a string for a choice or a boolean for a switch
description
ts
description?: string;A line about it shown beside it in the form
id
ts
id: string;The id the pass or parameter is kept by, in GeneratorOptions.params for a parameter
kind
ts
kind?: 'number' | 'boolean' | 'choice';A number on a slider (the default), a switch, or one of choices
max
ts
max?: number;Of a number: the most the slider goes to
min
ts
min?: number;Of a number: the least the slider goes to
name
ts
name: string;The name shown in the editor's dialog and the page's form
step
ts
step?: number;Of a number: the size of one step of the slider