Sprites.Media.Shader.Params

A list of shader parameters and its Add button, and the Parameters window that holds the image wide set. Each row is a Sprites.Media.Shader.Parameter.Control; Add appends a fresh float parameter, and each row's own Remove drops it. The same List is reused twice: the Parameters window shows the image parameters, uniforms passed to every layer, and a layer window shows a layer's own parameters the same way. The list is an Each over the two-way parameter list, so adding, removing and editing a parameter reflow on their own.

Sprites.Media.Shader.Params

Sprites.Media.Shader.Params.List Void

Sprites.Media.Shader.Params.List(params)

The parameter list: a column of parameter cards over an Add button. params is the two-way list, either the image's parameters or a layer's. Each card edits and removes itself; Add appends a fresh float parameter to the end.

InputTypeDescription
paramsSprites.Reactive.ValueThe two-way parameter list the cards edit and Add appends to.

Returns nothing.

const params = Sprites.Reactive.Value([]);
Sprites.Media.Shader.Params.List(params);
An empty parameter list; press Add parameter to append a card, then edit or remove it.

Sprites.Media.Shader.Params.Window Void

Sprites.Media.Shader.Params.Window(visible, params)

The Parameters window: a resizable floating panel, shown while visible is true, with a close button, holding the image wide parameter list in a vertical scroll. params is the image's two-way parameter list. The window owns its live rect, so it keeps its dragged corner and size across a close and reopen.

InputTypeDescription
visibleSprites.Reactive.ValueShows the window while true.
paramsSprites.Reactive.ValueThe image's two-way parameter list the window holds.

Returns nothing.

const visible = Sprites.Reactive.Value(false);
const params = Sprites.Reactive.Value([]);
Sprites.Ui.Button.SetValue(visible, true, 'Show Parameters window');
Sprites.Media.Shader.Params.Window(visible, params);
Show the Parameters window; it holds the image's parameter list, with Add and per-row Remove.