@dcl-regenesislabs/bevy-explorer-web 0.1.0-18324466668.commit-d98f346 → 0.1.0-18348058499.commit-041a1c7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env CHANGED
@@ -1 +1 @@
1
- PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18324466668.commit-d98f346"
1
+ PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18348058499.commit-041a1c7"
package/index.html CHANGED
@@ -101,7 +101,7 @@
101
101
  }
102
102
  </style>
103
103
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
104
- <script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18324466668.commit-d98f346";</script>
104
+ <script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18348058499.commit-041a1c7";</script>
105
105
  </head>
106
106
  <body>
107
107
  <div id="header" class="container">
@@ -130,6 +130,6 @@
130
130
  </div>
131
131
  <script src="https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"></script>
132
132
  <script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
133
- <script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18324466668.commit-d98f346/main.js"></script>
133
+ <script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18348058499.commit-041a1c7/main.js"></script>
134
134
  </body>
135
135
  </html>
package/main.js CHANGED
@@ -53,8 +53,9 @@ function hideHeader() {
53
53
 
54
54
  if ("serviceWorker" in navigator) {
55
55
  window.addEventListener("load", () => {
56
- const serviceWorkerPath = new URL('./service_worker.js', window.location.href);
57
- console.log({ serviceWorkerPath })
56
+ const basePath = window.location.pathname.replace(/\/$/, ''); // removes trailing slash if present
57
+ const serviceWorkerPath = new URL(`${basePath}/service_worker.js`, window.location.origin);
58
+
58
59
  navigator.serviceWorker
59
60
  .register(serviceWorkerPath)
60
61
  .then((registration) => {
@@ -223,8 +224,10 @@ async function initEngine() {
223
224
 
224
225
  // start asset loader thread
225
226
  await new Promise((resolve, _reject) => {
226
- const url = new URL('./asset_loader.js', window.location.href)
227
- const assetLoader = new Worker(url, { type: "module" });
227
+ const basePath = window.location.pathname.replace(/\/$/, ''); // removes trailing slash if present
228
+ const assetLoaderPath = new URL(`${basePath}/service_worker.js`, window.location.origin);
229
+
230
+ const assetLoader = new Worker(assetLoaderPath, { type: "module" });
228
231
  assetLoader.onmessage = (workerEvent) => {
229
232
  if (workerEvent.data.type === "READY") {
230
233
  assetLoader.postMessage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/bevy-explorer-web",
3
- "version": "0.1.0-18324466668.commit-d98f346",
3
+ "version": "0.1.0-18348058499.commit-041a1c7",
4
4
  "scripts": {
5
5
  "postinstall": "node ./scripts/prebuild.js"
6
6
  },
@@ -8,6 +8,6 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/bevy-explorer.git"
10
10
  },
11
- "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18324466668.commit-d98f346",
12
- "commit": "d98f34622503cdb30be48eea6a1e4e88e8fb0a22"
11
+ "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18348058499.commit-041a1c7",
12
+ "commit": "041a1c728fb0ba8e51bedd8cbe3609166be0a7c5"
13
13
  }
Binary file