This commit is contained in:
Brooke Vibber 2022-11-20 17:28:11 -08:00
parent 94a2e40504
commit f43adce8c5

View file

@ -437,6 +437,11 @@ function decimate(input, palette, n) {
error.right.r = nextError.r / 2;
error.right.g = nextError.g / 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.green[x - 1] += nextError.g / 8;
@ -540,7 +545,7 @@ function decimate(input, palette, n) {
let coolFactor = 0;
for (let x = 0; x < line.length; x++) {
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.g += nextError.green[i];
rgb.b += nextError.blue[i];
rgb.cap();
//rgb.cap();
}
input.push(rgb);
}