From 15347846e5c518e5bf2ed615b8f008fbad1cf91c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 25 Oct 2018 00:22:24 +0200 Subject: [PATCH] js/dither.js: merged into js/ui/palette.js. index.html: updates script URIs. --- index.html | 1 - js/dither.js | 10 ---------- js/ui/palette.js | 10 ++++++++++ 3 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 js/dither.js diff --git a/index.html b/index.html index b132d0d..3db265a 100644 --- a/index.html +++ b/index.html @@ -133,7 +133,6 @@ - diff --git a/js/dither.js b/js/dither.js deleted file mode 100644 index f5c86c9..0000000 --- a/js/dither.js +++ /dev/null @@ -1,10 +0,0 @@ -var dither = { - aa: '▓▒░ ', - a: '▓', - b: '▒', - c: '░', - d: ' ', - p: function(n){ - return dither.aa[Math.floor(Math.abs(n) % 4)] - } -} diff --git a/js/ui/palette.js b/js/ui/palette.js index 40da8b6..46045eb 100644 --- a/js/ui/palette.js +++ b/js/ui/palette.js @@ -8,6 +8,16 @@ var palette = (function(){ var palette_index = localStorage.getItem("ascii.palette") || 1 var palette_list = [all_hue, all_inv_hue, mirc_color, mirc_color_reverse] var palette_fn = palette_list[palette_index] + var dither = { + aa: '▓▒░ ', + a: '▓', + b: '▒', + c: '░', + d: ' ', + p: function(n){ + return dither.aa[Math.floor(Math.abs(n) % 4)] + } + } palette.chars = " " + dither.a + dither.b + dither.c palette.repaint = function(){