ooh
This commit is contained in:
parent
94a2e40504
commit
f43adce8c5
1 changed files with 7 additions and 2 deletions
|
@ -437,6 +437,11 @@ function decimate(input, palette, n) {
|
||||||
error.right.r = nextError.r / 2;
|
error.right.r = nextError.r / 2;
|
||||||
error.right.g = nextError.g / 2;
|
error.right.g = nextError.g / 2;
|
||||||
error.right.b = nextError.b / 2;
|
error.right.b = nextError.b / 2;
|
||||||
|
if (x == 159) {
|
||||||
|
error.red[0] = error.right.r;
|
||||||
|
error.green[0] = error.right.g;
|
||||||
|
error.blue[0] = error.right.b;
|
||||||
|
}
|
||||||
|
|
||||||
error.red[x - 1] += nextError.r / 8;
|
error.red[x - 1] += nextError.r / 8;
|
||||||
error.green[x - 1] += nextError.g / 8;
|
error.green[x - 1] += nextError.g / 8;
|
||||||
|
@ -540,7 +545,7 @@ function decimate(input, palette, n) {
|
||||||
let coolFactor = 0;
|
let coolFactor = 0;
|
||||||
for (let x = 0; x < line.length; x++) {
|
for (let x = 0; x < line.length; x++) {
|
||||||
if (output[x] == i) {
|
if (output[x] == i) {
|
||||||
coolFactor += fitness[x] ** 3;
|
coolFactor += (fitness[x] ** 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +610,7 @@ function convert(source, sink) {
|
||||||
rgb.r += nextError.red[i];
|
rgb.r += nextError.red[i];
|
||||||
rgb.g += nextError.green[i];
|
rgb.g += nextError.green[i];
|
||||||
rgb.b += nextError.blue[i];
|
rgb.b += nextError.blue[i];
|
||||||
rgb.cap();
|
//rgb.cap();
|
||||||
}
|
}
|
||||||
input.push(rgb);
|
input.push(rgb);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue