From 7b27054e0e8dbcd83a42dc330ee9673ebfdfa155 Mon Sep 17 00:00:00 2001
From: SwingTheVine
Thank you for wanting to contribute to the userscript "Blue Marble"! It means a lot to me that someone likes my project enough to want to help it grow. If you haven't already done so, consider joining our Discord. You can ask questions about the userscript there and receive feedback.
+
+ How to Contribute
+
+ Production Enviroment
+
+
+ Npm Run
+
+
Charts
+
@@ -42,6 +51,8 @@
Development Environment
+ Note: If you are using AI, and you want to tell the AI how the codebase files are related to each-other, go to the Class diagram of relationships for Blue Marble diagram in the chart section of this file. Copy the chart, and give it to the AI.
Summary
@@ -127,6 +138,182 @@
+ Here lies information that may be of interest to those who wish to modify Blue Marble. + +
+ Running npm run build will compile Blue Marble. The compiled files can be found in the dist/ directory. Running npm run patch will increment the patch version, and compile Blue Marble.
+
+ Use the arrow and zoom buttons to navigate the charts. Use the ↔️ button to go fullscreen. Use the 🔄 button to reset. All buttons can be found on the chart. Use the "two squares" icon to copy the chart. If you need assistance reading the chart, copy the chart into an AI using the "two squares" button on the chart. +
+ + + + +Class diagram of relationships for Blue Marble: +(last updated 0.74.0) +```mermaid +--- + config: + class: + hideEmptyMembersBox: true +--- +classDiagram + class main { + name : string + version : string + +inject() + +observeBlack() + +buildOverlayMain() + } + class utils { + +escapeHTML() + +serverTPtoDisplayTP() + +negativeSafeModulo() + +consoleLog() + +consoleError() + +consoleWarn() + +numberToEncoded() + +uint8ToBase64() + +base64ToUint8() + } + class apiManager { + coordsTilePixel : number[4] + +spontaneousResponseListener() + } + class templateManager { + userID : number + templatesShouldBeDrawn : boolean + +createJSON() + +createTemplate() + -storeTemplates() + +disableTemplate() + +drawTemplateOnTile() + +importJSON() + +parseBlueMarble() + +setTemplatesShouldBeDrawn() + } + class Template { + +createTemplateTiles() + } + class Overlay { + +setApiManager() + -createElement() + +add...() + +buildElement() + +buildOverlay() + +updateInnerHTML() + +handleDrag() + +handleDisplayStatus() + +handleDisplayError() + } + + main o-- apiManager : creates + main o-- utils : creates + main o-- Overlay : creates main, tabTemplate + main o-- templateManager : creates + apiManager ..> templateManager : calls drawTemplateOnTiles(), sets userID + apiManager ..> utils : calls escapeHTML(), numberToEncoded(), serverTPtoDisplayTP() + Overlay ..> apiManager : uses coordsTilePixel + Overlay ..> templateManager : calls setTemplatesShouldBeDrawn() + templateManager *-- Template : manages + templateManager ..> utils : calls base64ToUint8(), numberToEncoded() + Template ..> utils : calls uint8ToBase64() +``` + +Class diagram of relationships for Blue Marble's compiler/builder: +(last updated 0.74.0) +```mermaid +--- + config: + class: + hideEmptyMembersBox: true +--- +classDiagram + + namespace npm_run_patch { + class `patch.js` { + } + + class `docs/README.md` { + } + } + + namespace npm_run_build { + class `build.js` { + mapCSS : JSON Object + } + + class `cssMangler.js` { + importMap : JSON Object + returnMap : JSON Object + +mangleSelectors() + +escapeRegex() + +numberToEncoded() + } + + class `update-version.js` { + } + + class `utils.js` { + +consoleStyle() + } + + class esbuild { + +build() + } + + class terser { + +minify() + } + + class `dist/BlueMarble.user.js` { + } + + class `dist/BlueMarble.user.css` { + } + + class `dist/BlueMarble.user.css.map.json` { + } + + class `src/BlueMarble.meta.js` { + } + + class `src/main.js` { + } + + class `package.json` { + } + } + + note for `patch.js` "calls npm_run_build" + `build.js` ..> terser : requires + `build.js` ..> `utils.js` : calls consoleStyle() + `build.js` ..> `update-version.js` : executes + `build.js` ..> `src/BlueMarble.meta.js` : reads + `build.js` ..> esbuild : calls build() + `build.js` ..> `dist/BlueMarble.user.css` : writes + esbuild ..> `src/main.js` : reads + `build.js` ..> `dist/BlueMarble.user.js` : writes + terser ..> `dist/BlueMarble.user.js` : reads & writes + `build.js` ..> `cssMangler.js` : calls manglerSelectors() + `cssMangler.js` ..> `dist/BlueMarble.user.css.map.json` : reads + `cssMangler.js` ..> `dist/BlueMarble.user.js` : reads & writes + `cssMangler.js` ..> `dist/BlueMarble.user.css` : reads & writes + `build.js` <.. `cssMangler.js` : returns mapCSS + `build.js` ..> `dist/BlueMarble.user.css.map.json` : writes mapCSS + `patch.js` ..> `docs/README.md` : reads & writes + `patch.js` ..> `utils.js` : calls consoleStyle() + `update-version.js` ..> `package.json` : reads + `update-version.js` ..> `src/BlueMarble.meta.js` : reads & writes + `update-version.js` ..> `utils.js` : calls consoleStyle() +``` +
This is what SwingTheVine uses to program Blue Marble. You don't have to use the exact same thing. This is provided for reference.
@@ -149,4 +336,4 @@
Storage: 932 GB SSD Samsung SSD 970 EVO Plus 1TB, 238 GB SSD HFM256GDJTNG-8310A
Graphics Card: NVIDIA GeForce GTX 1660 Ti (6 GB)
System Type: 64-bit operating system
-
- Welcome to Blue Marble! Blue Marble is a userscript for the website wplace.live. If you like this userscript, please ⭐ the repository!
+ Welcome to Blue Marble! Blue Marble is a userscript for the website wplace.live. If you like this userscript, please ⭐ the repository! If you wish to contribute to Blue Marble, check out the CONTRIBUTING.md file in docs/.
- 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. Some versions/forks of FireFox work. Some versions/forks of FireFox do not work.
+ 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. Some versions/forks of Firefox work. Some versions/forks of Firefox do not work.
Installation instructions for Blue Marble are below. Click the arrows to expand the instructions you want to see. Blue text is a link.
- Computer - Chrome (Click to Expand)
+ Install Chrome (Computer) (Click to Expand)
+
-
@@ -67,42 +78,11 @@
- 
- 
BlueMarble.user.js file inside the dashboard of TamperMonkey.
-
- 
- 
- 
- Computer - Edge (Click to Expand)
-
-
-
- 
- 
- 

BlueMarble.user.js file inside the dashboard of TamperMonkey.
@@ -118,19 +98,50 @@
- Computer - FireFox (Click to Expand)
+ Install Edge (Computer) (Click to Expand)
-
+
- 
+
+ 
+ 
- 
BlueMarble.user.js file inside the dashboard of TamperMonkey.
- 
+
+ 
+ 
+ Install Firefox (Computer) (Click to Expand)
+
+
+
+ 
+ 
BlueMarble.user.js file inside the dashboard of TamperMonkey.
+
+ 
