diff --git a/docs/README.md b/docs/README.md index 87862a0..261807f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -31,7 +31,7 @@
Welcome to Blue Marble! Blue Marble is a userscript for the website wplace.live. +
+ Blue Marble has been verified to work on mobile devices. Blue Marble was designed on Chrome, but Blue Marble might work on "unsupported" browsers not listed above.
+
+ Here is how you install the Blue Marble userscript:
+
BlueMarble.user.js file inside the dashboard of TamperMonkey.There are many settings available for the Blue Marble userscript! Through these settings, you can control how the script behaves. diff --git a/src/Template.js b/src/Template.js index 5044b2c..436a0a0 100644 --- a/src/Template.js +++ b/src/Template.js @@ -56,7 +56,6 @@ export default class Template { const context = canvas.getContext('2d'); context.imageSmoothingEnabled = false; // Nearest neighbor scaleing - context.globalCompositeOperation = "destination-over"; // If we the image we are drawing has transparent pixels, don't preserve them. // Tells the canvas to ignore anything outside of this area context.beginPath(); diff --git a/src/apiManager.js b/src/apiManager.js index b0f9f7a..71f353b 100644 --- a/src/apiManager.js +++ b/src/apiManager.js @@ -57,7 +57,7 @@ export default class ApiManager { if (dataJSON['status'] && dataJSON['status']?.toString()[0] != '2') { // The server is probably down (NOT a 2xx status) - overlay.handleDisplayError(`The game is down!\nCould not fetch userdata.`); + overlay.handleDisplayError(`You are not logged in!\nCould not fetch userdata.`); return; // Kills itself before attempting to display null userdata } diff --git a/src/templateManager.js b/src/templateManager.js index 39666d4..e01820a 100644 --- a/src/templateManager.js +++ b/src/templateManager.js @@ -1,5 +1,15 @@ /** Manages the template system. + * This class handles all external requests for modification to a Template. * @since 0.55.8 + * @example + * // Example of JSON structure for a template +{ + "scriptVersion": "1.13.0", + "schemaVersion": "2.1.0", + "templates": { + "" + } +} */ export default class TemplateManager { @@ -22,7 +32,7 @@ export default class TemplateManager { * @since 0.58.3 * @deprecated Not in use since 0.63.25 */ - getCanvas() { + /* @__PURE__ */getCanvas() { // If the stored canvas is "fresh", return the stored canvas if (document.body.contains(this.canvasTemplate)) {return this.canvasTemplate;} @@ -55,6 +65,18 @@ export default class TemplateManager { return this.canvasTemplate; // Return the new canvas } + createTemplate() { + + } + + deleteTemplate() { + + } + + drawTemplateOnTile() { + + } + /** Sets the template to the image passed in. * @param {File} file - The file of the template image. * @since 0.55.8 @@ -103,7 +125,6 @@ export default class TemplateManager { context.clearRect(0, 0, drawSize, drawSize); // Draws transparent background context.drawImage(tileBitmap, 0, 0, drawSize, drawSize); - //context.globalCompositeOperation = "destination-atop"; // If we the image we are drawing has transparent pixels, don't preserve them. context.drawImage(templateBitmap, coordsTilePixel[2]*3, coordsTilePixel[3]*3); const final = await canvas.convertToBlob({ type: 'image/png' });