js/dither.js: merged into js/ui/palette.js.

index.html: updates script URIs.
This commit is contained in:
Lucio Andrés Illanes Albornoz (arab, vxp) 2018-10-25 00:22:24 +02:00 committed by Lucio Andrés Illanes Albornoz
parent fc652958e8
commit f1fd806573
3 changed files with 10 additions and 11 deletions

View File

@ -133,7 +133,6 @@
<script src="js/util.js"></script>
<script src="js/ext/unicode.js"></script>
<script src="js/ext/color.js"></script>
<script src="js/dither.js"></script>
<script src="js/clipboard.js"></script>
<script src="js/ext/upload.js"></script>
<script src="js/ext/user.js"></script>

View File

@ -1,10 +0,0 @@
var dither = {
aa: '▓▒░ ',
a: '▓',
b: '▒',
c: '░',
d: ' ',
p: function(n){
return dither.aa[Math.floor(Math.abs(n) % 4)]
}
}

View File

@ -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(){