summaryrefslogtreecommitdiff
path: root/shader.html
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2013-12-10 00:47:36 -0500
committerJulie Lala <jules@okfoc.us>2013-12-10 00:47:36 -0500
commit037a0ae8072217f7821549bbdfe030e73289330d (patch)
treeb2e20cff097a44e08cd8e6609e7d5a00b732d88c /shader.html
dither stuff
Diffstat (limited to 'shader.html')
-rw-r--r--shader.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/shader.html b/shader.html
new file mode 100644
index 0000000..bc6b9a2
--- /dev/null
+++ b/shader.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<html>
+<head>
+<title>Shader</title>
+</head>
+<body>
+<div>
+<button id="random">random</button>
+<button id="pattern2">pattern2</button>
+<button id="pattern3">pattern3</button>
+<button id="pattern4">pattern4</button>
+<button id="pattern2Lite">pattern2lite</button>
+<button id="pattern3Lite">pattern3lite</button>
+<button id="pattern4Lite">pattern4lite</button>
+<button id="floydSteinberg">floyd-steinberg</button>
+<button id="right">right</button>
+</div>
+w/h <input type="text" id="width">x<input type="text" id="height">
+<textarea name="shader">
+</textarea>
+</body>
+<script type="text/javascript" src="canvasquery.js"></script>
+<script type="text/javascript" src="canvasquery.dither.js"></script>
+<script type="text/javascript">
+
+function dither(img){
+ var w = img.naturalWidth, h = img.naturalHeight;
+ var cc = cq(w, h)
+ cc.drawImage(img, 0, 0, w, h);
+ cc[algo + "Dither"]( )
+ cc.appendTo("#images")
+}
+</script>
+</html>
+