summaryrefslogtreecommitdiff
path: root/guide-src/widget-inputs/syntax.html
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-29 15:41:50 -0400
committerpommicket <pommicket@gmail.com>2023-08-29 15:41:50 -0400
commite226bef8253d50db7c1622aacaf5964f1d505359 (patch)
tree7b50b87d9cf6264d7942566836aa21968703c3f5 /guide-src/widget-inputs/syntax.html
parent64c42098c549182d8a260194412fe3a44b5b5889 (diff)
guide done for now
Diffstat (limited to 'guide-src/widget-inputs/syntax.html')
-rw-r--r--guide-src/widget-inputs/syntax.html16
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>&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>