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.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.
| Input | Type | Description |
|---|---|---|
params | Sprites.Reactive.Value | The two-way parameter list the cards edit and Add appends to. |
Returns nothing.
const params = Sprites.Reactive.Value([]);
Sprites.Media.Shader.Params.List(params);
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.
| Input | Type | Description |
|---|---|---|
visible | Sprites.Reactive.Value | Shows the window while true. |
params | Sprites.Reactive.Value | The 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);