浏览代码

Make screenshots respect entity brightness

master
Fen Dweller 5 年前
父节点
当前提交
ffe73d4e18
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      macrovision.js

+ 5
- 0
macrovision.js 查看文件

@@ -3744,8 +3744,13 @@ function renderToCanvas() {

let xSize = img.getBoundingClientRect().width;
let ySize = img.getBoundingClientRect().height;
const oldFilter = ctx.filter
const brightness = getComputedStyle(element).getPropertyValue("--brightness")
ctx.filter = `brightness(${brightness})`;

ctx.drawImage(img, x, y, xSize, ySize);

ctx.filter = oldFilter
});
}



正在加载...
取消
保存