mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-26 16:56:37 +00:00
js/dither.js: merged into js/ui/palette.js.
index.html: updates script URIs.
This commit is contained in:
parent
f27a25beda
commit
15347846e5
@ -133,7 +133,6 @@
|
|||||||
<script src="js/util.js"></script>
|
<script src="js/util.js"></script>
|
||||||
<script src="js/ext/unicode.js"></script>
|
<script src="js/ext/unicode.js"></script>
|
||||||
<script src="js/ext/color.js"></script>
|
<script src="js/ext/color.js"></script>
|
||||||
<script src="js/dither.js"></script>
|
|
||||||
<script src="js/clipboard.js"></script>
|
<script src="js/clipboard.js"></script>
|
||||||
<script src="js/ext/upload.js"></script>
|
<script src="js/ext/upload.js"></script>
|
||||||
<script src="js/ext/user.js"></script>
|
<script src="js/ext/user.js"></script>
|
||||||
|
10
js/dither.js
10
js/dither.js
@ -1,10 +0,0 @@
|
|||||||
var dither = {
|
|
||||||
aa: '▓▒░ ',
|
|
||||||
a: '▓',
|
|
||||||
b: '▒',
|
|
||||||
c: '░',
|
|
||||||
d: ' ',
|
|
||||||
p: function(n){
|
|
||||||
return dither.aa[Math.floor(Math.abs(n) % 4)]
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,6 +8,16 @@ var palette = (function(){
|
|||||||
var palette_index = localStorage.getItem("ascii.palette") || 1
|
var palette_index = localStorage.getItem("ascii.palette") || 1
|
||||||
var palette_list = [all_hue, all_inv_hue, mirc_color, mirc_color_reverse]
|
var palette_list = [all_hue, all_inv_hue, mirc_color, mirc_color_reverse]
|
||||||
var palette_fn = palette_list[palette_index]
|
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.chars = " " + dither.a + dither.b + dither.c
|
||||||
|
|
||||||
palette.repaint = function(){
|
palette.repaint = function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user