oriverse-engine 0.1.2 → 0.1.4
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/LICENSE.md +30 -30
- package/dist/AGENT_ONBOARDING.md +74 -74
- package/dist/CODEX_PROMPT.md +7 -7
- package/dist/examples/coin_collector.weave +70 -70
- package/dist/examples/dodge_blocks.weave +70 -70
- package/dist/examples/target_range.weave +82 -82
- package/dist/ktx_bridge.js +121 -121
- package/dist/ktx_lib.js +1 -1
- package/dist/oriverse_wgpu.d.ts +17 -18
- package/dist/oriverse_wgpu.js +81 -91
- package/dist/oriverse_wgpu_bg.wasm +0 -0
- package/dist/oriverse_wgpu_bg.wasm.d.ts +17 -18
- package/dist/prewarm.js +61 -0
- package/dist/shader_prewarm_manifest.json +1 -0
- package/dist/snippets/oriverse_wgpu-255445ce6d9a0851/inline0.js +58 -19
- package/dist/snippets/oriverse_wgpu-255445ce6d9a0851/inline1.js +20 -58
- package/dist/starter/AGENTS.md +2 -2
- package/dist/starter/CLAUDE.md +2 -2
- package/dist/starter/game.html +9 -6
- package/dist/templates/game.html +3 -0
- package/dist/templates/game_cdn.html +9 -6
- package/dist/weave_documentation.txt +8 -10
- package/package.json +1 -1
package/dist/oriverse_wgpu.js
CHANGED
|
@@ -402,6 +402,14 @@ function __wbg_get_imports() {
|
|
|
402
402
|
const ret = arg0.beginRenderPass(arg1);
|
|
403
403
|
return ret;
|
|
404
404
|
}, arguments); },
|
|
405
|
+
__wbg_bind_86c20a9105588f18: function(arg0, arg1, arg2) {
|
|
406
|
+
const ret = arg0.bind(arg1, arg2);
|
|
407
|
+
return ret;
|
|
408
|
+
},
|
|
409
|
+
__wbg_bind_e6d12ff9d961400a: function(arg0, arg1) {
|
|
410
|
+
const ret = arg0.bind(arg1);
|
|
411
|
+
return ret;
|
|
412
|
+
},
|
|
405
413
|
__wbg_blockSize_5871fe73cc8dcba0: function(arg0) {
|
|
406
414
|
const ret = arg0.blockSize;
|
|
407
415
|
return ret;
|
|
@@ -802,10 +810,6 @@ function __wbg_get_imports() {
|
|
|
802
810
|
__wbg_enqueue_ec3552838b4b7fbf: function() { return handleError(function (arg0, arg1) {
|
|
803
811
|
arg0.enqueue(arg1);
|
|
804
812
|
}, arguments); },
|
|
805
|
-
__wbg_error_287b079609b734b7: function(arg0) {
|
|
806
|
-
const ret = arg0.error;
|
|
807
|
-
return ret;
|
|
808
|
-
},
|
|
809
813
|
__wbg_error_8d9a8e04cd1d3588: function(arg0) {
|
|
810
814
|
console.error(arg0);
|
|
811
815
|
},
|
|
@@ -2762,9 +2766,6 @@ function __wbg_get_imports() {
|
|
|
2762
2766
|
__wbg_set_onopen_d0eb44607253e86f: function(arg0, arg1) {
|
|
2763
2767
|
arg0.onopen = arg1;
|
|
2764
2768
|
},
|
|
2765
|
-
__wbg_set_onuncapturederror_b9a9ff2c881b2b40: function(arg0, arg1) {
|
|
2766
|
-
arg0.onuncapturederror = arg1;
|
|
2767
|
-
},
|
|
2768
2769
|
__wbg_set_operation_b5862f5a1a143b30: function(arg0, arg1) {
|
|
2769
2770
|
arg0.operation = __wbindgen_enum_GpuBlendOperation[arg1];
|
|
2770
2771
|
},
|
|
@@ -3171,10 +3172,6 @@ function __wbg_get_imports() {
|
|
|
3171
3172
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3172
3173
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3173
3174
|
}, arguments); },
|
|
3174
|
-
__wbg_valueOf_5c6da6c9a85f34dc: function(arg0) {
|
|
3175
|
-
const ret = arg0.valueOf();
|
|
3176
|
-
return ret;
|
|
3177
|
-
},
|
|
3178
3175
|
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
3179
3176
|
const ret = arg0.value;
|
|
3180
3177
|
return ret;
|
|
@@ -3234,151 +3231,146 @@ function __wbg_get_imports() {
|
|
|
3234
3231
|
arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
|
|
3235
3232
|
}, arguments); },
|
|
3236
3233
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3237
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3238
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3234
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1911, function: Function { arguments: [Externref, Externref], shim_idx: 1916, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3235
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0baefc30fc54f1c1, wasm_bindgen__convert__closures_____invoke__hf686882a23e57c3e);
|
|
3239
3236
|
return ret;
|
|
3240
3237
|
},
|
|
3241
3238
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3242
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3243
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3239
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1911, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1912, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3240
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0baefc30fc54f1c1, wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9);
|
|
3244
3241
|
return ret;
|
|
3245
3242
|
},
|
|
3246
3243
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3247
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3248
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3244
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1911, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1912, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3245
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0baefc30fc54f1c1, wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_2);
|
|
3249
3246
|
return ret;
|
|
3250
3247
|
},
|
|
3251
3248
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3252
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3253
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3249
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1911, function: Function { arguments: [NamedExternref("RTCDataChannelEvent")], shim_idx: 1912, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3250
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0baefc30fc54f1c1, wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_3);
|
|
3254
3251
|
return ret;
|
|
3255
3252
|
},
|
|
3256
3253
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3257
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3258
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3254
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1911, function: Function { arguments: [NamedExternref("RTCPeerConnectionIceEvent")], shim_idx: 1912, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3255
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0baefc30fc54f1c1, wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_4);
|
|
3259
3256
|
return ret;
|
|
3260
3257
|
},
|
|
3261
3258
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3262
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3259
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2885, function: Function { arguments: [], shim_idx: 2886, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3263
3260
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf04f1b52029392cb, wasm_bindgen__convert__closures_____invoke__hbc8eaa61aedbf990);
|
|
3264
3261
|
return ret;
|
|
3265
3262
|
},
|
|
3266
3263
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3267
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3268
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
3264
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4109, function: Function { arguments: [String], shim_idx: 4110, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
3265
|
+
const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8d68c0c402e150fa, wasm_bindgen__convert__closures_____invoke__h6d3b5d34c5205706);
|
|
3269
3266
|
return ret;
|
|
3270
3267
|
},
|
|
3271
3268
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3272
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3273
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3269
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4159, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4160, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3270
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h08b6962c9c4a8461, wasm_bindgen__convert__closures_____invoke__h195f08c6c1eced42);
|
|
3274
3271
|
return ret;
|
|
3275
3272
|
},
|
|
3276
3273
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3277
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3274
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4256, function: Function { arguments: [Externref], shim_idx: 4257, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3278
3275
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h22ca06dde759e186, wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc);
|
|
3279
3276
|
return ret;
|
|
3280
3277
|
},
|
|
3281
3278
|
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
3282
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3283
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3279
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [Externref], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3280
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1);
|
|
3284
3281
|
return ret;
|
|
3285
3282
|
},
|
|
3286
3283
|
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
3287
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3288
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0,
|
|
3284
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("Array<any>"), NamedExternref("ResizeObserver")], shim_idx: 4352, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3285
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h9fd153286ed41e9c);
|
|
3289
3286
|
return ret;
|
|
3290
3287
|
},
|
|
3291
3288
|
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
3292
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3293
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0,
|
|
3289
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3290
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_11);
|
|
3294
3291
|
return ret;
|
|
3295
3292
|
},
|
|
3296
3293
|
__wbindgen_cast_000000000000000d: function(arg0, arg1) {
|
|
3297
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3294
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("Event")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3298
3295
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_12);
|
|
3299
3296
|
return ret;
|
|
3300
3297
|
},
|
|
3301
3298
|
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
3302
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3299
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3303
3300
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_13);
|
|
3304
3301
|
return ret;
|
|
3305
3302
|
},
|
|
3306
3303
|
__wbindgen_cast_000000000000000f: function(arg0, arg1) {
|
|
3307
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3304
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3308
3305
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_14);
|
|
3309
3306
|
return ret;
|
|
3310
3307
|
},
|
|
3311
3308
|
__wbindgen_cast_0000000000000010: function(arg0, arg1) {
|
|
3312
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3309
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("PageTransitionEvent")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3313
3310
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_15);
|
|
3314
3311
|
return ret;
|
|
3315
3312
|
},
|
|
3316
3313
|
__wbindgen_cast_0000000000000011: function(arg0, arg1) {
|
|
3317
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3314
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3318
3315
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_16);
|
|
3319
3316
|
return ret;
|
|
3320
3317
|
},
|
|
3321
3318
|
__wbindgen_cast_0000000000000012: function(arg0, arg1) {
|
|
3322
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3319
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [NamedExternref("WheelEvent")], shim_idx: 4350, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3323
3320
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_17);
|
|
3324
3321
|
return ret;
|
|
3325
3322
|
},
|
|
3326
3323
|
__wbindgen_cast_0000000000000013: function(arg0, arg1) {
|
|
3327
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3328
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0,
|
|
3324
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [Option(NamedExternref("Blob"))], shim_idx: 4356, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3325
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__ha87a485729c1bc45);
|
|
3329
3326
|
return ret;
|
|
3330
3327
|
},
|
|
3331
3328
|
__wbindgen_cast_0000000000000014: function(arg0, arg1) {
|
|
3332
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3333
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0,
|
|
3329
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4349, function: Function { arguments: [], shim_idx: 4359, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3330
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2fa417b22e371ac0, wasm_bindgen__convert__closures_____invoke__h916e8c5bf71a8454);
|
|
3334
3331
|
return ret;
|
|
3335
3332
|
},
|
|
3336
3333
|
__wbindgen_cast_0000000000000015: function(arg0, arg1) {
|
|
3337
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3338
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3334
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 5119, function: Function { arguments: [], shim_idx: 5120, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3335
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h497a5311ffee252b, wasm_bindgen__convert__closures_____invoke__hcba5ad8b0d96cf50);
|
|
3339
3336
|
return ret;
|
|
3340
3337
|
},
|
|
3341
3338
|
__wbindgen_cast_0000000000000016: function(arg0, arg1) {
|
|
3342
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3343
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3339
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 5190, function: Function { arguments: [Externref], shim_idx: 5191, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3340
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h83f8bfe43e51586e, wasm_bindgen__convert__closures_____invoke__h5fae2a5a8b174cd2);
|
|
3344
3341
|
return ret;
|
|
3345
3342
|
},
|
|
3346
3343
|
__wbindgen_cast_0000000000000017: function(arg0, arg1) {
|
|
3347
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3348
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3344
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 5209, function: Function { arguments: [Externref], shim_idx: 5210, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3345
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h10eef66b5be2507e, wasm_bindgen__convert__closures_____invoke__h1425c1d15e69fe66);
|
|
3349
3346
|
return ret;
|
|
3350
3347
|
},
|
|
3351
3348
|
__wbindgen_cast_0000000000000018: function(arg0, arg1) {
|
|
3352
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3353
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3349
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 617, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 618, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3350
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1df966f72842a688, wasm_bindgen__convert__closures_____invoke__h90b6440bf676aed2);
|
|
3354
3351
|
return ret;
|
|
3355
3352
|
},
|
|
3356
3353
|
__wbindgen_cast_0000000000000019: function(arg0, arg1) {
|
|
3357
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3358
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3354
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 617, function: Function { arguments: [String, String], shim_idx: 620, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3355
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1df966f72842a688, wasm_bindgen__convert__closures_____invoke__h1e3ad7787c877f1c);
|
|
3359
3356
|
return ret;
|
|
3360
3357
|
},
|
|
3361
3358
|
__wbindgen_cast_000000000000001a: function(arg0, arg1) {
|
|
3362
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3363
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3364
|
-
return ret;
|
|
3365
|
-
},
|
|
3366
|
-
__wbindgen_cast_000000000000001b: function(arg0, arg1) {
|
|
3367
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 584, function: Function { arguments: [U32, U32, F64], shim_idx: 585, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3368
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h677d3b08c69adfbf, wasm_bindgen__convert__closures_____invoke__h530de7b4ff70bfe3);
|
|
3359
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 617, function: Function { arguments: [U32, U32, F64], shim_idx: 622, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3360
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1df966f72842a688, wasm_bindgen__convert__closures_____invoke__h813527826f148663);
|
|
3369
3361
|
return ret;
|
|
3370
3362
|
},
|
|
3371
|
-
|
|
3363
|
+
__wbindgen_cast_000000000000001b: function(arg0) {
|
|
3372
3364
|
// Cast intrinsic for `F64 -> Externref`.
|
|
3373
3365
|
const ret = arg0;
|
|
3374
3366
|
return ret;
|
|
3375
3367
|
},
|
|
3376
|
-
|
|
3368
|
+
__wbindgen_cast_000000000000001c: function(arg0, arg1) {
|
|
3377
3369
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3378
3370
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3379
3371
|
return ret;
|
|
3380
3372
|
},
|
|
3381
|
-
|
|
3373
|
+
__wbindgen_cast_000000000000001d: function(arg0, arg1) {
|
|
3382
3374
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3383
3375
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
3384
3376
|
return ret;
|
|
@@ -3416,38 +3408,38 @@ function wasm_bindgen__convert__closures_____invoke__hcba5ad8b0d96cf50(arg0, arg
|
|
|
3416
3408
|
wasm.wasm_bindgen__convert__closures_____invoke__hcba5ad8b0d96cf50(arg0, arg1);
|
|
3417
3409
|
}
|
|
3418
3410
|
|
|
3419
|
-
function
|
|
3420
|
-
wasm.
|
|
3411
|
+
function wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9(arg0, arg1, arg2) {
|
|
3412
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9(arg0, arg1, arg2);
|
|
3421
3413
|
}
|
|
3422
3414
|
|
|
3423
|
-
function
|
|
3424
|
-
wasm.
|
|
3415
|
+
function wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_2(arg0, arg1, arg2) {
|
|
3416
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_2(arg0, arg1, arg2);
|
|
3425
3417
|
}
|
|
3426
3418
|
|
|
3427
|
-
function
|
|
3428
|
-
wasm.
|
|
3419
|
+
function wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_3(arg0, arg1, arg2) {
|
|
3420
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_3(arg0, arg1, arg2);
|
|
3429
3421
|
}
|
|
3430
3422
|
|
|
3431
|
-
function
|
|
3432
|
-
wasm.
|
|
3423
|
+
function wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_4(arg0, arg1, arg2) {
|
|
3424
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_4(arg0, arg1, arg2);
|
|
3433
3425
|
}
|
|
3434
3426
|
|
|
3435
|
-
function
|
|
3436
|
-
wasm.
|
|
3427
|
+
function wasm_bindgen__convert__closures_____invoke__h195f08c6c1eced42(arg0, arg1, arg2) {
|
|
3428
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h195f08c6c1eced42(arg0, arg1, arg2);
|
|
3437
3429
|
}
|
|
3438
3430
|
|
|
3439
3431
|
function wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc(arg0, arg1, arg2) {
|
|
3440
3432
|
wasm.wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc(arg0, arg1, arg2);
|
|
3441
3433
|
}
|
|
3442
3434
|
|
|
3443
|
-
function wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc_9(arg0, arg1, arg2) {
|
|
3444
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc_9(arg0, arg1, arg2);
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
3435
|
function wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1(arg0, arg1, arg2) {
|
|
3448
3436
|
wasm.wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1(arg0, arg1, arg2);
|
|
3449
3437
|
}
|
|
3450
3438
|
|
|
3439
|
+
function wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_11(arg0, arg1, arg2) {
|
|
3440
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_11(arg0, arg1, arg2);
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3451
3443
|
function wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_12(arg0, arg1, arg2) {
|
|
3452
3444
|
wasm.wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_12(arg0, arg1, arg2);
|
|
3453
3445
|
}
|
|
@@ -3472,16 +3464,12 @@ function wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_17(arg0,
|
|
|
3472
3464
|
wasm.wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_17(arg0, arg1, arg2);
|
|
3473
3465
|
}
|
|
3474
3466
|
|
|
3475
|
-
function wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_18(arg0, arg1, arg2) {
|
|
3476
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_18(arg0, arg1, arg2);
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
3467
|
function wasm_bindgen__convert__closures_____invoke__h5fae2a5a8b174cd2(arg0, arg1, arg2) {
|
|
3480
3468
|
wasm.wasm_bindgen__convert__closures_____invoke__h5fae2a5a8b174cd2(arg0, arg1, arg2);
|
|
3481
3469
|
}
|
|
3482
3470
|
|
|
3483
|
-
function
|
|
3484
|
-
wasm.
|
|
3471
|
+
function wasm_bindgen__convert__closures_____invoke__h90b6440bf676aed2(arg0, arg1, arg2) {
|
|
3472
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h90b6440bf676aed2(arg0, arg1, arg2);
|
|
3485
3473
|
}
|
|
3486
3474
|
|
|
3487
3475
|
function wasm_bindgen__convert__closures_____invoke__h1425c1d15e69fe66(arg0, arg1, arg2) {
|
|
@@ -3491,8 +3479,8 @@ function wasm_bindgen__convert__closures_____invoke__h1425c1d15e69fe66(arg0, arg
|
|
|
3491
3479
|
}
|
|
3492
3480
|
}
|
|
3493
3481
|
|
|
3494
|
-
function
|
|
3495
|
-
wasm.
|
|
3482
|
+
function wasm_bindgen__convert__closures_____invoke__hf686882a23e57c3e(arg0, arg1, arg2, arg3) {
|
|
3483
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hf686882a23e57c3e(arg0, arg1, arg2, arg3);
|
|
3496
3484
|
}
|
|
3497
3485
|
|
|
3498
3486
|
function wasm_bindgen__convert__closures_____invoke__h9fd153286ed41e9c(arg0, arg1, arg2, arg3) {
|
|
@@ -3507,20 +3495,22 @@ function wasm_bindgen__convert__closures_____invoke__ha87a485729c1bc45(arg0, arg
|
|
|
3507
3495
|
wasm.wasm_bindgen__convert__closures_____invoke__ha87a485729c1bc45(arg0, arg1, isLikeNone(arg2) ? 0 : addToExternrefTable0(arg2));
|
|
3508
3496
|
}
|
|
3509
3497
|
|
|
3510
|
-
function
|
|
3498
|
+
function wasm_bindgen__convert__closures_____invoke__h6d3b5d34c5205706(arg0, arg1, arg2) {
|
|
3511
3499
|
const ptr0 = passStringToWasm0(arg2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3512
3500
|
const len0 = WASM_VECTOR_LEN;
|
|
3513
|
-
wasm.
|
|
3501
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h6d3b5d34c5205706(arg0, arg1, ptr0, len0);
|
|
3514
3502
|
}
|
|
3515
3503
|
|
|
3516
|
-
function
|
|
3504
|
+
function wasm_bindgen__convert__closures_____invoke__h1e3ad7787c877f1c(arg0, arg1, arg2, arg3) {
|
|
3517
3505
|
const ptr0 = passStringToWasm0(arg2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3518
3506
|
const len0 = WASM_VECTOR_LEN;
|
|
3519
|
-
|
|
3507
|
+
const ptr1 = passStringToWasm0(arg3, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3508
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3509
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h1e3ad7787c877f1c(arg0, arg1, ptr0, len0, ptr1, len1);
|
|
3520
3510
|
}
|
|
3521
3511
|
|
|
3522
|
-
function
|
|
3523
|
-
wasm.
|
|
3512
|
+
function wasm_bindgen__convert__closures_____invoke__h813527826f148663(arg0, arg1, arg2, arg3, arg4) {
|
|
3513
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h813527826f148663(arg0, arg1, arg2, arg3, arg4);
|
|
3524
3514
|
}
|
|
3525
3515
|
|
|
3526
3516
|
|
|
Binary file
|
|
@@ -5,12 +5,12 @@ export const bootOriverseArtifact: (a: number, b: number) => any;
|
|
|
5
5
|
export const sim_worker_init: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
6
6
|
export const sim_worker_start_ticker: (a: number) => [number, number];
|
|
7
7
|
export const start_wasm_oriverse: () => void;
|
|
8
|
-
export const validate_world_entry: (a: number, b: number, c: number) => [number, number];
|
|
9
|
-
export const validate_world_shared_entry: (a: number, b: number, c: number) => [number, number];
|
|
10
8
|
export const worker_attach_read_dc: (a: any) => void;
|
|
11
9
|
export const worker_attach_write_dc: (a: any, b: any) => void;
|
|
12
10
|
export const worker_init: (a: number, b: number) => void;
|
|
13
11
|
export const worker_init_write: (a: number, b: number, c: number, d: number) => void;
|
|
12
|
+
export const validate_world_entry: (a: number, b: number, c: number) => [number, number];
|
|
13
|
+
export const validate_world_shared_entry: (a: number, b: number, c: number) => [number, number];
|
|
14
14
|
export const init_market_client_message_bridge: (a: any) => [number, number];
|
|
15
15
|
export const __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
16
16
|
export const __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
@@ -25,41 +25,40 @@ export const intounderlyingsink_close: (a: number) => any;
|
|
|
25
25
|
export const intounderlyingsink_write: (a: number, b: any) => any;
|
|
26
26
|
export const intounderlyingsource_cancel: (a: number) => void;
|
|
27
27
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
28
|
-
export const
|
|
28
|
+
export const wasm_bindgen__closure__destroy__h0baefc30fc54f1c1: (a: number, b: number) => void;
|
|
29
29
|
export const wasm_bindgen__closure__destroy__hf04f1b52029392cb: (a: number, b: number) => void;
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
30
|
+
export const wasm_bindgen__closure__destroy__h8d68c0c402e150fa: (a: number, b: number) => void;
|
|
31
|
+
export const wasm_bindgen__closure__destroy__h08b6962c9c4a8461: (a: number, b: number) => void;
|
|
32
32
|
export const wasm_bindgen__closure__destroy__h22ca06dde759e186: (a: number, b: number) => void;
|
|
33
33
|
export const wasm_bindgen__closure__destroy__h2fa417b22e371ac0: (a: number, b: number) => void;
|
|
34
34
|
export const wasm_bindgen__closure__destroy__h497a5311ffee252b: (a: number, b: number) => void;
|
|
35
35
|
export const wasm_bindgen__closure__destroy__h83f8bfe43e51586e: (a: number, b: number) => void;
|
|
36
36
|
export const wasm_bindgen__closure__destroy__h10eef66b5be2507e: (a: number, b: number) => void;
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
37
|
+
export const wasm_bindgen__closure__destroy__h1df966f72842a688: (a: number, b: number) => void;
|
|
38
|
+
export const wasm_bindgen__convert__closures_____invoke__h813527826f148663: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
39
|
+
export const wasm_bindgen__convert__closures_____invoke__h1e3ad7787c877f1c: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
40
|
+
export const wasm_bindgen__convert__closures_____invoke__hf686882a23e57c3e: (a: number, b: number, c: any, d: any) => void;
|
|
41
|
+
export const wasm_bindgen__convert__closures_____invoke__h6d3b5d34c5205706: (a: number, b: number, c: number, d: number) => void;
|
|
41
42
|
export const wasm_bindgen__convert__closures_____invoke__h9fd153286ed41e9c: (a: number, b: number, c: any, d: any) => void;
|
|
42
43
|
export const wasm_bindgen__convert__closures_____invoke__h1425c1d15e69fe66: (a: number, b: number, c: any) => [number, number];
|
|
43
|
-
export const wasm_bindgen__convert__closures_____invoke__h430dc5b36c3ff7df: (a: number, b: number, c: number, d: number) => void;
|
|
44
44
|
export const wasm_bindgen__convert__closures_____invoke__h65f53cb9c5fcb430: (a: number, b: number, c: any, d: any) => void;
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
49
|
-
export const
|
|
45
|
+
export const wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9: (a: number, b: number, c: any) => void;
|
|
46
|
+
export const wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_2: (a: number, b: number, c: any) => void;
|
|
47
|
+
export const wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_3: (a: number, b: number, c: any) => void;
|
|
48
|
+
export const wasm_bindgen__convert__closures_____invoke__h5db0fe9f8c1525c9_4: (a: number, b: number, c: any) => void;
|
|
49
|
+
export const wasm_bindgen__convert__closures_____invoke__h195f08c6c1eced42: (a: number, b: number, c: any) => void;
|
|
50
50
|
export const wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc: (a: number, b: number, c: any) => void;
|
|
51
|
-
export const wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc_9: (a: number, b: number, c: any) => void;
|
|
52
51
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1: (a: number, b: number, c: any) => void;
|
|
52
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_11: (a: number, b: number, c: any) => void;
|
|
53
53
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_12: (a: number, b: number, c: any) => void;
|
|
54
54
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_13: (a: number, b: number, c: any) => void;
|
|
55
55
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_14: (a: number, b: number, c: any) => void;
|
|
56
56
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_15: (a: number, b: number, c: any) => void;
|
|
57
57
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_16: (a: number, b: number, c: any) => void;
|
|
58
58
|
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_17: (a: number, b: number, c: any) => void;
|
|
59
|
-
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_18: (a: number, b: number, c: any) => void;
|
|
60
59
|
export const wasm_bindgen__convert__closures_____invoke__ha87a485729c1bc45: (a: number, b: number, c: number) => void;
|
|
61
60
|
export const wasm_bindgen__convert__closures_____invoke__h5fae2a5a8b174cd2: (a: number, b: number, c: any) => void;
|
|
62
|
-
export const
|
|
61
|
+
export const wasm_bindgen__convert__closures_____invoke__h90b6440bf676aed2: (a: number, b: number, c: any) => void;
|
|
63
62
|
export const wasm_bindgen__convert__closures_____invoke__hbc8eaa61aedbf990: (a: number, b: number) => void;
|
|
64
63
|
export const wasm_bindgen__convert__closures_____invoke__h916e8c5bf71a8454: (a: number, b: number) => void;
|
|
65
64
|
export const wasm_bindgen__convert__closures_____invoke__hcba5ad8b0d96cf50: (a: number, b: number) => void;
|
package/dist/prewarm.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Oriverse shader prewarm (engine-dist sidecar): replays this build's captured pipeline
|
|
2
|
+
// manifest (shader_prewarm_manifest.json, generated per release by
|
|
3
|
+
// scripts/generate_shader_prewarm_manifest.py) on a throwaway device so the engine's
|
|
4
|
+
// ~175 sync pipeline creates hit the browser's shader cache instead of serially compiling
|
|
5
|
+
// ~10s cold on the device timeline (the first-view freeze;
|
|
6
|
+
// docs/wasm_pipeline_freeze_handover.md). Load as a CLASSIC script tag from the same
|
|
7
|
+
// directory as the engine wasm; the manifest URL derives from this script's own src, so
|
|
8
|
+
// host pages stay version-agnostic. Fail-open at every step - absent manifest, fetch
|
|
9
|
+
// error, or replay failure all leave the engine on today's cold path. The engine's
|
|
10
|
+
// await_shader_prewarm_gate (lib.rs) bounds its create burst on `state`; keep that
|
|
11
|
+
// contract and the __mod/__bgl/__layout/'__auto' markers in sync with
|
|
12
|
+
// scripts/wasm_shader_hooks.py and the [pre_shader] block in web_package/index.html.
|
|
13
|
+
window.__ORI_SHADER_PREWARM = (() => {
|
|
14
|
+
const flag = { state: 'absent' };
|
|
15
|
+
if (!('gpu' in navigator) || !document.currentScript || !document.currentScript.src) return flag;
|
|
16
|
+
// iOS/iPadOS: a second GPUDevice during boot on the most memory-constrained platform
|
|
17
|
+
// for a Dawn-specific cache benefit - keep off until measured there.
|
|
18
|
+
if (/iPad|iPhone|iPod/.test(navigator.userAgent)
|
|
19
|
+
|| (/Mac/.test(navigator.platform) && navigator.maxTouchPoints > 1)) return flag;
|
|
20
|
+
const manifestUrl = new URL('shader_prewarm_manifest.json', document.currentScript.src).href;
|
|
21
|
+
flag.state = 'running';
|
|
22
|
+
flag.promise = (async () => {
|
|
23
|
+
const t0 = performance.now();
|
|
24
|
+
const resp = await fetch(manifestUrl, { priority: 'low' });
|
|
25
|
+
if (!resp.ok) { flag.state = 'absent'; console.log('[pre_shader] no manifest (http ' + resp.status + ')'); return; }
|
|
26
|
+
const man = await resp.json();
|
|
27
|
+
const tFetch = performance.now();
|
|
28
|
+
const ad = await navigator.gpu.requestAdapter({ powerPreference: 'high-performance' });
|
|
29
|
+
let device = null;
|
|
30
|
+
try { device = await ad.requestDevice(man.device || undefined); }
|
|
31
|
+
catch (e) { device = await ad.requestDevice(); }
|
|
32
|
+
const mods = man.modules.map((m) => device.createShaderModule({ label: m.label, code: m.code }));
|
|
33
|
+
let bgls = [];
|
|
34
|
+
let layouts = [];
|
|
35
|
+
// Explicit layout fidelity is mandatory: 'auto' changes bind remapping -> different
|
|
36
|
+
// generated HLSL -> cache miss for every render pipeline (probe-verified).
|
|
37
|
+
const deser = (d) => {
|
|
38
|
+
if (d === '__auto') return 'auto';
|
|
39
|
+
if (d === null || typeof d !== 'object') return d;
|
|
40
|
+
if (Array.isArray(d)) return d.map(deser);
|
|
41
|
+
if ('__mod' in d) return mods[d.__mod];
|
|
42
|
+
if ('__bgl' in d) return bgls[d.__bgl];
|
|
43
|
+
if ('__layout' in d) return layouts[d.__layout];
|
|
44
|
+
const o = {};
|
|
45
|
+
for (const k in d) o[k] = deser(d[k]);
|
|
46
|
+
return o;
|
|
47
|
+
};
|
|
48
|
+
bgls = (man.bgls || []).map((b) => device.createBindGroupLayout(deser(b)));
|
|
49
|
+
layouts = (man.layouts || []).map((l) => device.createPipelineLayout(deser(l)));
|
|
50
|
+
const results = await Promise.allSettled(man.pipelines.map((p) => {
|
|
51
|
+
const desc = deser(p.desc);
|
|
52
|
+
return p.kind === 'compute' ? device.createComputePipelineAsync(desc) : device.createRenderPipelineAsync(desc);
|
|
53
|
+
}));
|
|
54
|
+
try { device.destroy(); } catch (e) {}
|
|
55
|
+
const ok = results.filter((r) => r.status === 'fulfilled').length;
|
|
56
|
+
flag.state = 'done';
|
|
57
|
+
console.log('[pre_shader] replayed ' + ok + '/' + results.length
|
|
58
|
+
+ ' fetch ' + Math.round(tFetch - t0) + 'ms compile ' + Math.round(performance.now() - tFetch) + 'ms');
|
|
59
|
+
})().catch((e) => { flag.state = 'failed'; console.warn('[pre_shader] failed:', e); });
|
|
60
|
+
return flag;
|
|
61
|
+
})();
|