diff options
| -rw-r--r-- | index.html | 9 | ||||
| -rw-r--r-- | js/util.js | 4 |
2 files changed, 10 insertions, 3 deletions
@@ -56,12 +56,17 @@ h1 { font-size: 26px; font-weight: normal } <h1>colorcodes</h1> <a target="_blank" href="/ascii/"><button>ascii-shader</button></a> <a target="_blank" href="/ascii/image.html"><button>ascii-image</button></a> -<a target="_blank" href="/ascii/colors.html"><button>ascii-colors</button></a> +<a target="_blank" href="/ascii/webcam.html"><button>ascii-webcam</button></a> <a target="_blank" href="/xdcc/"><button>xdcc.pl</button></a> +<!-- +<br> +<br> +<a target="_blank" href="/ascii/colors.html"><button>colors</button></a> <a target="_blank" href="/ascii/grid.html"><button>grid</button></a> <a target="_blank" href="/ascii/grid2.html"><button>grid 2</button></a> <a target="_blank" href="/ascii/grid3.html"><button>grid 3</button></a> <a target="_blank" href="/ascii/grid4.html"><button>grid 4</button></a> +--> <h1>etc..</h1> <a target="_blank" href="/gif-recorder/"><button>gif-recorder</button></a> @@ -70,7 +75,7 @@ h1 { font-size: 26px; font-weight: normal } <a target="_blank" href="/dendrite/"><button>dendrite</button></a> <a target="_blank" href="/dendrite/life.html"><button>dendrite-life</button></a> <a target="_blank" href="/mandel/mandel5.html"><button>mandel5</button></a> -<a target="_blank" href="http://glitchyplop.com/"><button>sortpixels</button></a> +<a target="_blank" href="/sortpixels/"><button>sortpixels</button></a> <a target="_blank" href="/strobe/"><button>strobe</button></a> <br><br><br><br> @@ -55,7 +55,9 @@ function mod(n,m){ return n-(m * floor(n/m)) } function dist(x0,y0,x1,y1){ return sqrt(pow(x1-x0,2)+pow(y1-y0,2)) } function angle(x0,y0,x1,y1){ return atan2(y1-y0,x1-x0) } function avg(m,n,a){ return (m*(a-1)+n)/a } -function quantize(a,b){ return ~~(a/b)*b } +function quantize(a,b){ return round(a/b)*b } +function quantize_down(a,b){ return floor(a/b)*b } +function quantize_up(a,b){ return ceil(a/b)*b } function pixel(x,y){ return 4*(mod(y,actual_h)*actual_w+mod(x,actual_w)) } function rgbpixel(d,x,y){ |
