summaryrefslogtreecommitdiff
path: root/js/dither.js
blob: d3340dc4500337ddbb3718052f84f68c25114c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var dither = {
  aa: '▓▒░ ',
  a: '▓',
  b: '▒',
  c: '░',
  d: ' ',
  p: function(n){
    if (0 <= 0 && n < 1) {
      return dither.aa[Math.floor(n * 4)]
    }
    else {
      return dither.aa[Math.floor(n % 4)]
    }
  }
}