From cb5532ebd840859f4df9b6b75ecc38b434b01979 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 23 Jun 2020 23:26:09 -0400 Subject: [PATCH] Fix ground rendering over entities when taking a screenshot --- macrovision.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/macrovision.js b/macrovision.js index c7d69ce8..dd2b5973 100644 --- a/macrovision.js +++ b/macrovision.js @@ -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); });