summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules <jules@asdf.us>2015-04-22 16:42:05 -0400
committerJules <jules@asdf.us>2015-04-22 16:42:05 -0400
commit91ef84313ab4e1288411c247bb23e09af64e13f0 (patch)
treed25cfb9d06f2ba682a547060669cdd65791fabd0
parent2c73aff69edaa83618ebfefa0e15ab47769bb3f2 (diff)
linkz
-rw-r--r--index.html9
-rw-r--r--js/util.js4
2 files changed, 10 insertions, 3 deletions
diff --git a/index.html b/index.html
index 090aab5..9de3a6b 100644
--- a/index.html
+++ b/index.html
@@ -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>
diff --git a/js/util.js b/js/util.js
index f76fc8e..22f12bc 100644
--- a/js/util.js
+++ b/js/util.js
@@ -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){