Interface: ParamDef
Definition of a single shader parameter — either a numeric slider (min/max/step), a colour picker (type: 'color') or an enum select (type: 'select' + optionCount). Display strings (label, option names) are NOT carried by the schema; callers map paramKey to a label of their choosing.
Properties
type?
ts
optional type?: "color" | "select" | "toggle";Editor widget hint:
'color'→ hex picker (default is'#rrggbb')'select'→ enum dropdown (default is the index, requiresoptionCount)'toggle'→ checkbox storing0or1. The shader uniform stays a float so it can multiply into a layer expression with no GLSL branching cost.- omitted → numeric slider (
defaultis a number,min/max/stepdrive the bounds)
min?
ts
optional min?: number;max?
ts
optional max?: number;step?
ts
optional step?: number;default
ts
default: string | number | number[];optionCount?
ts
optional optionCount?: number;Number of valid options for a type: 'select' parameter. The shader receives the selected index in [0, optionCount - 1]. Caller-side UIs map each index to a display string (see playground's SELECT_OPTION_LABELS).