Update draw.js

Fixed the non working orientation and palette feature.
This commit is contained in:
Gimlao 2020-01-31 23:07:54 +01:00 committed by GitHub
parent 0324196b5d
commit d7ce7a2adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,12 +133,12 @@ context.checkArgs(1, 3, "<image> <orientation> <palette>");
var f = context.getSafeOpenFile("drawings", argv[1], "png", ["png", "jpg", "jpeg", "bmp"]);
var sess = context.remember();
var upright = argv[2] === "v";
var upright = argv[2] == "v";
var colors = clothColors;
if(argv[3] === "opt") {
if(argv[3] == "opt") {
colors = clothColorsOpt;
player.print("Using optimized palette");
} else if(argv[3] === "optHD") {
} else if(argv[3] == "optHD") {
colors = clothColorsOptHD;
player.print("Using optimized HD palette");
}
@ -165,4 +165,4 @@ if (!f.exists()) {
}
}
}
}
}