@dcl-regenesislabs/bevy-explorer-web 0.1.0-30992626730.commit-d207dc0 → 0.1.0-31020266160.commit-e05e645
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/assets/{Showcase-j93lvmLp.js → Showcase-BDKSZ3kP.js} +1 -1
- package/assets/{design-DaJhAcPn.js → design-M-GO8W9C.js} +1 -1
- package/assets/{index-DJgTG817.js → index-K4Z_9Ij4.js} +3 -3
- package/assets/{index-DQWB2V3W.css → index-STAyU_zC.css} +1 -1
- package/assets/{menus-Ue79A53O.js → menus-BnruNDEu.js} +1 -1
- package/assets/{vendor-2az214zm.css → vendor-ApAF2HP7.css} +1 -1
- package/assets/{vendor-Cxufsf0Y.js → vendor-B9L28gj6.js} +1 -1
- package/bridge-scene/static/BevyExplorerUI/about +1 -1
- package/bridge-scene/static/{bafkreibcorm33hwogscvwbzrygxop2vchrsukequhzx32vjzysqewy3xwy → bafkreicsi2zuz6b5zjskys66ev4cyn6vkfxlvqfpnxqylbuhxww7ht7gti} +1 -1
- package/engine/engine.js +81 -12
- package/engine/pkg/manifest.json +1 -1
- package/engine/pkg/webgpu_build_bg.wasm +0 -0
- package/index.html +17 -17
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
1
|
+
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2)format("woff2-variations");unicode-range:U+1F??}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-greek-wght-normal-CkhJZR-_.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/inter-latin-wght-normal-Dx4kXJAl.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-D9-fqq9M.js";import{M as t,N as n}from"./design-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-D9-fqq9M.js";import{M as t,N as n}from"./design-M-GO8W9C.js";var r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,oe());else{var t=n(l);t!==null&&le(x,t.startTime-e)}}var ee=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,ee){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():ee=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function le(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,le(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var r=i(),a=n(),o=t();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,S=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function w(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function T(e,t){ge++,he[ge]=e.current,e.current=t}var ve=_e(null),ye=_e(null),be=_e(null),xe=_e(null);function Se(e,t){switch(T(be,t),T(ye,e),T(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}w(ve),T(ve,e)}function Ce(){w(ve),w(ye),w(be)}function we(e){e.memoizedState!==null&&T(xe,e);var t=ve.current,n=Hd(t,e.type);t!==n&&(T(ye,e),T(ve,n))}function Te(e){ye.current===e&&(w(ve),w(ye)),xe.current===e&&(w(xe),Qf._currentValue=me)}var Ee,De;function Oe(e){if(Ee===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||``,De=-1<e.stack.indexOf(`
|
|
2
2
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
3
|
`+Ee+e+De}var ke=!1;function Ae(e,t){if(!e||ke)return``;ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
4
|
`),l=s.split(`
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"networkId": 0,
|
|
14
14
|
"globalScenesUrn": [],
|
|
15
15
|
"scenesUrn": [
|
|
16
|
-
"urn:decentraland:entity:
|
|
16
|
+
"urn:decentraland:entity:bafkreicsi2zuz6b5zjskys66ev4cyn6vkfxlvqfpnxqylbuhxww7ht7gti?=&baseUrl=https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/bridge-scene/static/"
|
|
17
17
|
],
|
|
18
18
|
"realmName": "BevyExplorerUI"
|
|
19
19
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"content":[{"file":"scene.json","hash":"bafkreidfb7vvixnyvoghjymlxn7dua6tl2rnscnhgj6yrk5cx3gr2dc3r4"},{"file":"main.crdt","hash":"bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"},{"file":"images/icon-verified.png","hash":"bafkreiekho3ovv3r2wab75y2eanajcdcul3er4i73lk3gdl2ppher7nkxa"},{"file":"bin/index.js","hash":"bafybeiftxd6fnajhr5oajfmpjkbuofomyhgtjhyamm6nsy3vf4oany7yj4"}],"pointers":[],"timestamp":
|
|
1
|
+
{"content":[{"file":"scene.json","hash":"bafkreidfb7vvixnyvoghjymlxn7dua6tl2rnscnhgj6yrk5cx3gr2dc3r4"},{"file":"main.crdt","hash":"bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"},{"file":"images/icon-verified.png","hash":"bafkreiekho3ovv3r2wab75y2eanajcdcul3er4i73lk3gdl2ppher7nkxa"},{"file":"bin/index.js","hash":"bafybeiftxd6fnajhr5oajfmpjkbuofomyhgtjhyamm6nsy3vf4oany7yj4"}],"pointers":[],"timestamp":1785945929630,"type":"scene","metadata":{"ecs7":true,"runtimeVersion":"7","display":{"title":"UI Scene","description":"UI Scene shows a functional UI for Bevy Explorer","navmapThumbnail":"scene-thumbnail.png","favicon":"favicon_asset"},"owner":"","contact":{"name":"SDK","email":""},"main":"bin/index.js","tags":[],"scene":{"parcels":["0,0"],"base":"0,0"},"spawnPoints":[],"featureToggles":{"voiceChat":"enabled","portableExperiences":"enabled"}},"version":"v3"}
|
package/engine/engine.js
CHANGED
|
@@ -29,13 +29,15 @@ function workerCrashHandler(name) {
|
|
|
29
29
|
* Fetches a URL with download progress tracking.
|
|
30
30
|
* @param {string} url - URL to fetch
|
|
31
31
|
* @param {function} onProgress - Callback with percentage (0-100)
|
|
32
|
-
* @param {number|null} expectedSize - Expected
|
|
32
|
+
* @param {number|null} expectedSize - Expected decoded size in bytes. Preferred over
|
|
33
|
+
* Content-Length, which under CDN compression counts compressed bytes while the body
|
|
34
|
+
* reader yields decoded bytes.
|
|
33
35
|
* @returns {Promise<ArrayBuffer>}
|
|
34
36
|
*/
|
|
35
37
|
async function fetchWithProgress(url, onProgress, expectedSize) {
|
|
36
38
|
const response = await fetch(url);
|
|
37
39
|
const contentLength = response.headers.get('Content-Length');
|
|
38
|
-
const total = contentLength ? parseInt(contentLength, 10) :
|
|
40
|
+
const total = expectedSize || (contentLength ? parseInt(contentLength, 10) : null);
|
|
39
41
|
|
|
40
42
|
if (!total || !response.body) {
|
|
41
43
|
// Fallback if no size info available or no streaming support
|
|
@@ -68,6 +70,71 @@ async function fetchWithProgress(url, onProgress, expectedSize) {
|
|
|
68
70
|
return buffer.buffer;
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Downloads and compiles the engine WASM.
|
|
75
|
+
*
|
|
76
|
+
* Compiles with WebAssembly.compileStreaming on the live network response, so
|
|
77
|
+
* compilation overlaps the download and — because the response keeps its URL
|
|
78
|
+
* identity — the browser may persist the compiled module in its code cache and
|
|
79
|
+
* skip the compile on repeat visits. The progress callback is fed from a clone
|
|
80
|
+
* of the response; wrapping a byte-counting stream in a synthesized Response
|
|
81
|
+
* instead would discard the URL identity and with it the code cache.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} url - WASM URL
|
|
84
|
+
* @param {number|null} expectedSize - Expected decoded size in bytes (from the manifest)
|
|
85
|
+
* @param {function} onProgress - Callback with percentage (0-100)
|
|
86
|
+
* @param {function} onDownloaded - Called once the last byte has arrived, before the compile tail
|
|
87
|
+
* @returns {Promise<WebAssembly.Module>}
|
|
88
|
+
*/
|
|
89
|
+
async function compileWasmWithProgress(url, expectedSize, onProgress, onDownloaded) {
|
|
90
|
+
const response = await fetch(url);
|
|
91
|
+
if (!response.ok) {
|
|
92
|
+
throw new Error(`WASM fetch failed: ${response.status} ${response.statusText}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const contentLength = response.headers.get('Content-Length');
|
|
96
|
+
const total = expectedSize || (contentLength ? parseInt(contentLength, 10) : null);
|
|
97
|
+
|
|
98
|
+
if (typeof WebAssembly.compileStreaming === 'function' && response.body) {
|
|
99
|
+
let cancelProgress = () => {};
|
|
100
|
+
let progressTask = Promise.resolve();
|
|
101
|
+
if (total) {
|
|
102
|
+
const reader = response.clone().body.getReader();
|
|
103
|
+
cancelProgress = () => reader.cancel().catch(() => {});
|
|
104
|
+
progressTask = (async () => {
|
|
105
|
+
let received = 0;
|
|
106
|
+
while (true) {
|
|
107
|
+
const { done, value } = await reader.read();
|
|
108
|
+
if (done) break;
|
|
109
|
+
received += value.length;
|
|
110
|
+
onProgress(Math.min((received / total) * 100, 100));
|
|
111
|
+
}
|
|
112
|
+
})().catch(() => {});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
const module = await WebAssembly.compileStreaming(response);
|
|
117
|
+
await progressTask;
|
|
118
|
+
onProgress(100);
|
|
119
|
+
onDownloaded();
|
|
120
|
+
return module;
|
|
121
|
+
} catch (e) {
|
|
122
|
+
// typically a server not sending Content-Type: application/wasm — refetch
|
|
123
|
+
// (usually straight from the HTTP cache) and compile from a buffer instead
|
|
124
|
+
cancelProgress();
|
|
125
|
+
console.warn('[Main JS] compileStreaming failed, falling back to buffered compile', e);
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
try {
|
|
129
|
+
response.body?.cancel();
|
|
130
|
+
} catch (e) { /* body already consumed or locked */ }
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const buffer = await fetchWithProgress(url, onProgress, total);
|
|
134
|
+
onDownloaded();
|
|
135
|
+
return WebAssembly.compile(buffer);
|
|
136
|
+
}
|
|
137
|
+
|
|
71
138
|
/**
|
|
72
139
|
* Initializes the WASM engine, shared memory, and worker threads.
|
|
73
140
|
* @returns {Promise<void>}
|
|
@@ -88,18 +155,20 @@ export async function initEngine() {
|
|
|
88
155
|
console.warn("Could not load manifest.json, progress may not be accurate", e);
|
|
89
156
|
}
|
|
90
157
|
|
|
91
|
-
//
|
|
158
|
+
// Steps 1+2: Download and compile WASM. Compilation streams alongside the download,
|
|
159
|
+
// so the 'compile' step only covers the tail left after the last byte arrives.
|
|
92
160
|
setLoadingStepActive('download');
|
|
93
|
-
const wasmBytes = await fetchWithProgress(wasmUrl, (percent) => {
|
|
94
|
-
setLoadingStepProgress('download', percent);
|
|
95
|
-
}, expectedWasmSize);
|
|
96
|
-
setLoadingStepCompleted('download');
|
|
97
|
-
|
|
98
|
-
// Step 2: Compile WASM
|
|
99
|
-
setLoadingStepActive('compile');
|
|
100
161
|
console.time("compileTime")
|
|
101
|
-
const compiledModule = await
|
|
102
|
-
|
|
162
|
+
const compiledModule = await compileWasmWithProgress(
|
|
163
|
+
wasmUrl,
|
|
164
|
+
expectedWasmSize,
|
|
165
|
+
(percent) => setLoadingStepProgress('download', percent),
|
|
166
|
+
() => {
|
|
167
|
+
setLoadingStepCompleted('download');
|
|
168
|
+
setLoadingStepActive('compile');
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
console.timeEnd("compileTime")
|
|
103
172
|
setLoadingStepCompleted('compile');
|
|
104
173
|
|
|
105
174
|
const initialMemoryPages = 1280; // setting initial memory high causes malloc failures
|
package/engine/pkg/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"wasmSize":
|
|
1
|
+
{"wasmSize":110235141}
|
|
Binary file
|
package/index.html
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
/>
|
|
11
11
|
<meta name="theme-color" content="#2c1442" />
|
|
12
12
|
<!-- Favicons (same art as the engine page's set). Vite rebases these for the CDN base. -->
|
|
13
|
-
<link rel="icon" type="image/png" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
14
|
-
<link rel="icon" type="image/svg+xml" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
15
|
-
<link rel="shortcut icon" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
16
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
13
|
+
<link rel="icon" type="image/png" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/favicon/favicon-96x96.png" sizes="96x96" />
|
|
14
|
+
<link rel="icon" type="image/svg+xml" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/favicon/favicon.svg" />
|
|
15
|
+
<link rel="shortcut icon" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/favicon/favicon.ico" />
|
|
16
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/favicon/apple-touch-icon.png" />
|
|
17
17
|
<meta name="apple-mobile-web-app-title" content="Decentraland Web" />
|
|
18
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
18
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/favicon/site.webmanifest" />
|
|
19
19
|
<!-- Social cards -->
|
|
20
20
|
<meta property="og:title" content="Decentraland" />
|
|
21
21
|
<meta property="og:description" content="Explore a social virtual world from your browser." />
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<meta name="twitter:card" content="summary" />
|
|
24
24
|
<!-- The loading overlay's full-screen backdrop (1.7MB). Prefetch it during the login screen
|
|
25
25
|
(low priority, won't fight first paint) so it's cached before we enter and freeze. -->
|
|
26
|
-
<link rel="prefetch" as="image" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
26
|
+
<link rel="prefetch" as="image" href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/login/gradient-background.webp" />
|
|
27
27
|
<style>
|
|
28
28
|
/* Instant branded first paint. The JS bundle + React mount take a moment (longer over a slow
|
|
29
29
|
tunnel/network) and #root is empty until then — without this the page flashes white. This
|
|
@@ -71,16 +71,16 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
</style>
|
|
74
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
75
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
76
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
77
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
78
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
79
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
80
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
81
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
82
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
83
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
74
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/index-K4Z_9Ij4.js"></script>
|
|
75
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/rolldown-runtime-D9-fqq9M.js">
|
|
76
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/design-M-GO8W9C.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/vendor-B9L28gj6.js">
|
|
78
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/menus-BnruNDEu.js">
|
|
79
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/emoji-DrfHOLaz.js">
|
|
80
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/design-BdxsbUvY.css">
|
|
81
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/vendor-ApAF2HP7.css">
|
|
82
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/menus-BDWqQaLj.css">
|
|
83
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/index-STAyU_zC.css">
|
|
84
84
|
</head>
|
|
85
85
|
<body>
|
|
86
86
|
<!-- React HUD mounts here; the engine runs in a same-origin iframe rendered
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
pre-React branded splash; createRoot() clears it on mount. -->
|
|
89
89
|
<div id="root">
|
|
90
90
|
<div id="boot-splash">
|
|
91
|
-
<img src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
91
|
+
<img src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645/assets/logo.png" alt="" />
|
|
92
92
|
<h1>Decentraland</h1>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl-regenesislabs/bevy-explorer-web",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-31020266160.commit-e05e645",
|
|
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-
|
|
12
|
-
"commit": "
|
|
11
|
+
"homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-31020266160.commit-e05e645",
|
|
12
|
+
"commit": "e05e6453e364cd4956487f07402daa83016c59ad"
|
|
13
13
|
}
|