mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 07:46:43 +02:00
Darken to-be-continued sepia
This commit is contained in:
@@ -36,6 +36,10 @@ module.exports = class ToBeContinuedCommand extends Command {
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(data, 0, 0);
|
||||
sepia(ctx, 0, 0, data.width, data.height);
|
||||
ctx.globalAlpha = 0.5;
|
||||
ctx.fillStyle = '#704214';
|
||||
ctx.fillRect(0, 0, data.width, data.height);
|
||||
ctx.globalAlpha = 1;
|
||||
const ratio = base.width / base.height;
|
||||
const width = canvas.width / 2;
|
||||
const height = Math.round(width / ratio);
|
||||
|
||||
Reference in New Issue
Block a user