@dcl-regenesislabs/bevy-explorer-web 0.1.0-27463768076.commit-e96e26a → 0.1.0-27472952228.commit-3847d53

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-27463768076.commit-e96e26a"
1
+ PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-27472952228.commit-3847d53"
package/index.html CHANGED
@@ -2,12 +2,20 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <script>
5
- // Set base href so relative paths work when deployed under a subpath (e.g. /bevy-web)
5
+ // Issue #807: when loaded without a trailing slash (e.g. /bevy-web?position=88,88)
6
+ // the page is outside the service worker scope (/bevy-web/), so the worker's
7
+ // COEP `credentialless` rewrite never runs and cross-origin scene assets are
8
+ // blocked by `require-corp`. Redirect to the trailing-slash URL (preserving the
9
+ // query and hash) so the service worker controls the page. Runs first, before
10
+ // anything else parses, to minimise wasted work.
6
11
  (function() {
7
- var base = document.createElement('base');
8
12
  var path = window.location.pathname;
9
- base.href = path.endsWith('/') ? path : path + '/';
10
- document.head.appendChild(base);
13
+ var lastSegment = path.substring(path.lastIndexOf('/') + 1);
14
+ // Only redirect "directory" paths missing a trailing slash; skip anything
15
+ // that looks like a file (has an extension) to avoid redirect loops.
16
+ if (!path.endsWith('/') && lastSegment.indexOf('.') === -1) {
17
+ window.location.replace(path + '/' + window.location.search + window.location.hash);
18
+ }
11
19
  })();
12
20
  </script>
13
21
  <script>
@@ -411,7 +419,7 @@
411
419
  }
412
420
  </style>
413
421
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
414
- <script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-27463768076.commit-e96e26a";</script>
422
+ <script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-27472952228.commit-3847d53";</script>
415
423
  </head>
416
424
  <body>
417
425
  <div id="header" class="container">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/bevy-explorer-web",
3
- "version": "0.1.0-27463768076.commit-e96e26a",
3
+ "version": "0.1.0-27472952228.commit-3847d53",
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-27463768076.commit-e96e26a",
12
- "commit": "e96e26a1d100c7ea0656d5622b0cc61609184fa8"
11
+ "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-27472952228.commit-3847d53",
12
+ "commit": "3847d538be0d560c7a38d04416d461ffb4a839c6"
13
13
  }
package/pkg/manifest.json CHANGED
@@ -1 +1 @@
1
- {"wasmSize":109585089}
1
+ {"wasmSize":109586469}
Binary file
package/sandbox_worker.js CHANGED
@@ -335,8 +335,12 @@ self.onmessage = async (event) => {
335
335
  var count = 0;
336
336
  var reportedErrors = 0;
337
337
  var consecutiveErrorsWithoutInteraction = 0;
338
+ // Cap the per-frame dt handed to the scene: a slow frame must not feed dt-scaled scene
339
+ // logic (timers, animations) a multi-second step. Mirrors MAX_SCENE_DT in
340
+ // crates/dcl_deno/src/js/mod.rs.
341
+ const MAX_SCENE_DT_SECONDS = 1;
338
342
  while (ops.op_continue_running()) {
339
- const dt = (elapsed - prevElapsed) / 1000;
343
+ const dt = Math.min((elapsed - prevElapsed) / 1000, MAX_SCENE_DT_SECONDS);
340
344
  ops.op_set_elapsed(elapsed / 1000);
341
345
  try {
342
346
  await module.onUpdate(dt);