From 70eb0a26faa0dc419b994ad8c9a7a8e8f1a10596 Mon Sep 17 00:00:00 2001
From: SwingTheVine
Date: Fri, 8 Aug 2025 19:38:49 -0400
Subject: [PATCH 1/2] Update to Wiki Docs
---
build/build.js | 2 +-
docs/CONTRIBUTING.md | 3 ++-
package-lock.json | 11 +++++++++--
package.json | 1 +
src/Overlay.js | 1 +
src/Template.js | 1 +
src/apiManager.js | 1 +
src/main.js | 2 +-
src/observers.js | 1 +
src/templateManager.js | 1 +
10 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/build/build.js b/build/build.js
index 2e3f45b..0d75296 100644
--- a/build/build.js
+++ b/build/build.js
@@ -28,7 +28,7 @@ console.log(`${consoleStyle.BLUE}Starting build...${consoleStyle.RESET}`);
if (isGitHub) {
try {
console.log(`Generating JSDoc...`);
- execSync(`npx jsdoc src/ -r -d docs`, { stdio: "inherit" });
+ execSync(`npx jsdoc src/ -r -d docs -t node_modules/minami`, { stdio: "inherit" });
console.log(`JSDoc built ${consoleStyle.GREEN}successfully${consoleStyle.RESET}`);
} catch (error) {
console.error(`${consoleStyle.RED + consoleStyle.BOLD}Failed to generate JSDoc${consoleStyle.RESET}:`, error);
diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md
index 692e07d..3aa6adb 100644
--- a/docs/CONTRIBUTING.md
+++ b/docs/CONTRIBUTING.md
@@ -61,6 +61,7 @@
I don't want to waste your time, so double check with me before starting a big change like adding a new feature. For example, imagine you spend 50 hours making a bot that automatically places pixels, then your pull request was rejected because a bot that automatically places pixles does not align with the "Mission" of Blue Marble. That would be sad :(
Follow the style of the project. E.g., if all overlays are made by calling `Overlay()`, and you want to make a new overlay, you should probably call `Overlay()` as well.
Low quality code will be rejected.
+ You can find documentation for Blue Marble here.
@@ -78,7 +79,7 @@
What Can I Contribute?
Programming
- Most of the work to be done in this userscript is related to programming. It is helpful to have a background in programming, but not required. If you are looking to learn JavaScript and its syntax, check out this roadmap for learning JavaScript. We strongly recommend that you understand functions, methods, classes, and Object-Oriented-Programming if you plan to implement a brand new feature. More technical knowledge like method chaining and lambda expressions are useful but not required.
+ Most of the work to be done in this userscript is related to programming. It is helpful to have a background in programming, but not required. If you are looking to learn JavaScript and its syntax, check out this roadmap for learning JavaScript. We strongly recommend that you understand functions, methods, classes, and Object-Oriented-Programming if you plan to implement a brand new feature. More technical knowledge like method chaining and lambda expressions are useful but not required. You can find the documentation for Blue Marble here.
Translation
diff --git a/package-lock.json b/package-lock.json
index 78aa7ce..572b2b8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,15 +1,16 @@
{
"name": "wplace-bluemarble",
- "version": "0.75.1",
+ "version": "0.76.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "wplace-bluemarble",
- "version": "0.75.1",
+ "version": "0.76.0",
"devDependencies": {
"esbuild": "^0.25.0",
"jsdoc": "^4.0.4",
+ "minami": "^1.2.3",
"terser": "^5.43.1"
}
},
@@ -777,6 +778,12 @@
"integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==",
"dev": true
},
+ "node_modules/minami": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/minami/-/minami-1.2.3.tgz",
+ "integrity": "sha512-3f2QqqbUC1usVux0FkQMFYB73yd9JIxmHSn1dWQacizL6hOUaNu6mA3KxZ9SfiCc4qgcgq+5XP59+hP7URa1Dw==",
+ "dev": true
+ },
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
diff --git a/package.json b/package.json
index 7d5db7c..ed2eb18 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,7 @@
"devDependencies": {
"esbuild": "^0.25.0",
"jsdoc": "^4.0.4",
+ "minami": "^1.2.3",
"terser": "^5.43.1"
}
}
diff --git a/src/Overlay.js b/src/Overlay.js
index 176eb9d..7484044 100644
--- a/src/Overlay.js
+++ b/src/Overlay.js
@@ -1,5 +1,6 @@
/** The overlay builder for the Blue Marble script.
* @description This class handles the overlay UI for the Blue Marble script.
+ * @class Overlay
* @since 0.0.2
* @example
* const overlay = new Overlay();
diff --git a/src/Template.js b/src/Template.js
index 4c63ee7..d51a9a6 100644
--- a/src/Template.js
+++ b/src/Template.js
@@ -2,6 +2,7 @@ import { uint8ToBase64 } from "./utils";
/** An instance of a template.
* Handles all mathematics, manipulation, and analysis regarding a single template.
+ * @class Template
* @since 0.65.2
*/
export default class Template {
diff --git a/src/apiManager.js b/src/apiManager.js
index 1dbd9b9..82dd2cc 100644
--- a/src/apiManager.js
+++ b/src/apiManager.js
@@ -1,5 +1,6 @@
/** ApiManager class for handling API requests, responses, and interactions.
* Note: Fetch spying is done in main.js, not here.
+ * @class ApiManager
* @since 0.11.1
*/
diff --git a/src/main.js b/src/main.js
index 8aa3061..a5e4dbb 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,4 +1,4 @@
-/** The main file. Everything in the userscript is executed from here.
+/** @file The main file. Everything in the userscript is executed from here.
* @since 0.0.0
*/
diff --git a/src/observers.js b/src/observers.js
index b64febd..84ebac9 100644
--- a/src/observers.js
+++ b/src/observers.js
@@ -1,5 +1,6 @@
/** This class contains all MutationObservers used (which is 1 probably).
* This is not an object, but rather a "collection" of functions (in a class).
+ * @class Observers
* @since 0.43.2
*/
export default class Observers {
diff --git a/src/templateManager.js b/src/templateManager.js
index 1bc766e..703738a 100644
--- a/src/templateManager.js
+++ b/src/templateManager.js
@@ -4,6 +4,7 @@ import { base64ToUint8, numberToEncoded } from "./utils";
/** Manages the template system.
* This class handles all external requests for template modification, creation, and analysis.
* It serves as the central coordinator between template instances and the user interface.
+ * @class TemplateManager
* @since 0.55.8
* @example
* // JSON structure for a template
From aca7df4189e2a0846688f95c4f1dfeb203bde659 Mon Sep 17 00:00:00 2001
From: SwingTheVine
Date: Sat, 9 Aug 2025 20:52:22 -0400
Subject: [PATCH 2/2] Added color palette to src/utils.js
---
src/utils.js | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 267 insertions(+), 1 deletion(-)
diff --git a/src/utils.js b/src/utils.js
index b77f22d..312979f 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -125,4 +125,270 @@ export function base64ToUint8(base64) {
array[i] = binary.charCodeAt(i);
}
return array;
-}
\ No newline at end of file
+}
+
+/** The color palette used by wplace.live
+ * @since 0.78.0
+ * @examples
+ * import utils from 'src/utils.js';
+ * console.log(utils[5]?.name); // "White"
+ * console.log(utils[5]?.rgb); // [255, 255, 255]
+ */
+export const colorpalette = [
+ {
+ "name": "Transparent",
+ "rgb": [0, 0, 0]
+ },
+ {
+ "name": "Black",
+ "rgb": [0, 0, 0]
+ },
+ {
+ "name": "Dark Gray",
+ "rgb": [60, 60, 60]
+ },
+ {
+ "name": "Gray",
+ "rgb": [120, 120, 120]
+ },
+ {
+ "name": "Light Gray",
+ "rgb": [210, 210, 210]
+ },
+ {
+ "name": "White",
+ "rgb": [255, 255, 255]
+ },
+ {
+ "name": "Deep Red",
+ "rgb": [96, 0, 24]
+ },
+ {
+ "name": "Red",
+ "rgb": [237, 28, 36]
+ },
+ {
+ "name": "Orange",
+ "rgb": [255, 127, 39]
+ },
+ {
+ "name": "Gold",
+ "rgb": [246, 170, 9]
+ },
+ {
+ "name": "Yellow",
+ "rgb": [249, 221, 59]
+ },
+ {
+ "name": "Light Yellow",
+ "rgb": [255, 250, 188]
+ },
+ {
+ "name": "Dark Green",
+ "rgb": [14, 185, 104]
+ },
+ {
+ "name": "Green",
+ "rgb": [19, 230, 123]
+ },
+ {
+ "name": "Light Green",
+ "rgb": [135, 255, 94]
+ },
+ {
+ "name": "Dark Teal",
+ "rgb": [12, 129, 110]
+ },
+ {
+ "name": "Teal",
+ "rgb": [16, 174, 166]
+ },
+ {
+ "name": "Light Teal",
+ "rgb": [19, 225, 190]
+ },
+ {
+ "name": "Dark Blue",
+ "rgb": [40, 80, 158]
+ },
+ {
+ "name": "Blue",
+ "rgb": [64, 147, 228]
+ },
+ {
+ "name": "Cyan",
+ "rgb": [96, 247, 242]
+ },
+ {
+ "name": "Indigo",
+ "rgb": [107, 80, 246]
+ },
+ {
+ "name": "Light Indigo",
+ "rgb": [153, 177, 251]
+ },
+ {
+ "name": "Dark Purple",
+ "rgb": [120, 12, 153]
+ },
+ {
+ "name": "Purple",
+ "rgb": [170, 56, 185]
+ },
+ {
+ "name": "Light Purple",
+ "rgb": [224, 159, 249]
+ },
+ {
+ "name": "Dark Pink",
+ "rgb": [203, 0, 122]
+ },
+ {
+ "name": "Pink",
+ "rgb": [236, 31, 128]
+ },
+ {
+ "name": "Light Pink",
+ "rgb": [243, 141, 169]
+ },
+ {
+ "name": "Dark Brown",
+ "rgb": [104, 70, 52]
+ },
+ {
+ "name": "Brown",
+ "rgb": [149, 104, 42]
+ },
+ {
+ "name": "Beige",
+ "rgb": [248, 178, 119]
+ },
+ {
+ "name": "Medium Gray",
+ "rgb": [170, 170, 170]
+ },
+ {
+ "name": "Dark Red",
+ "rgb": [165, 14, 30]
+ },
+ {
+ "name": "Light Red",
+ "rgb": [250, 128, 114]
+ },
+ {
+ "name": "Dark Orange",
+ "rgb": [228, 92, 26]
+ },
+ {
+ "name": "Light Tan",
+ "rgb": [214, 181, 148]
+ },
+ {
+ "name": "Dark Goldenrod",
+ "rgb": [156, 132, 49]
+ },
+ {
+ "name": "Goldenrod",
+ "rgb": [197, 173, 49]
+ },
+ {
+ "name": "Light Goldenrod",
+ "rgb": [232, 212, 95]
+ },
+ {
+ "name": "Dark Olive",
+ "rgb": [74, 107, 58]
+ },
+ {
+ "name": "Olive",
+ "rgb": [90, 148, 74]
+ },
+ {
+ "name": "Light Olive",
+ "rgb": [132, 197, 115]
+ },
+ {
+ "name": "Dark Cyan",
+ "rgb": [15, 121, 159]
+ },
+ {
+ "name": "Light Cyan",
+ "rgb": [187, 250, 242]
+ },
+ {
+ "name": "Light Blue",
+ "rgb": [125, 199, 255]
+ },
+ {
+ "name": "Dark Indigo",
+ "rgb": [77, 49, 184]
+ },
+ {
+ "name": "Dark Slate Blue",
+ "rgb": [74, 66, 132]
+ },
+ {
+ "name": "Slate Blue",
+ "rgb": [122, 113, 196]
+ },
+ {
+ "name": "Light Slate Blue",
+ "rgb": [181, 174, 241]
+ },
+ {
+ "name": "Light Brown",
+ "rgb": [219, 164, 99]
+ },
+ {
+ "name": "Dark Beige",
+ "rgb": [209, 128, 81]
+ },
+ {
+ "name": "Light Beige",
+ "rgb": [255, 197, 165]
+ },
+ {
+ "name": "Dark Peach",
+ "rgb": [155, 82, 73]
+ },
+ {
+ "name": "Peach",
+ "rgb": [209, 128, 120]
+ },
+ {
+ "name": "Light Peach",
+ "rgb": [250, 182, 164]
+ },
+ {
+ "name": "Dark Tan",
+ "rgb": [123, 99, 82]
+ },
+ {
+ "name": "Tan",
+ "rgb": [156, 132, 107]
+ },
+ {
+ "name": "Dark Slate",
+ "rgb": [51, 57, 65]
+ },
+ {
+ "name": "Slate",
+ "rgb": [109, 117, 141]
+ },
+ {
+ "name": "Light Slate",
+ "rgb": [179, 185, 209]
+ },
+ {
+ "name": "Dark Stone",
+ "rgb": [109, 100, 63]
+ },
+ {
+ "name": "Stone",
+ "rgb": [148, 140, 107]
+ },
+ {
+ "name": "Light Stone",
+ "rgb": [205, 197, 158]
+ }
+];
\ No newline at end of file