Squashed commit of the following:

commit aca7df4189
Author: SwingTheVine <swingthevine@gmail.com>
Date:   Sat Aug 9 20:52:22 2025 -0400

    Added color palette to src/utils.js

commit 13ff8fbe33
Merge: 70eb0a2 f2d34d8
Author: SwingTheVine <swingthevine@gmail.com>
Date:   Sat Aug 9 20:49:26 2025 -0400

    Merge branch 'main' of https://github.com/SwingTheVine/Wplace-BlueMarble

commit 70eb0a26fa
Author: SwingTheVine <swingthevine@gmail.com>
Date:   Fri Aug 8 19:38:49 2025 -0400

    Update to Wiki Docs
This commit is contained in:
SwingTheVine 2025-08-10 21:17:06 -04:00
parent 5370178cdb
commit d4ccbdc465
11 changed files with 286 additions and 6 deletions

View file

@ -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);

View file

@ -61,6 +61,7 @@
<li>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 :(</li>
<li>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.</li>
<li>Low quality code will be rejected.</li>
<li>You can find documentation for Blue Marble <a href="https://swingthevine.github.io/Wplace-BlueMarble/index.html" target="_blank" rel="noopener noreferrer">here</a>.</li>
</ul>
</p>
@ -78,7 +79,7 @@
<h2>What Can I Contribute?</h2>
<h3>Programming</h3>
<p>
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 <a href="https://roadmap.sh/javascript" target="_blank" rel="noopener noreferrer">roadmap for learning JavaScript</a>. 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 <a href="https://roadmap.sh/javascript" target="_blank" rel="noopener noreferrer">roadmap for learning JavaScript</a>. 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 <a href="https://swingthevine.github.io/Wplace-BlueMarble/index.html" target="_blank" rel="noopener noreferrer">here</a>.
</p>
<h3>Translation</h3>
<p>

11
package-lock.json generated
View file

@ -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",

View file

@ -9,6 +9,7 @@
"devDependencies": {
"esbuild": "^0.25.0",
"jsdoc": "^4.0.4",
"minami": "^1.2.3",
"terser": "^5.43.1"
}
}

View file

@ -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();

View file

@ -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 {

View file

@ -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
*/

View file

@ -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
*/

View file

@ -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 {

View file

@ -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

View file

@ -125,4 +125,270 @@ export function base64ToUint8(base64) {
array[i] = binary.charCodeAt(i);
}
return array;
}
}
/** 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]
}
];