From 74725437bb1b344a0bd6cf0594757886b42c0b02 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Fri, 27 Dec 2024 19:46:15 -0500 Subject: [PATCH] Update devtests.js --- mods/devtests.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/mods/devtests.js b/mods/devtests.js index 2cf479b2..15781635 100644 --- a/mods/devtests.js +++ b/mods/devtests.js @@ -190,4 +190,22 @@ elements.clone_fluid = { // "SM%5 AND MX|SM%5 AND MX|SM%5 AND MX", // ], // category: "special" -// } \ No newline at end of file +// } + +addCanvasLayer("devtests"); +canvasLayersPre.unshift(canvasLayers["devtests"]); +devtestsCtx = canvasLayers["devtests"].getContext("2d"); +delete canvasLayers.devtests; + +viewInfo[9] = { // Blur + name: "blur", + pixel: viewInfo[1].pixel, + post: function(ctx) { + devtestsCtx.canvas.width = ctx.canvas.width; + devtestsCtx.canvas.height = ctx.canvas.height; + devtestsCtx.filter = "blur(80px)"; + // Draw the blurred content on the canvas + devtestsCtx.drawImage(canvasLayers["pixels"], 0, 0); + devtestsCtx.filter = "none"; + }, +}; \ No newline at end of file