@dcl-regenesislabs/bevy-explorer-web 0.1.0-18853059120.commit-dbff7e0 → 0.1.0-18881980933.commit-657d439
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 +1 -1
- package/index.html +2 -2
- package/package.json +3 -3
- package/pkg/webgpu_build.d.ts +2 -0
- package/pkg/webgpu_build.js +32 -22
- package/pkg/webgpu_build_bg.wasm +0 -0
- package/pkg/webgpu_build_bg.wasm.d.ts +1 -0
- package/sandbox_worker.js +33 -7
package/.env
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-
|
|
1
|
+
PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18881980933.commit-657d439"
|
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-
|
|
104
|
+
<script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18881980933.commit-657d439";</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-
|
|
133
|
+
<script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18881980933.commit-657d439/main.js"></script>
|
|
134
134
|
</body>
|
|
135
135
|
</html>
|
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-18881980933.commit-657d439",
|
|
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-18881980933.commit-657d439",
|
|
12
|
+
"commit": "657d4398ad269dae6d7eb8e7b4283782a3936107"
|
|
13
13
|
}
|
package/pkg/webgpu_build.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export function op_get_user_data(state: WorkerContext): Promise<any>;
|
|
|
87
87
|
export function op_get_player_data(state: WorkerContext, id: string): Promise<any>;
|
|
88
88
|
export function wasm_init_scene(): Promise<WorkerContext>;
|
|
89
89
|
export function op_continue_running(state: WorkerContext): boolean;
|
|
90
|
+
export function op_communicated_with_renderer(state: WorkerContext): boolean;
|
|
90
91
|
export function drop_context(state: WorkerContext): void;
|
|
91
92
|
export function builtin_module(state: WorkerContext, path: string): string;
|
|
92
93
|
export function is_super(state: WorkerContext): boolean;
|
|
@@ -185,6 +186,7 @@ export interface InitOutput {
|
|
|
185
186
|
readonly __wbg_workercontext_free: (a: number, b: number) => void;
|
|
186
187
|
readonly workercontext_get_source: (a: number) => any;
|
|
187
188
|
readonly op_continue_running: (a: number) => number;
|
|
189
|
+
readonly op_communicated_with_renderer: (a: number) => number;
|
|
188
190
|
readonly drop_context: (a: number) => void;
|
|
189
191
|
readonly builtin_module: (a: number, b: number, c: number) => [number, number, number, number];
|
|
190
192
|
readonly is_super: (a: number) => number;
|
package/pkg/webgpu_build.js
CHANGED
|
@@ -1237,6 +1237,16 @@ export function op_continue_running(state) {
|
|
|
1237
1237
|
return ret !== 0;
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
1240
|
+
/**
|
|
1241
|
+
* @param {WorkerContext} state
|
|
1242
|
+
* @returns {boolean}
|
|
1243
|
+
*/
|
|
1244
|
+
export function op_communicated_with_renderer(state) {
|
|
1245
|
+
_assertClass(state, WorkerContext);
|
|
1246
|
+
const ret = wasm.op_communicated_with_renderer(state.__wbg_ptr);
|
|
1247
|
+
return ret !== 0;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1240
1250
|
/**
|
|
1241
1251
|
* @param {WorkerContext} state
|
|
1242
1252
|
*/
|
|
@@ -1331,7 +1341,7 @@ function __wbg_adapter_111(arg0, arg1, arg2) {
|
|
|
1331
1341
|
wasm.closure131432_externref_shim(arg0, arg1, arg2);
|
|
1332
1342
|
}
|
|
1333
1343
|
|
|
1334
|
-
function
|
|
1344
|
+
function __wbg_adapter_1519(arg0, arg1, arg2, arg3) {
|
|
1335
1345
|
wasm.closure134336_externref_shim(arg0, arg1, arg2, arg3);
|
|
1336
1346
|
}
|
|
1337
1347
|
|
|
@@ -2629,7 +2639,7 @@ function __wbg_get_imports() {
|
|
|
2629
2639
|
const a = state0.a;
|
|
2630
2640
|
state0.a = 0;
|
|
2631
2641
|
try {
|
|
2632
|
-
return
|
|
2642
|
+
return __wbg_adapter_1519(a, state0.b, arg0, arg1);
|
|
2633
2643
|
} finally {
|
|
2634
2644
|
state0.a = a;
|
|
2635
2645
|
}
|
|
@@ -4124,15 +4134,15 @@ function __wbg_get_imports() {
|
|
|
4124
4134
|
const ret = false;
|
|
4125
4135
|
return ret;
|
|
4126
4136
|
};
|
|
4127
|
-
imports.wbg.
|
|
4137
|
+
imports.wbg.__wbindgen_closure_wrapper149222 = function(arg0, arg1, arg2) {
|
|
4128
4138
|
const ret = makeMutClosure(arg0, arg1, 116501, __wbg_adapter_108);
|
|
4129
4139
|
return ret;
|
|
4130
4140
|
};
|
|
4131
|
-
imports.wbg.
|
|
4141
|
+
imports.wbg.__wbindgen_closure_wrapper169557 = function(arg0, arg1, arg2) {
|
|
4132
4142
|
const ret = makeMutClosure(arg0, arg1, 131433, __wbg_adapter_111);
|
|
4133
4143
|
return ret;
|
|
4134
4144
|
};
|
|
4135
|
-
imports.wbg.
|
|
4145
|
+
imports.wbg.__wbindgen_closure_wrapper169559 = function(arg0, arg1, arg2) {
|
|
4136
4146
|
const ret = makeMutClosure(arg0, arg1, 131433, __wbg_adapter_111);
|
|
4137
4147
|
return ret;
|
|
4138
4148
|
};
|
|
@@ -4140,71 +4150,71 @@ function __wbg_get_imports() {
|
|
|
4140
4150
|
const ret = makeMutClosure(arg0, arg1, 15211, __wbg_adapter_62);
|
|
4141
4151
|
return ret;
|
|
4142
4152
|
};
|
|
4143
|
-
imports.wbg.
|
|
4153
|
+
imports.wbg.__wbindgen_closure_wrapper63922 = function(arg0, arg1, arg2) {
|
|
4144
4154
|
const ret = makeMutClosure(arg0, arg1, 47588, __wbg_adapter_65);
|
|
4145
4155
|
return ret;
|
|
4146
4156
|
};
|
|
4147
|
-
imports.wbg.
|
|
4157
|
+
imports.wbg.__wbindgen_closure_wrapper64110 = function(arg0, arg1, arg2) {
|
|
4148
4158
|
const ret = makeMutClosure(arg0, arg1, 47693, __wbg_adapter_68);
|
|
4149
4159
|
return ret;
|
|
4150
4160
|
};
|
|
4151
|
-
imports.wbg.
|
|
4161
|
+
imports.wbg.__wbindgen_closure_wrapper68296 = function(arg0, arg1, arg2) {
|
|
4152
4162
|
const ret = makeMutClosure(arg0, arg1, 50844, __wbg_adapter_71);
|
|
4153
4163
|
return ret;
|
|
4154
4164
|
};
|
|
4155
|
-
imports.wbg.
|
|
4165
|
+
imports.wbg.__wbindgen_closure_wrapper70334 = function(arg0, arg1, arg2) {
|
|
4156
4166
|
const ret = makeMutClosure(arg0, arg1, 51491, __wbg_adapter_74);
|
|
4157
4167
|
return ret;
|
|
4158
4168
|
};
|
|
4159
|
-
imports.wbg.
|
|
4169
|
+
imports.wbg.__wbindgen_closure_wrapper70336 = function(arg0, arg1, arg2) {
|
|
4160
4170
|
const ret = makeMutClosure(arg0, arg1, 51491, __wbg_adapter_74);
|
|
4161
4171
|
return ret;
|
|
4162
4172
|
};
|
|
4163
|
-
imports.wbg.
|
|
4173
|
+
imports.wbg.__wbindgen_closure_wrapper70338 = function(arg0, arg1, arg2) {
|
|
4164
4174
|
const ret = makeMutClosure(arg0, arg1, 51491, __wbg_adapter_74);
|
|
4165
4175
|
return ret;
|
|
4166
4176
|
};
|
|
4167
|
-
imports.wbg.
|
|
4177
|
+
imports.wbg.__wbindgen_closure_wrapper73106 = function(arg0, arg1, arg2) {
|
|
4168
4178
|
const ret = makeMutClosure(arg0, arg1, 53842, __wbg_adapter_81);
|
|
4169
4179
|
return ret;
|
|
4170
4180
|
};
|
|
4171
|
-
imports.wbg.
|
|
4181
|
+
imports.wbg.__wbindgen_closure_wrapper74441 = function(arg0, arg1, arg2) {
|
|
4172
4182
|
const ret = makeMutClosure(arg0, arg1, 54800, __wbg_adapter_84);
|
|
4173
4183
|
return ret;
|
|
4174
4184
|
};
|
|
4175
|
-
imports.wbg.
|
|
4185
|
+
imports.wbg.__wbindgen_closure_wrapper77084 = function(arg0, arg1, arg2) {
|
|
4176
4186
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4177
4187
|
return ret;
|
|
4178
4188
|
};
|
|
4179
|
-
imports.wbg.
|
|
4189
|
+
imports.wbg.__wbindgen_closure_wrapper77086 = function(arg0, arg1, arg2) {
|
|
4180
4190
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4181
4191
|
return ret;
|
|
4182
4192
|
};
|
|
4183
|
-
imports.wbg.
|
|
4193
|
+
imports.wbg.__wbindgen_closure_wrapper77088 = function(arg0, arg1, arg2) {
|
|
4184
4194
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4185
4195
|
return ret;
|
|
4186
4196
|
};
|
|
4187
|
-
imports.wbg.
|
|
4197
|
+
imports.wbg.__wbindgen_closure_wrapper77090 = function(arg0, arg1, arg2) {
|
|
4188
4198
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4189
4199
|
return ret;
|
|
4190
4200
|
};
|
|
4191
|
-
imports.wbg.
|
|
4201
|
+
imports.wbg.__wbindgen_closure_wrapper77092 = function(arg0, arg1, arg2) {
|
|
4192
4202
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4193
4203
|
return ret;
|
|
4194
4204
|
};
|
|
4195
|
-
imports.wbg.
|
|
4205
|
+
imports.wbg.__wbindgen_closure_wrapper77094 = function(arg0, arg1, arg2) {
|
|
4196
4206
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_98);
|
|
4197
4207
|
return ret;
|
|
4198
4208
|
};
|
|
4199
|
-
imports.wbg.
|
|
4209
|
+
imports.wbg.__wbindgen_closure_wrapper77096 = function(arg0, arg1, arg2) {
|
|
4200
4210
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4201
4211
|
return ret;
|
|
4202
4212
|
};
|
|
4203
|
-
imports.wbg.
|
|
4213
|
+
imports.wbg.__wbindgen_closure_wrapper77098 = function(arg0, arg1, arg2) {
|
|
4204
4214
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_87);
|
|
4205
4215
|
return ret;
|
|
4206
4216
|
};
|
|
4207
|
-
imports.wbg.
|
|
4217
|
+
imports.wbg.__wbindgen_closure_wrapper77100 = function(arg0, arg1, arg2) {
|
|
4208
4218
|
const ret = makeMutClosure(arg0, arg1, 56453, __wbg_adapter_105);
|
|
4209
4219
|
return ret;
|
|
4210
4220
|
};
|
package/pkg/webgpu_build_bg.wasm
CHANGED
|
Binary file
|
|
@@ -86,6 +86,7 @@ export const wasm_init_scene: () => any;
|
|
|
86
86
|
export const __wbg_workercontext_free: (a: number, b: number) => void;
|
|
87
87
|
export const workercontext_get_source: (a: number) => any;
|
|
88
88
|
export const op_continue_running: (a: number) => number;
|
|
89
|
+
export const op_communicated_with_renderer: (a: number) => number;
|
|
89
90
|
export const drop_context: (a: number) => void;
|
|
90
91
|
export const builtin_module: (a: number, b: number, c: number) => [number, number, number, number];
|
|
91
92
|
export const is_super: (a: number) => number;
|
package/sandbox_worker.js
CHANGED
|
@@ -5,7 +5,7 @@ import init, * as wasm_bindgen_exports from "./pkg/webgpu_build.js";
|
|
|
5
5
|
|
|
6
6
|
// self.WebSocket = {}
|
|
7
7
|
|
|
8
|
-
console.log("[
|
|
8
|
+
console.log("[Sandbox Worker] Starting");
|
|
9
9
|
|
|
10
10
|
const allowListES2020 = [
|
|
11
11
|
"Array",
|
|
@@ -252,7 +252,7 @@ self.onmessage = async (event) => {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
postMessage({ type: `INIT_COMPLETE` });
|
|
255
|
-
|
|
255
|
+
|
|
256
256
|
// add listener to clean up on unhandled rejections
|
|
257
257
|
self.addEventListener("unhandledrejection", (event) => {
|
|
258
258
|
// Prevent the default browser action
|
|
@@ -282,7 +282,7 @@ self.onmessage = async (event) => {
|
|
|
282
282
|
console.error("[Scene Worker] Error during scene construction:", e);
|
|
283
283
|
try {
|
|
284
284
|
wasm_init.drop_context(wasmContext);
|
|
285
|
-
} catch (e) {}
|
|
285
|
+
} catch (e) { }
|
|
286
286
|
wasm_init.__wbindgen_thread_destroy();
|
|
287
287
|
self.close();
|
|
288
288
|
return;
|
|
@@ -308,21 +308,47 @@ self.onmessage = async (event) => {
|
|
|
308
308
|
var prevElapsed = 0;
|
|
309
309
|
var elapsed = 0;
|
|
310
310
|
var count = 0;
|
|
311
|
+
var reportedErrors = 0;
|
|
312
|
+
var consecutiveErrorsWithoutInteraction = 0;
|
|
311
313
|
while (ops.op_continue_running()) {
|
|
312
314
|
const dt = (elapsed - prevElapsed) / 1000;
|
|
313
|
-
|
|
315
|
+
try {
|
|
316
|
+
await module.onUpdate(dt);
|
|
317
|
+
consecutiveErrorsWithoutInteraction = 0;
|
|
318
|
+
} catch (e) {
|
|
319
|
+
reportedErrors += 1;
|
|
320
|
+
consecutiveErrorsWithoutInteraction += 1;
|
|
321
|
+
if (reportedErrors <= 10) {
|
|
322
|
+
console.error(
|
|
323
|
+
"[Sandbox worker] Error running onUpdate:",
|
|
324
|
+
e
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
if (reportedErrors == 10) {
|
|
328
|
+
console.error("[Sandbox worker] not logging any further uncaught errors.");
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
if (ops.op_communicated_with_renderer()) {
|
|
333
|
+
consecutiveErrorsWithoutInteraction = 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (consecutiveErrorsWithoutInteraction >= 10) {
|
|
337
|
+
throw "[Sandbox worker] too many errors without renderer interaction: shutting down";
|
|
338
|
+
}
|
|
339
|
+
}
|
|
314
340
|
prevElapsed = elapsed;
|
|
315
341
|
elapsed = new Date() - startTime;
|
|
316
342
|
count += 1;
|
|
317
343
|
}
|
|
318
|
-
console.log("[
|
|
344
|
+
console.log("[Sandbox Worker] Exiting gracefully");
|
|
319
345
|
} catch (e) {
|
|
320
|
-
console.error("[
|
|
346
|
+
console.error("[Sandbox Worker] Error during scene execution:", e);
|
|
321
347
|
}
|
|
322
348
|
|
|
323
349
|
try {
|
|
324
350
|
wasm_init.drop_context(wasmContext);
|
|
325
|
-
} catch (e) {}
|
|
351
|
+
} catch (e) { }
|
|
326
352
|
wasm_init.__wbindgen_thread_destroy();
|
|
327
353
|
self.close();
|
|
328
354
|
}
|