Parcourir la source

Fix ground rendering over entities when taking a screenshot

master
Fen Dweller il y a 5 ans
Parent
révision
cb5532ebd8
1 fichiers modifiés avec 7 ajouts et 6 suppressions
  1. +7
    -6
      macrovision.js

+ 7
- 6
macrovision.js Voir le fichier

@@ -3626,20 +3626,21 @@ function exportCanvas(callback) {
}

function generateScreenshot(callback) {
renderToCanvas();

/** @type {CanvasRenderingContext2D} */
const ctx = document.querySelector("#display").getContext("2d");

ctx.fillStyle = "#555";
ctx.font = "normal normal lighter 16pt coda";
ctx.fillText("macrovision.crux.sexy", 10, 25);

if (checkBodyClass("toggle-bottom-cover")) {
ctx.fillStyle = "#000";
ctx.fillRect(0, pos2pix({x: 0, y: 0}).y, canvasWidth + 100, canvasHeight);
}
renderToCanvas();

ctx.fillStyle = "#555";
ctx.font = "normal normal lighter 16pt coda";
ctx.fillText("macrovision.crux.sexy", 10, 25);

exportCanvas(blob => {
callback(blob);
});


Chargement…
Annuler
Enregistrer