









A: Blue Marble does not contain malicious code. The Blue Marble code can be found in the src/ folder. If you worry about Blue Marble being malware, you can read the code, then bundle it yourself using the tools in build/.
A: Unfortunatly, Blue Marble will not support the automatic placement of pixels without user interaction. +
A: Unfortunately, Blue Marble will not support the automatic placement of pixels without user interaction because it is not allowed by Wplace.
A: Turn the userscript off and refresh the page.
diff --git a/package.json b/package.json index ffb819c..4b86014 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wplace-bluemarble", - "version": "0.80.0", + "version": "0.81.0", "type": "module", "homepage": "https://bluemarble.camilledaguin.fr/", "repository": { diff --git a/src/BlueMarble.meta.js b/src/BlueMarble.meta.js index 79d7598..102dec5 100644 --- a/src/BlueMarble.meta.js +++ b/src/BlueMarble.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Blue Marble // @namespace https://github.com/SwingTheVine/ -// @version 0.80.0 +// @version 0.81.0 // @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA. // @author SwingTheVine // @license MPL-2.0 @@ -16,7 +16,7 @@ // @grant GM_addStyle // @grant GM.setValue // @grant GM_getValue -// @resource CSS-BM-File https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/f3ee47c55505d29255b29e320891453884f13369/dist/BlueMarble.user.css +// @resource CSS-BM-File https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/a3b4a288514dc48a9232b1aeeb6b377af6fdfe7c/dist/BlueMarble.user.css // ==/UserScript== // Wplace --> https://wplace.live diff --git a/src/Template.js b/src/Template.js index d51a9a6..0832c1b 100644 --- a/src/Template.js +++ b/src/Template.js @@ -129,18 +129,23 @@ export default class Template { for (let y = 0; y < canvasHeight; y++) { for (let x = 0; x < canvasWidth; x++) { // For every pixel... - - // ... Make it transparent unless it is the "center" - if (x % shreadSize !== 1 || y % shreadSize !== 1) { - const pixelIndex = (y * canvasWidth + x) * 4; // Find the pixel index in an array where every 4 indexes are 1 pixel + const pixelIndex = (y * canvasWidth + x) * 4; // Find the pixel index in an array where every 4 indexes are 1 pixel + // If the pixel is the color #deface, draw a translucent gray checkerboard pattern + if ( + imageData.data[pixelIndex] === 222 && + imageData.data[pixelIndex + 1] === 250 && + imageData.data[pixelIndex + 2] === 206 + ) { + if ((x + y) % 2 === 0) { // Formula for checkerboard pattern + imageData.data[pixelIndex] = 0; + imageData.data[pixelIndex + 1] = 0; + imageData.data[pixelIndex + 2] = 0; + imageData.data[pixelIndex + 3] = 32; // Translucent black + } else { // Transparent negative space + imageData.data[pixelIndex + 3] = 0; + } + } else if (x % shreadSize !== 1 || y % shreadSize !== 1) { // Otherwise only draw the middle pixel imageData.data[pixelIndex + 3] = 0; // Make the pixel transparent on the alpha channel - - // if (!!imageData.data[pixelIndex + 3]) { - // imageData.data[pixelIndex + 3] = 50; // Alpha - // imageData.data[pixelIndex] = 30; // Red - // imageData.data[pixelIndex + 1] = 30; // Green - // imageData.data[pixelIndex + 2] = 30; // Blue - // } } } } diff --git a/src/overlay.css b/src/overlay.css index 7a0a12e..1bc9429 100644 --- a/src/overlay.css +++ b/src/overlay.css @@ -8,7 +8,7 @@ padding: 10px; border-radius: 8px; z-index: 9000; - transition: all 0.3s ease; + transition: all 0.3s ease, transform 0s; max-width: 300px; width: auto; /* Performance optimizations for smooth dragging */