Skip to content

control

const control: object

Defined in: tools/lab/src/grammar/controls.ts:93

The scenario grammar — everything a *.scenario.ts file imports.

Type-only where the engine is concerned, so importing this entry pulls in no runtime engine code and no pixi. The browser shell lives in @yagejs-tools/lab/runner.

boolean(value, opts?): BooleanControl

A checkbox.

boolean

LabelOnlyOptions = {}

BooleanControl

int(value, opts?): NumberControl

A slider constrained to whole numbers.

number

IntControlOptions = {}

NumberControl

number(value, opts?): NumberControl

A slider over a continuous range. step defaults to 0.01.

number

NumberControlOptions = {}

NumberControl

select<O>(value, options, opts?): SelectControl<O>

A dropdown over a fixed set of strings. options is inferred as literal types, so setup sees the union rather than string and no as const is needed at the call site.

O extends string

O

readonly O[]

LabelOnlyOptions = {}

SelectControl<O>