Sprites.Media.Shader.Info
The Info window shows the image's pixel size and its layer count; width and height are two-way and resize the render. A shader image holds no stored pixels to reflow, only a size the layers render into, so changing width or height simply moves the size the render draws at. The layer count is a readout.
Sprites.Media.Shader.Info.Window Void
Sprites.Media.Shader.Info.Window(visible, width, height, layers)
The Info window: the image's pixel size and its layer count. Width and height are number fields two-way bound to the document size the render draws at; changing one resizes the render, since a shader image holds no stored pixels to reflow, only a size the layers render into. The layer count is a readout. It shows while visible is true and docks to the top right of the stage.
| Input | Type | Description |
|---|---|---|
visible | Sprites.Reactive.Value | Shows the window while true. |
width | Sprites.Reactive.Value | The two-way document width; changing it resizes the render. |
height | Sprites.Reactive.Value | The two-way document height; changing it resizes the render. |
layers | Sprites.Reactive.Value | The layers list, read only here for its count. |
Returns nothing.
const width = Sprites.Reactive.Value(512);
const height = Sprites.Reactive.Value(512);
const layers = Sprites.Reactive.Value([ Sprites.Media.Shader.NewLayer('Layer 1', ''), Sprites.Media.Shader.NewLayer('Layer 2', '') ]);
const visible = Sprites.Reactive.Value(false);
Sprites.Ui.Button.SetValue(visible, true, 'Show Info window');
Sprites.Media.Shader.Info.Window(visible, width, height, layers);