Triggered Red

This commit is contained in:
Daniel Odendahl Jr
2017-05-10 12:08:22 +00:00
parent aff4cbf5b1
commit acd61ec38f
+6
View File
@@ -36,6 +36,12 @@ module.exports = class TriggeredCommand extends Command {
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, 320, 371);
ctx.drawImage(avatar, 0, 0, 320, 320);
const imgData = ctx.getImageData(0, 0, 320, 320);
const data = imgData.data;
for (let i = 0; i < data.length; i += 4) {
data[i] = Math.max(255, data[i]);
}
ctx.putImageData(imgData, 0, 0);
ctx.drawImage(base, 0, 0);
};
const triggeredImg = await request