summaryrefslogtreecommitdiff
path: root/guide-src/widget-inputs/syntax.html
blob: 8026b33bd3e9f6c0a5e1e62e6344168772fa4004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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>&lt;number&gt;</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>&lt;widget name&gt;</code></td><td><code>add1</code></td><td>the output from another widget</td></tr>
<tr><td><code>&lt;input&gt;,&lt;input&gt;</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>&lt;input&gt;.&lt;component&gt;</code></td><td><code>.pos.x</code></td><td>extract a single component from a vector</td></tr>
<tr><td><code>&lt;input&gt;.&lt;swizzle&gt;</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>