diff options
Diffstat (limited to 'guide-src/widget-inputs/syntax.html')
-rw-r--r-- | guide-src/widget-inputs/syntax.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/guide-src/widget-inputs/syntax.html b/guide-src/widget-inputs/syntax.html new file mode 100644 index 0000000..8026b33 --- /dev/null +++ b/guide-src/widget-inputs/syntax.html @@ -0,0 +1,16 @@ +--- syntax +<p> +here are the various ways of specifying widget inputs: +</p> +<table> +<tbody> +<tr><th style="min-width:10em;">format</th><th>example</th><th>description</th></tr> +<tr><td><code><number></code></td><td><code>5.3</code></td><td>a number</td></tr> +<tr><td><code>#RRGGBB</code></td><td><code>#ff831c</code></td><td>a 3-component vector whose values are taken from the given color code. a color picker will be shown next to the input.</td></tr> +<tr><td><code>#RRGGBBAA</code></td><td><code>#ff831c22</code></td><td>a 4-component vector whose values are taken from the color code.</td></tr> +<tr><td><code><widget name></code></td><td><code>add1</code></td><td>the output from another widget</td></tr> +<tr><td><code><input>,<input></code></td><td><code>.pos,0</code></td><td>a vector composed of <code>a</code> and <code>b</code> (which can themselves be vectors)</td></tr> +<tr><td><code><input>.<component></code></td><td><code>.pos.x</code></td><td>extract a single component from a vector</td></tr> +<tr><td><code><input>.<swizzle></code></td><td><code>.pos.yxy</code></td><td>reorder vector components (this example is equivalent to <code>.pos.y, .pos.x, .pos.y</code>)</td></tr> +</tbody> +</table> |