summaryrefslogtreecommitdiff
path: root/js/dither.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dither.js')
-rw-r--r--js/dither.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/dither.js b/js/dither.js
new file mode 100644
index 0000000..37baf01
--- /dev/null
+++ b/js/dither.js
@@ -0,0 +1,15 @@
+var dither = {
+ aa: '▓▒░ ',
+ a: '▓',
+ b: '▒',
+ c: '░',
+ d: ' ',
+ p: function(n){
+ if (0 <= 0 && n < 1) {
+ return block.aa[Math.floor(n * 4)]
+ }
+ else {
+ return block.aa[Math.floor(n % 4)]
+ }
+ }
+}