This commit is contained in:
Starbeamrainbowlabs 2021-12-28 22:18:40 +00:00
parent 3c279559f5
commit d60d3073bd
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -84,7 +84,8 @@ function pixels2tsv(pixels) {
for(let y = 0; y < pixels.height; y++) { for(let y = 0; y < pixels.height; y++) {
let row = []; let row = [];
for(let x = 0; x < pixels.width; x++) { for(let x = 0; x < pixels.width; x++) {
row.push((pixels.data[((y*pixels.width + x) * 4) + 3] / 255).toFixed(3)); // No need to rescale here - this is done automagically by WorldEditAdditions.
row.push(pixels.data[((y*pixels.width + x) * 4) + 3] / 255);
} }
result += row.join(`\t`) + `\n`; result += row.join(`\t`) + `\n`;
} }