diff options
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> |
