Added charts

This commit is contained in:
SwingTheVine 2025-08-07 16:56:24 -04:00
parent 221ef34551
commit 07845cb9d3
2 changed files with 183 additions and 1 deletions

View file

@ -33,6 +33,15 @@
<tr>
<td>&emsp;<a href="#how-to-contribute">How to Contribute</a></td>
</tr>
<tr>
<td>&emsp;<a href="#production-enviroment">Production Enviroment</a></td>
</tr>
<tr>
<td>&emsp;&emsp;<a href="#npm-run">Npm Run</a></td>
</tr>
<tr>
<td>&emsp;&emsp;<a href="#charts">Charts</a></td>
</tr>
<tr>
<td>&emsp;<a href="#development-environment">Development Environment</a></td>
</tr>
@ -127,6 +136,179 @@
</ol>
</p>
<h2>Production Enviroment</h2>
<p>
Here lies information that may be of interest to those who wish to modify Blue Marble.
<h3>Npm Run</h3>
<p>
Running <code>npm run build</code> will compile Blue Marble. The compiled files can be found in the <code>dist/</code> directory. Running <code>npm run patch</code> will increment the patch version, and compile Blue Marble.
</p>
<h3>Charts</h3>
<p>
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.
</p>
</p>
<!-- https://mermaid.js.org/syntax/classDiagram.html -->
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
+createJSON()
+createTemplate()
-storeTemplates()
+disableTemplate()
+drawTemplateOnTile()
+importJSON()
+parseBlueMarble()
}
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
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()
```
<h2>Development Environment</h2>
<p>
This is what SwingTheVine uses to program Blue Marble. You don't have to use the exact same thing. This is provided for reference.

View file

@ -53,7 +53,7 @@
<h2>Overview</h2>
<p>
Welcome to Blue Marble! Blue Marble is a userscript for the website <a href="https://wplace.live/" target="_blank" rel="noopener noreferrer">wplace.live</a>. If you like this userscript, please ⭐ the repository!
Welcome to Blue Marble! Blue Marble is a userscript for the website <a href="https://wplace.live/" target="_blank" rel="noopener noreferrer">wplace.live</a>. If you like this userscript, please ⭐ the repository! If you wish to contribute to Blue Marble, check out the <a href="https://github.com/SwingTheVine/Wplace-BlueMarble/blob/main/docs/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">CONTRIBUTING.md</a> file in <code>docs/</code>.
<h3>Installation Instructions</h3>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Supported Browsers" src="https://img.shields.io/badge/Supported%20Browsers-Chrome%20%7C%20Firefox%2A%20%7C%20Safari%20%7C%20Edge%20%7C%20Brave-orange?style=flat"></a>