diff options
Diffstat (limited to 'guide-src/widget-inputs/builtins.html')
-rw-r--r-- | guide-src/widget-inputs/builtins.html | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/guide-src/widget-inputs/builtins.html b/guide-src/widget-inputs/builtins.html index 6434921..32cb3b1 100644 --- a/guide-src/widget-inputs/builtins.html +++ b/guide-src/widget-inputs/builtins.html @@ -1,3 +1,20 @@ ---- Built-in values +--- built-in values -<h1 style="color:red">TODO</h1> +all of pugl's built-in values begin with a <code>.</code> to distinguish +them from your widgets. +here they all are. +below, <code>float</code> refers to a plain old number, +<code>vec2</code> is a 2-component vector, etc. + +<table> +<tbody> +<tr><th>built‑in</th><th>type</th><th>description</th></tr> +<tr><td><code>.pos</code></td><td><code>vec2</code><td>the position of the pixel, with (−1, −1) being the bottom-left corner, and (+1, +1) being the top-right corner.</td></tr> +<tr><td><code>.pos01</code></td><td><code>vec2</code><td>the position of the pixel, with (0, 0) being the bottom-left corner, and (+1, +1) being the top-right corner.</td></tr> +<tr><td><code>.time</code></td><td><code>float</code><td>the amount of time that has passed (wraps around every hour to prevent imprecision issues).</td></tr> +<tr><td><code>.mouse</code></td><td><code>vec2</code><td>the position of the mouse ranging from (−1, −1) to (+1, +1).</td></tr> +<tr><td><code>.mouse01</code></td><td><code>vec2</code><td>the position of the mouse ranging from (0, 0) to (+1, +1).</td></tr> +<tr><td><code>.pi</code></td><td><code>float</code><td>π (3.1415…).</td></tr> +<tr><td><code>.2pi</code></td><td><code>float</code><td>2π (6.2831…).</td></tr> +</tbody> +</table> |