diff --git a/canvasFunctions.ts b/canvasFunctions.ts index ac844d9..72caf1c 100644 --- a/canvasFunctions.ts +++ b/canvasFunctions.ts @@ -59,6 +59,8 @@ export function ditherData(imageDatas: ImageDataWithCoordinates[], priorityData: for (let i = 0; i < frameWidth; i++) { for (let j = 0; j < frameHeight; j++) { let rgba = getHighestRGBA(imageDatas, i, j) + if (rgba.a < ALPHA_THRESHOLD) + continue let imageIndex = (j * frameWidth + i) * 4 let middlePixelIndex = ((j * 3 + 1) * rv.width + i * 3 + 1) * 4; let alpha = priorityData ? priorityData.data[imageIndex] : rgba.a diff --git a/dist/templateManager.user.js b/dist/templateManager.user.js index 8e37843..df79553 100644 --- a/dist/templateManager.user.js +++ b/dist/templateManager.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name template-manager -// @version 0.5.6 +// @version 0.5.7 // @description Manages your templates on various canvas games // @author LittleEndu, Mikarific, April // @license MIT @@ -293,6 +293,8 @@ for (let i = 0; i < frameWidth; i++) { for (let j = 0; j < frameHeight; j++) { let rgba = getHighestRGBA(imageDatas, i, j); + if (rgba.a < ALPHA_THRESHOLD) + continue; let imageIndex = (j * frameWidth + i) * 4; let middlePixelIndex = ((j * 3 + 1) * rv.width + i * 3 + 1) * 4; let alpha = priorityData ? priorityData.data[imageIndex] : rgba.a; diff --git a/osuplace2023.json b/osuplace2023.json index 429f590..c8f7cce 100644 --- a/osuplace2023.json +++ b/osuplace2023.json @@ -64,8 +64,12 @@ ], "blacklist": [ { - "name": "r/osuplace", + "name": "old r/osuplace", "url": "https://rentry.org/osuplace2023/raw" + }, + { + "name": "old r/osuplace", + "url": "https://rentry.co/osuplace2023/raw" } ] } \ No newline at end of file diff --git a/package.json b/package.json index 1aadc30..ebea126 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "template-manager", - "version": "0.5.6", + "version": "0.5.7", "description": "Manages your templates on various canvas games", "main": "main.ts", "scripts": {