Procházet zdrojové kódy

Make screenshots respect entity brightness

master
Fen Dweller před 5 roky
rodič
revize
ffe73d4e18
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. +5
    -0
      macrovision.js

+ 5
- 0
macrovision.js Zobrazit soubor

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


let xSize = img.getBoundingClientRect().width; let xSize = img.getBoundingClientRect().width;
let ySize = img.getBoundingClientRect().height; 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.drawImage(img, x, y, xSize, ySize);

ctx.filter = oldFilter
}); });
} }




Načítá se…
Zrušit
Uložit