diff options
| author | jules <jules@okfoc.us> | 2013-12-16 18:31:16 -0500 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2013-12-16 18:31:16 -0500 |
| commit | 712f556fe51bff5aa16e9da3e1190d4ac43dc744 (patch) | |
| tree | 2989179c0ac0a36a1a380d8ef6c722db01e41668 /instructions.html | |
| parent | b9ec772c15b836a52bc789f080ceaeee644577fa (diff) | |
add help
Diffstat (limited to 'instructions.html')
| -rw-r--r-- | instructions.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/instructions.html b/instructions.html new file mode 100644 index 0000000..2903dc1 --- /dev/null +++ b/instructions.html @@ -0,0 +1,43 @@ +<!doctype html> +<html> +<head> +<title>instructions</title> +<style type="text/css"> +html,body{margin:0;padding:5px; } +pre { font-family: serif; font-size: 14px; margin:0;padding:0;} +u{ color: #866; } +i{ color: #666; } +</style> +</head> +<body> +<pre id="pre"><u>function parameters</u> +x, y = position of pixel +t = current time (ms) +d = imageData array +r, g, b, a = color values + +<u>Math aliases</u> +floor, ceil, round, abs, sign +pow, exp, sqrt +sin, cos, tan +asin, acos, atan, atan2 +random() +E, PI + +<u>convenience functions</u> +clamp(n,min,max) +lerp(n,a,b) +mix(n,a,b) +step(n,a,b) +smoothstep(n,a,b) +sinp, cosp (mapped to [0,1]) +pixel(x,y) == 4*(y*w+h) +rand(n), randint(n) +choice(array) +deg(radians), rad(degrees) +</pre> +</body> +<script> +pre.innerHTML = pre.innerHTML.replace(/\(/g,"(<i>").replace(/\)/g,"</i>)") +</script> +</html> |
