diff --git a/README.MD b/README.MD index 4c15a3cd..36d20865 100644 --- a/README.MD +++ b/README.MD @@ -1,5 +1,7 @@ # Minecraft Web Client +![banner](./docs-assets/banner.jpg) + A true Minecraft client running in your browser! A port of the original game to the web, written in JavaScript using modern web technologies. This project is a work in progress, but I consider it to be usable. If you encounter any bugs or usability issues, please report them! diff --git a/assets/loading-bg.jpg b/assets/loading-bg.jpg new file mode 100644 index 00000000..168c741e Binary files /dev/null and b/assets/loading-bg.jpg differ diff --git a/docs-assets/banner.jpg b/docs-assets/banner.jpg new file mode 100644 index 00000000..270a6863 Binary files /dev/null and b/docs-assets/banner.jpg differ diff --git a/index.html b/index.html index ac9721c0..29b5a830 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + Prismarine Web Client diff --git a/src/index.ts b/src/index.ts index 8dc8ae8a..49e1341f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -792,6 +792,16 @@ document.body.addEventListener('touchstart', (e) => { }, { passive: false }) // #endregion +void window.fetch('config.json').then(async res => res.json()).then(c => c, (error) => { + console.warn('Failed to load optional app config.json', error) + return {} +}).then((config) => { + miscUiState.appConfig = config +}) + +// eslint-disable-next-line @typescript-eslint/non-nullable-type-assertion-style +; (document.querySelector('.initial-loader') as HTMLElement).style.opacity = '0' + downloadAndOpenFile().then((downloadAction) => { if (downloadAction) return