mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +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');
|
const ctx = canvas.getContext('2d');
|
||||||
ctx.drawImage(data, 0, 0);
|
ctx.drawImage(data, 0, 0);
|
||||||
sepia(ctx, 0, 0, data.width, data.height);
|
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 ratio = base.width / base.height;
|
||||||
const width = canvas.width / 2;
|
const width = canvas.width / 2;
|
||||||
const height = Math.round(width / ratio);
|
const height = Math.round(width / ratio);
|
||||||
|
|||||||
Reference in New Issue
Block a user