@vulfram/transport-browser 0.19.2-alpha → 0.19.4-alpha
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/lib/vulfram_core.d.ts +10 -6
- package/lib/vulfram_core.js +456 -15
- package/lib/vulfram_core_bg.wasm +0 -0
- package/lib/vulfram_core_bg.wasm.d.ts +8 -6
- package/package.json +1 -1
- package/src/index.ts +14 -34
package/lib/vulfram_core.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export function vulfram_tick(time_ms: number, delta_ms: number): number;
|
|
|
47
47
|
|
|
48
48
|
export function vulfram_upload_buffer(id: bigint, upload_type: number, data: Uint8Array): number;
|
|
49
49
|
|
|
50
|
+
export function wasm_start(): void;
|
|
51
|
+
|
|
50
52
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
51
53
|
|
|
52
54
|
export interface InitOutput {
|
|
@@ -62,16 +64,18 @@ export interface InitOutput {
|
|
|
62
64
|
readonly vulfram_send_queue: (a: number, b: number) => number;
|
|
63
65
|
readonly vulfram_tick: (a: number, b: number) => number;
|
|
64
66
|
readonly vulfram_upload_buffer: (a: bigint, b: number, c: number, d: number) => number;
|
|
65
|
-
readonly
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
67
|
+
readonly wasm_start: () => void;
|
|
68
|
+
readonly __wasm_bindgen_func_elem_2007: (a: number, b: number) => void;
|
|
69
|
+
readonly __wasm_bindgen_func_elem_2008: (a: number, b: number, c: number) => void;
|
|
70
|
+
readonly __wasm_bindgen_func_elem_4413: (a: number, b: number, c: number, d: number) => void;
|
|
71
|
+
readonly __wasm_bindgen_func_elem_2009: (a: number, b: number, c: number) => void;
|
|
72
|
+
readonly __wasm_bindgen_func_elem_2009_3: (a: number, b: number, c: number) => void;
|
|
70
73
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
71
74
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
72
75
|
readonly __wbindgen_export3: (a: number) => void;
|
|
73
|
-
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
74
76
|
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
77
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
78
|
+
readonly __wbindgen_start: () => void;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
package/lib/vulfram_core.js
CHANGED
|
@@ -141,6 +141,10 @@ export function vulfram_upload_buffer(id, upload_type, data) {
|
|
|
141
141
|
return ret >>> 0;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
export function wasm_start() {
|
|
145
|
+
wasm.wasm_start();
|
|
146
|
+
}
|
|
147
|
+
|
|
144
148
|
function __wbg_get_imports() {
|
|
145
149
|
const import0 = {
|
|
146
150
|
__proto__: null,
|
|
@@ -202,6 +206,14 @@ function __wbg_get_imports() {
|
|
|
202
206
|
const ret = getObject(arg0).axes;
|
|
203
207
|
return addHeapObject(ret);
|
|
204
208
|
},
|
|
209
|
+
__wbg_beginComputePass_31742703ea08718a: function(arg0, arg1) {
|
|
210
|
+
const ret = getObject(arg0).beginComputePass(getObject(arg1));
|
|
211
|
+
return addHeapObject(ret);
|
|
212
|
+
},
|
|
213
|
+
__wbg_beginRenderPass_b6be55dca13d3752: function() { return handleError(function (arg0, arg1) {
|
|
214
|
+
const ret = getObject(arg0).beginRenderPass(getObject(arg1));
|
|
215
|
+
return addHeapObject(ret);
|
|
216
|
+
}, arguments); },
|
|
205
217
|
__wbg_buffer_60b8043cd926067d: function(arg0) {
|
|
206
218
|
const ret = getObject(arg0).buffer;
|
|
207
219
|
return addHeapObject(ret);
|
|
@@ -259,6 +271,10 @@ function __wbg_get_imports() {
|
|
|
259
271
|
const ret = getObject(arg0).createBindGroupLayout(getObject(arg1));
|
|
260
272
|
return addHeapObject(ret);
|
|
261
273
|
}, arguments); },
|
|
274
|
+
__wbg_createBindGroup_dd602247ba7de53f: function(arg0, arg1) {
|
|
275
|
+
const ret = getObject(arg0).createBindGroup(getObject(arg1));
|
|
276
|
+
return addHeapObject(ret);
|
|
277
|
+
},
|
|
262
278
|
__wbg_createBufferSource_7102af74fcd1a840: function() { return handleError(function (arg0) {
|
|
263
279
|
const ret = getObject(arg0).createBufferSource();
|
|
264
280
|
return addHeapObject(ret);
|
|
@@ -271,6 +287,10 @@ function __wbg_get_imports() {
|
|
|
271
287
|
const ret = getObject(arg0).createCommandEncoder(getObject(arg1));
|
|
272
288
|
return addHeapObject(ret);
|
|
273
289
|
},
|
|
290
|
+
__wbg_createComputePipeline_d936327d73af6006: function(arg0, arg1) {
|
|
291
|
+
const ret = getObject(arg0).createComputePipeline(getObject(arg1));
|
|
292
|
+
return addHeapObject(ret);
|
|
293
|
+
},
|
|
274
294
|
__wbg_createGain_94d1140dbe2da90d: function() { return handleError(function (arg0) {
|
|
275
295
|
const ret = getObject(arg0).createGain();
|
|
276
296
|
return addHeapObject(ret);
|
|
@@ -287,6 +307,10 @@ function __wbg_get_imports() {
|
|
|
287
307
|
const ret = getObject(arg0).createQuerySet(getObject(arg1));
|
|
288
308
|
return addHeapObject(ret);
|
|
289
309
|
}, arguments); },
|
|
310
|
+
__wbg_createRenderPipeline_f33944b9347badf7: function() { return handleError(function (arg0, arg1) {
|
|
311
|
+
const ret = getObject(arg0).createRenderPipeline(getObject(arg1));
|
|
312
|
+
return addHeapObject(ret);
|
|
313
|
+
}, arguments); },
|
|
290
314
|
__wbg_createSampler_dfafeaada8a50f77: function(arg0, arg1) {
|
|
291
315
|
const ret = getObject(arg0).createSampler(getObject(arg1));
|
|
292
316
|
return addHeapObject(ret);
|
|
@@ -342,14 +366,40 @@ function __wbg_get_imports() {
|
|
|
342
366
|
const ret = getObject(arg0).devicePixelRatio;
|
|
343
367
|
return ret;
|
|
344
368
|
},
|
|
369
|
+
__wbg_dispatchWorkgroups_84e3afede9542ffe: function(arg0, arg1, arg2, arg3) {
|
|
370
|
+
getObject(arg0).dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
|
|
371
|
+
},
|
|
345
372
|
__wbg_document_c0320cd4183c6d9b: function(arg0) {
|
|
346
373
|
const ret = getObject(arg0).document;
|
|
347
374
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
348
375
|
},
|
|
376
|
+
__wbg_drawIndexed_a9f3f3b50747fecf: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
377
|
+
getObject(arg0).drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
|
|
378
|
+
},
|
|
379
|
+
__wbg_draw_58cc6aabf299781c: function(arg0, arg1, arg2, arg3, arg4) {
|
|
380
|
+
getObject(arg0).draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
|
|
381
|
+
},
|
|
349
382
|
__wbg_duration_d8deec647addb21e: function(arg0) {
|
|
350
383
|
const ret = getObject(arg0).duration;
|
|
351
384
|
return ret;
|
|
352
385
|
},
|
|
386
|
+
__wbg_end_39838302f918fcd7: function(arg0) {
|
|
387
|
+
getObject(arg0).end();
|
|
388
|
+
},
|
|
389
|
+
__wbg_end_df1851506654a0d6: function(arg0) {
|
|
390
|
+
getObject(arg0).end();
|
|
391
|
+
},
|
|
392
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
393
|
+
let deferred0_0;
|
|
394
|
+
let deferred0_1;
|
|
395
|
+
try {
|
|
396
|
+
deferred0_0 = arg0;
|
|
397
|
+
deferred0_1 = arg1;
|
|
398
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
399
|
+
} finally {
|
|
400
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
401
|
+
}
|
|
402
|
+
},
|
|
353
403
|
__wbg_features_b943826ea0734d5b: function(arg0) {
|
|
354
404
|
const ret = getObject(arg0).features;
|
|
355
405
|
return addHeapObject(ret);
|
|
@@ -378,6 +428,10 @@ function __wbg_get_imports() {
|
|
|
378
428
|
const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));
|
|
379
429
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
380
430
|
}, arguments); },
|
|
431
|
+
__wbg_getCurrentTexture_66ae9639eac28f8b: function() { return handleError(function (arg0) {
|
|
432
|
+
const ret = getObject(arg0).getCurrentTexture();
|
|
433
|
+
return addHeapObject(ret);
|
|
434
|
+
}, arguments); },
|
|
381
435
|
__wbg_getElementById_d1f25d287b19a833: function(arg0, arg1, arg2) {
|
|
382
436
|
const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
|
|
383
437
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -386,6 +440,10 @@ function __wbg_get_imports() {
|
|
|
386
440
|
const ret = getObject(arg0).getGamepads();
|
|
387
441
|
return addHeapObject(ret);
|
|
388
442
|
}, arguments); },
|
|
443
|
+
__wbg_getMappedRange_1197a8c58eb0add9: function() { return handleError(function (arg0, arg1, arg2) {
|
|
444
|
+
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
445
|
+
return addHeapObject(ret);
|
|
446
|
+
}, arguments); },
|
|
389
447
|
__wbg_getPreferredCanvasFormat_2a0a2628959bb15a: function(arg0) {
|
|
390
448
|
const ret = getObject(arg0).getPreferredCanvasFormat();
|
|
391
449
|
return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 96) - 1;
|
|
@@ -561,6 +619,10 @@ function __wbg_get_imports() {
|
|
|
561
619
|
const ret = getObject(arg0).length;
|
|
562
620
|
return ret;
|
|
563
621
|
},
|
|
622
|
+
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
623
|
+
const ret = getObject(arg0).length;
|
|
624
|
+
return ret;
|
|
625
|
+
},
|
|
564
626
|
__wbg_limits_b07b967d1572556f: function(arg0) {
|
|
565
627
|
const ret = getObject(arg0).limits;
|
|
566
628
|
return addHeapObject(ret);
|
|
@@ -705,6 +767,10 @@ function __wbg_get_imports() {
|
|
|
705
767
|
const ret = getObject(arg0).navigator;
|
|
706
768
|
return addHeapObject(ret);
|
|
707
769
|
},
|
|
770
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
771
|
+
const ret = new Error();
|
|
772
|
+
return addHeapObject(ret);
|
|
773
|
+
},
|
|
708
774
|
__wbg_new_5e532409c6c7bba4: function() { return handleError(function () {
|
|
709
775
|
const ret = new lAudioContext();
|
|
710
776
|
return addHeapObject(ret);
|
|
@@ -721,14 +787,26 @@ function __wbg_get_imports() {
|
|
|
721
787
|
const ret = new Array();
|
|
722
788
|
return addHeapObject(ret);
|
|
723
789
|
},
|
|
790
|
+
__wbg_new_with_byte_offset_and_length_b2ec5bf7b2f35743: function(arg0, arg1, arg2) {
|
|
791
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
792
|
+
return addHeapObject(ret);
|
|
793
|
+
},
|
|
724
794
|
__wbg_now_16f0c993d5dd6c27: function() {
|
|
725
795
|
const ret = Date.now();
|
|
726
796
|
return ret;
|
|
727
797
|
},
|
|
798
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
799
|
+
const ret = getObject(arg0).now();
|
|
800
|
+
return ret;
|
|
801
|
+
},
|
|
728
802
|
__wbg_onSubmittedWorkDone_a33e32762de21b3d: function(arg0) {
|
|
729
803
|
const ret = getObject(arg0).onSubmittedWorkDone();
|
|
730
804
|
return addHeapObject(ret);
|
|
731
805
|
},
|
|
806
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
807
|
+
const ret = getObject(arg0).performance;
|
|
808
|
+
return addHeapObject(ret);
|
|
809
|
+
},
|
|
732
810
|
__wbg_playbackRate_53ab6902d4c67665: function(arg0) {
|
|
733
811
|
const ret = getObject(arg0).playbackRate;
|
|
734
812
|
return addHeapObject(ret);
|
|
@@ -748,6 +826,9 @@ function __wbg_get_imports() {
|
|
|
748
826
|
const ret = getObject(arg0).pressed;
|
|
749
827
|
return ret;
|
|
750
828
|
},
|
|
829
|
+
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
830
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
831
|
+
},
|
|
751
832
|
__wbg_push_e87b0e732085a946: function(arg0, arg1) {
|
|
752
833
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
753
834
|
return ret;
|
|
@@ -782,26 +863,59 @@ function __wbg_get_imports() {
|
|
|
782
863
|
const ret = getObject(arg0).requestDevice(getObject(arg1));
|
|
783
864
|
return addHeapObject(ret);
|
|
784
865
|
},
|
|
866
|
+
__wbg_resolveQuerySet_39f3e2286b7fdd86: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
867
|
+
getObject(arg0).resolveQuerySet(getObject(arg1), arg2 >>> 0, arg3 >>> 0, getObject(arg4), arg5 >>> 0);
|
|
868
|
+
},
|
|
785
869
|
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
786
870
|
const ret = Promise.resolve(getObject(arg0));
|
|
787
871
|
return addHeapObject(ret);
|
|
788
872
|
},
|
|
873
|
+
__wbg_setBindGroup_24fcfe125e006dd4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
874
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2), getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
|
|
875
|
+
}, arguments); },
|
|
876
|
+
__wbg_setBindGroup_3fecca142efa3bcf: function(arg0, arg1, arg2) {
|
|
877
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2));
|
|
878
|
+
},
|
|
879
|
+
__wbg_setBindGroup_af7eca394a335db6: function(arg0, arg1, arg2) {
|
|
880
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2));
|
|
881
|
+
},
|
|
882
|
+
__wbg_setIndexBuffer_b194910ae0ffcbf4: function(arg0, arg1, arg2, arg3, arg4) {
|
|
883
|
+
getObject(arg0).setIndexBuffer(getObject(arg1), __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4);
|
|
884
|
+
},
|
|
789
885
|
__wbg_setOrientation_1b21b05a48223336: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
790
886
|
getObject(arg0).setOrientation(arg1, arg2, arg3, arg4, arg5, arg6);
|
|
791
887
|
},
|
|
792
888
|
__wbg_setOrientation_d4a6ce904b0e3c0a: function(arg0, arg1, arg2, arg3) {
|
|
793
889
|
getObject(arg0).setOrientation(arg1, arg2, arg3);
|
|
794
890
|
},
|
|
891
|
+
__wbg_setPipeline_5cbb15c634c129f9: function(arg0, arg1) {
|
|
892
|
+
getObject(arg0).setPipeline(getObject(arg1));
|
|
893
|
+
},
|
|
894
|
+
__wbg_setPipeline_fb3b65583e919c05: function(arg0, arg1) {
|
|
895
|
+
getObject(arg0).setPipeline(getObject(arg1));
|
|
896
|
+
},
|
|
795
897
|
__wbg_setPosition_31da8fd878c80607: function(arg0, arg1, arg2, arg3) {
|
|
796
898
|
getObject(arg0).setPosition(arg1, arg2, arg3);
|
|
797
899
|
},
|
|
798
900
|
__wbg_setPosition_a2c722e8e6486df6: function(arg0, arg1, arg2, arg3) {
|
|
799
901
|
getObject(arg0).setPosition(arg1, arg2, arg3);
|
|
800
902
|
},
|
|
903
|
+
__wbg_setScissorRect_a9e5c3940a138618: function(arg0, arg1, arg2, arg3, arg4) {
|
|
904
|
+
getObject(arg0).setScissorRect(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
|
|
905
|
+
},
|
|
906
|
+
__wbg_setVertexBuffer_9e822995adc29ff7: function(arg0, arg1, arg2, arg3, arg4) {
|
|
907
|
+
getObject(arg0).setVertexBuffer(arg1 >>> 0, getObject(arg2), arg3, arg4);
|
|
908
|
+
},
|
|
909
|
+
__wbg_setViewport_678e829434bcd550: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
910
|
+
getObject(arg0).setViewport(arg1, arg2, arg3, arg4, arg5, arg6);
|
|
911
|
+
},
|
|
801
912
|
__wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
|
|
802
913
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
803
914
|
return ret;
|
|
804
915
|
}, arguments); },
|
|
916
|
+
__wbg_set_a_c6ed845ffb46afcc: function(arg0, arg1) {
|
|
917
|
+
getObject(arg0).a = arg1;
|
|
918
|
+
},
|
|
805
919
|
__wbg_set_access_9d39f60326d67278: function(arg0, arg1) {
|
|
806
920
|
getObject(arg0).access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
|
|
807
921
|
},
|
|
@@ -814,45 +928,90 @@ function __wbg_get_imports() {
|
|
|
814
928
|
__wbg_set_address_mode_w_d617929f92a5b8cc: function(arg0, arg1) {
|
|
815
929
|
getObject(arg0).addressModeW = __wbindgen_enum_GpuAddressMode[arg1];
|
|
816
930
|
},
|
|
931
|
+
__wbg_set_alpha_a3317d40d97c514e: function(arg0, arg1) {
|
|
932
|
+
getObject(arg0).alpha = getObject(arg1);
|
|
933
|
+
},
|
|
817
934
|
__wbg_set_alpha_mode_1ae7e0aa38a8eba8: function(arg0, arg1) {
|
|
818
935
|
getObject(arg0).alphaMode = __wbindgen_enum_GpuCanvasAlphaMode[arg1];
|
|
819
936
|
},
|
|
937
|
+
__wbg_set_alpha_to_coverage_enabled_0c11d91caea2b92d: function(arg0, arg1) {
|
|
938
|
+
getObject(arg0).alphaToCoverageEnabled = arg1 !== 0;
|
|
939
|
+
},
|
|
820
940
|
__wbg_set_array_layer_count_83a40d42f8858bba: function(arg0, arg1) {
|
|
821
941
|
getObject(arg0).arrayLayerCount = arg1 >>> 0;
|
|
822
942
|
},
|
|
943
|
+
__wbg_set_array_stride_34be696a5e66eb16: function(arg0, arg1) {
|
|
944
|
+
getObject(arg0).arrayStride = arg1;
|
|
945
|
+
},
|
|
823
946
|
__wbg_set_aspect_9d30d9ca40403001: function(arg0, arg1) {
|
|
824
947
|
getObject(arg0).aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
825
948
|
},
|
|
826
949
|
__wbg_set_aspect_f231ddb55e5c30eb: function(arg0, arg1) {
|
|
827
950
|
getObject(arg0).aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
828
951
|
},
|
|
952
|
+
__wbg_set_attributes_02005a0f12df5908: function(arg0, arg1) {
|
|
953
|
+
getObject(arg0).attributes = getObject(arg1);
|
|
954
|
+
},
|
|
955
|
+
__wbg_set_b_f55b6a25fa56cccd: function(arg0, arg1) {
|
|
956
|
+
getObject(arg0).b = arg1;
|
|
957
|
+
},
|
|
829
958
|
__wbg_set_base_array_layer_f8f8eb2d7bd5eb65: function(arg0, arg1) {
|
|
830
959
|
getObject(arg0).baseArrayLayer = arg1 >>> 0;
|
|
831
960
|
},
|
|
832
961
|
__wbg_set_base_mip_level_41735f9b982a26b8: function(arg0, arg1) {
|
|
833
962
|
getObject(arg0).baseMipLevel = arg1 >>> 0;
|
|
834
963
|
},
|
|
964
|
+
__wbg_set_beginning_of_pass_write_index_ff16e69caf566bee: function(arg0, arg1) {
|
|
965
|
+
getObject(arg0).beginningOfPassWriteIndex = arg1 >>> 0;
|
|
966
|
+
},
|
|
835
967
|
__wbg_set_bind_group_layouts_ddc70fed7170a2ee: function(arg0, arg1) {
|
|
836
968
|
getObject(arg0).bindGroupLayouts = getObject(arg1);
|
|
837
969
|
},
|
|
970
|
+
__wbg_set_binding_53105cd45cae6a03: function(arg0, arg1) {
|
|
971
|
+
getObject(arg0).binding = arg1 >>> 0;
|
|
972
|
+
},
|
|
838
973
|
__wbg_set_binding_d82fdc5364e5b0c5: function(arg0, arg1) {
|
|
839
974
|
getObject(arg0).binding = arg1 >>> 0;
|
|
840
975
|
},
|
|
976
|
+
__wbg_set_blend_00219e805977440c: function(arg0, arg1) {
|
|
977
|
+
getObject(arg0).blend = getObject(arg1);
|
|
978
|
+
},
|
|
841
979
|
__wbg_set_buffer_0c946e9b46823a5c: function(arg0, arg1) {
|
|
842
980
|
getObject(arg0).buffer = getObject(arg1);
|
|
843
981
|
},
|
|
982
|
+
__wbg_set_buffer_21a336fe62828e11: function(arg0, arg1) {
|
|
983
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
984
|
+
},
|
|
844
985
|
__wbg_set_buffer_ea42becad62e7650: function(arg0, arg1) {
|
|
845
986
|
getObject(arg0).buffer = getObject(arg1);
|
|
846
987
|
},
|
|
988
|
+
__wbg_set_buffers_070770ce2c0d5522: function(arg0, arg1) {
|
|
989
|
+
getObject(arg0).buffers = getObject(arg1);
|
|
990
|
+
},
|
|
847
991
|
__wbg_set_bytes_per_row_8e39002b1f627e4d: function(arg0, arg1) {
|
|
848
992
|
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
849
993
|
},
|
|
994
|
+
__wbg_set_clear_value_4ed990a8b197a59a: function(arg0, arg1) {
|
|
995
|
+
getObject(arg0).clearValue = getObject(arg1);
|
|
996
|
+
},
|
|
850
997
|
__wbg_set_code_7a3890c4ffd4f7d4: function(arg0, arg1, arg2) {
|
|
851
998
|
getObject(arg0).code = getStringFromWasm0(arg1, arg2);
|
|
852
999
|
},
|
|
1000
|
+
__wbg_set_color_85a6e64ea881593f: function(arg0, arg1) {
|
|
1001
|
+
getObject(arg0).color = getObject(arg1);
|
|
1002
|
+
},
|
|
1003
|
+
__wbg_set_color_attachments_88b752139b2e1a01: function(arg0, arg1) {
|
|
1004
|
+
getObject(arg0).colorAttachments = getObject(arg1);
|
|
1005
|
+
},
|
|
853
1006
|
__wbg_set_compare_494fcab2dc5d7792: function(arg0, arg1) {
|
|
854
1007
|
getObject(arg0).compare = __wbindgen_enum_GpuCompareFunction[arg1];
|
|
855
1008
|
},
|
|
1009
|
+
__wbg_set_compare_71e8ea844225b7cb: function(arg0, arg1) {
|
|
1010
|
+
getObject(arg0).compare = __wbindgen_enum_GpuCompareFunction[arg1];
|
|
1011
|
+
},
|
|
1012
|
+
__wbg_set_compute_ae49764c749c761e: function(arg0, arg1) {
|
|
1013
|
+
getObject(arg0).compute = getObject(arg1);
|
|
1014
|
+
},
|
|
856
1015
|
__wbg_set_coneInnerAngle_0d52a3a55113aff7: function(arg0, arg1) {
|
|
857
1016
|
getObject(arg0).coneInnerAngle = arg1;
|
|
858
1017
|
},
|
|
@@ -862,12 +1021,54 @@ function __wbg_get_imports() {
|
|
|
862
1021
|
__wbg_set_coneOuterGain_73d4779f24b178a4: function(arg0, arg1) {
|
|
863
1022
|
getObject(arg0).coneOuterGain = arg1;
|
|
864
1023
|
},
|
|
1024
|
+
__wbg_set_count_036a202e127d1828: function(arg0, arg1) {
|
|
1025
|
+
getObject(arg0).count = arg1 >>> 0;
|
|
1026
|
+
},
|
|
865
1027
|
__wbg_set_count_a9eaef363f94ce4a: function(arg0, arg1) {
|
|
866
1028
|
getObject(arg0).count = arg1 >>> 0;
|
|
867
1029
|
},
|
|
1030
|
+
__wbg_set_cull_mode_8c42221bd938897d: function(arg0, arg1) {
|
|
1031
|
+
getObject(arg0).cullMode = __wbindgen_enum_GpuCullMode[arg1];
|
|
1032
|
+
},
|
|
1033
|
+
__wbg_set_depth_bias_8de79219aa9d3e44: function(arg0, arg1) {
|
|
1034
|
+
getObject(arg0).depthBias = arg1;
|
|
1035
|
+
},
|
|
1036
|
+
__wbg_set_depth_bias_clamp_930cad73d46884cf: function(arg0, arg1) {
|
|
1037
|
+
getObject(arg0).depthBiasClamp = arg1;
|
|
1038
|
+
},
|
|
1039
|
+
__wbg_set_depth_bias_slope_scale_85d4c3f48c50408b: function(arg0, arg1) {
|
|
1040
|
+
getObject(arg0).depthBiasSlopeScale = arg1;
|
|
1041
|
+
},
|
|
1042
|
+
__wbg_set_depth_clear_value_ef40fa181859a36f: function(arg0, arg1) {
|
|
1043
|
+
getObject(arg0).depthClearValue = arg1;
|
|
1044
|
+
},
|
|
1045
|
+
__wbg_set_depth_compare_1273836af777aaa4: function(arg0, arg1) {
|
|
1046
|
+
getObject(arg0).depthCompare = __wbindgen_enum_GpuCompareFunction[arg1];
|
|
1047
|
+
},
|
|
1048
|
+
__wbg_set_depth_fail_op_424b14249d8983bf: function(arg0, arg1) {
|
|
1049
|
+
getObject(arg0).depthFailOp = __wbindgen_enum_GpuStencilOperation[arg1];
|
|
1050
|
+
},
|
|
1051
|
+
__wbg_set_depth_load_op_57a7381c934d435e: function(arg0, arg1) {
|
|
1052
|
+
getObject(arg0).depthLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
|
|
1053
|
+
},
|
|
868
1054
|
__wbg_set_depth_or_array_layers_3601a844f36fa25f: function(arg0, arg1) {
|
|
869
1055
|
getObject(arg0).depthOrArrayLayers = arg1 >>> 0;
|
|
870
1056
|
},
|
|
1057
|
+
__wbg_set_depth_read_only_44e6668e5d98f75f: function(arg0, arg1) {
|
|
1058
|
+
getObject(arg0).depthReadOnly = arg1 !== 0;
|
|
1059
|
+
},
|
|
1060
|
+
__wbg_set_depth_stencil_5abb374ddd7f3268: function(arg0, arg1) {
|
|
1061
|
+
getObject(arg0).depthStencil = getObject(arg1);
|
|
1062
|
+
},
|
|
1063
|
+
__wbg_set_depth_stencil_attachment_eb9d08fc6e7a8fda: function(arg0, arg1) {
|
|
1064
|
+
getObject(arg0).depthStencilAttachment = getObject(arg1);
|
|
1065
|
+
},
|
|
1066
|
+
__wbg_set_depth_store_op_124f84da3afff2bd: function(arg0, arg1) {
|
|
1067
|
+
getObject(arg0).depthStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
|
|
1068
|
+
},
|
|
1069
|
+
__wbg_set_depth_write_enabled_93d4e872c40ad885: function(arg0, arg1) {
|
|
1070
|
+
getObject(arg0).depthWriteEnabled = arg1 !== 0;
|
|
1071
|
+
},
|
|
871
1072
|
__wbg_set_device_7a51a7721914c23c: function(arg0, arg1) {
|
|
872
1073
|
getObject(arg0).device = getObject(arg1);
|
|
873
1074
|
},
|
|
@@ -877,12 +1078,36 @@ function __wbg_get_imports() {
|
|
|
877
1078
|
__wbg_set_dimension_b61b3c48adf487c1: function(arg0, arg1) {
|
|
878
1079
|
getObject(arg0).dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
879
1080
|
},
|
|
1081
|
+
__wbg_set_dst_factor_6cbfc3a6898cc9ce: function(arg0, arg1) {
|
|
1082
|
+
getObject(arg0).dstFactor = __wbindgen_enum_GpuBlendFactor[arg1];
|
|
1083
|
+
},
|
|
1084
|
+
__wbg_set_e80615d7a9a43981: function(arg0, arg1, arg2) {
|
|
1085
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1086
|
+
},
|
|
1087
|
+
__wbg_set_end_of_pass_write_index_41d72471cce1e061: function(arg0, arg1) {
|
|
1088
|
+
getObject(arg0).endOfPassWriteIndex = arg1 >>> 0;
|
|
1089
|
+
},
|
|
1090
|
+
__wbg_set_entries_0d3ea75764a89b83: function(arg0, arg1) {
|
|
1091
|
+
getObject(arg0).entries = getObject(arg1);
|
|
1092
|
+
},
|
|
880
1093
|
__wbg_set_entries_922ec6089646247e: function(arg0, arg1) {
|
|
881
1094
|
getObject(arg0).entries = getObject(arg1);
|
|
882
1095
|
},
|
|
1096
|
+
__wbg_set_entry_point_087ca8094ce666fd: function(arg0, arg1, arg2) {
|
|
1097
|
+
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
1098
|
+
},
|
|
1099
|
+
__wbg_set_entry_point_b770157326a1b59e: function(arg0, arg1, arg2) {
|
|
1100
|
+
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
1101
|
+
},
|
|
1102
|
+
__wbg_set_entry_point_d7efddda482bc7fe: function(arg0, arg1, arg2) {
|
|
1103
|
+
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
1104
|
+
},
|
|
883
1105
|
__wbg_set_external_texture_41cadb0b9faf1919: function(arg0, arg1) {
|
|
884
1106
|
getObject(arg0).externalTexture = getObject(arg1);
|
|
885
1107
|
},
|
|
1108
|
+
__wbg_set_fail_op_9865183abff904e0: function(arg0, arg1) {
|
|
1109
|
+
getObject(arg0).failOp = __wbindgen_enum_GpuStencilOperation[arg1];
|
|
1110
|
+
},
|
|
886
1111
|
__wbg_set_format_09f304cdbee40626: function(arg0, arg1) {
|
|
887
1112
|
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
888
1113
|
},
|
|
@@ -892,9 +1117,27 @@ function __wbg_get_imports() {
|
|
|
892
1117
|
__wbg_set_format_98f7ca48143feacb: function(arg0, arg1) {
|
|
893
1118
|
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
894
1119
|
},
|
|
1120
|
+
__wbg_set_format_b111ffed7e227fef: function(arg0, arg1) {
|
|
1121
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
1122
|
+
},
|
|
1123
|
+
__wbg_set_format_b3f26219150f6fcf: function(arg0, arg1) {
|
|
1124
|
+
getObject(arg0).format = __wbindgen_enum_GpuVertexFormat[arg1];
|
|
1125
|
+
},
|
|
1126
|
+
__wbg_set_format_dbb02ef2a1b11c73: function(arg0, arg1) {
|
|
1127
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
1128
|
+
},
|
|
895
1129
|
__wbg_set_format_fd82439cf1e1f024: function(arg0, arg1) {
|
|
896
1130
|
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
897
1131
|
},
|
|
1132
|
+
__wbg_set_fragment_4026e84121693413: function(arg0, arg1) {
|
|
1133
|
+
getObject(arg0).fragment = getObject(arg1);
|
|
1134
|
+
},
|
|
1135
|
+
__wbg_set_front_face_abcfb70c2001a63b: function(arg0, arg1) {
|
|
1136
|
+
getObject(arg0).frontFace = __wbindgen_enum_GpuFrontFace[arg1];
|
|
1137
|
+
},
|
|
1138
|
+
__wbg_set_g_3e49035507785f14: function(arg0, arg1) {
|
|
1139
|
+
getObject(arg0).g = arg1;
|
|
1140
|
+
},
|
|
898
1141
|
__wbg_set_has_dynamic_offset_ebc87f184bf9b1b6: function(arg0, arg1) {
|
|
899
1142
|
getObject(arg0).hasDynamicOffset = arg1 !== 0;
|
|
900
1143
|
},
|
|
@@ -919,6 +1162,9 @@ function __wbg_get_imports() {
|
|
|
919
1162
|
__wbg_set_label_565007795fa1b28b: function(arg0, arg1, arg2) {
|
|
920
1163
|
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
921
1164
|
},
|
|
1165
|
+
__wbg_set_label_64f13c71608a2731: function(arg0, arg1, arg2) {
|
|
1166
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
1167
|
+
},
|
|
922
1168
|
__wbg_set_label_6b0d6041cd54c099: function(arg0, arg1, arg2) {
|
|
923
1169
|
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
924
1170
|
},
|
|
@@ -931,12 +1177,36 @@ function __wbg_get_imports() {
|
|
|
931
1177
|
__wbg_set_label_7d273105ca29a945: function(arg0, arg1, arg2) {
|
|
932
1178
|
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
933
1179
|
},
|
|
1180
|
+
__wbg_set_label_889010e958e191c9: function(arg0, arg1, arg2) {
|
|
1181
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
1182
|
+
},
|
|
1183
|
+
__wbg_set_label_96ff54a6b9baaf90: function(arg0, arg1, arg2) {
|
|
1184
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
1185
|
+
},
|
|
1186
|
+
__wbg_set_label_b80919003c66c761: function(arg0, arg1, arg2) {
|
|
1187
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
1188
|
+
},
|
|
1189
|
+
__wbg_set_label_cbbe51e986da3989: function(arg0, arg1, arg2) {
|
|
1190
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
1191
|
+
},
|
|
934
1192
|
__wbg_set_label_ccc4850f4197dc22: function(arg0, arg1, arg2) {
|
|
935
1193
|
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
936
1194
|
},
|
|
937
1195
|
__wbg_set_label_f601b846b41b7232: function(arg0, arg1, arg2) {
|
|
938
1196
|
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
939
1197
|
},
|
|
1198
|
+
__wbg_set_layout_0561f0404037d441: function(arg0, arg1) {
|
|
1199
|
+
getObject(arg0).layout = getObject(arg1);
|
|
1200
|
+
},
|
|
1201
|
+
__wbg_set_layout_464ae8395c01fe6e: function(arg0, arg1) {
|
|
1202
|
+
getObject(arg0).layout = getObject(arg1);
|
|
1203
|
+
},
|
|
1204
|
+
__wbg_set_layout_b990b908a7810b31: function(arg0, arg1) {
|
|
1205
|
+
getObject(arg0).layout = getObject(arg1);
|
|
1206
|
+
},
|
|
1207
|
+
__wbg_set_load_op_5d3a8abceb4a5269: function(arg0, arg1) {
|
|
1208
|
+
getObject(arg0).loadOp = __wbindgen_enum_GpuLoadOp[arg1];
|
|
1209
|
+
},
|
|
940
1210
|
__wbg_set_lod_max_clamp_bf825cfbdd106655: function(arg0, arg1) {
|
|
941
1211
|
getObject(arg0).lodMaxClamp = arg1;
|
|
942
1212
|
},
|
|
@@ -952,6 +1222,9 @@ function __wbg_get_imports() {
|
|
|
952
1222
|
__wbg_set_mapped_at_creation_ff06f7ed93a315dd: function(arg0, arg1) {
|
|
953
1223
|
getObject(arg0).mappedAtCreation = arg1 !== 0;
|
|
954
1224
|
},
|
|
1225
|
+
__wbg_set_mask_ad9d29606115a472: function(arg0, arg1) {
|
|
1226
|
+
getObject(arg0).mask = arg1 >>> 0;
|
|
1227
|
+
},
|
|
955
1228
|
__wbg_set_maxDistance_d0b2f914aaef4ea8: function(arg0, arg1) {
|
|
956
1229
|
getObject(arg0).maxDistance = arg1;
|
|
957
1230
|
},
|
|
@@ -976,24 +1249,63 @@ function __wbg_get_imports() {
|
|
|
976
1249
|
__wbg_set_mipmap_filter_202e81e75b49e109: function(arg0, arg1) {
|
|
977
1250
|
getObject(arg0).mipmapFilter = __wbindgen_enum_GpuMipmapFilterMode[arg1];
|
|
978
1251
|
},
|
|
1252
|
+
__wbg_set_module_3d1725eef3718083: function(arg0, arg1) {
|
|
1253
|
+
getObject(arg0).module = getObject(arg1);
|
|
1254
|
+
},
|
|
1255
|
+
__wbg_set_module_6d0431faccebdcc4: function(arg0, arg1) {
|
|
1256
|
+
getObject(arg0).module = getObject(arg1);
|
|
1257
|
+
},
|
|
1258
|
+
__wbg_set_module_701adba2958bd873: function(arg0, arg1) {
|
|
1259
|
+
getObject(arg0).module = getObject(arg1);
|
|
1260
|
+
},
|
|
1261
|
+
__wbg_set_multisample_e577402263e48ad4: function(arg0, arg1) {
|
|
1262
|
+
getObject(arg0).multisample = getObject(arg1);
|
|
1263
|
+
},
|
|
979
1264
|
__wbg_set_multisampled_2180d2b5d246ae13: function(arg0, arg1) {
|
|
980
1265
|
getObject(arg0).multisampled = arg1 !== 0;
|
|
981
1266
|
},
|
|
1267
|
+
__wbg_set_offset_2d6ab375385cd2ae: function(arg0, arg1) {
|
|
1268
|
+
getObject(arg0).offset = arg1;
|
|
1269
|
+
},
|
|
1270
|
+
__wbg_set_offset_3fadbb3d3dadd4ef: function(arg0, arg1) {
|
|
1271
|
+
getObject(arg0).offset = arg1;
|
|
1272
|
+
},
|
|
982
1273
|
__wbg_set_offset_fa633343238c309f: function(arg0, arg1) {
|
|
983
1274
|
getObject(arg0).offset = arg1;
|
|
984
1275
|
},
|
|
1276
|
+
__wbg_set_operation_3a748fcc4d122201: function(arg0, arg1) {
|
|
1277
|
+
getObject(arg0).operation = __wbindgen_enum_GpuBlendOperation[arg1];
|
|
1278
|
+
},
|
|
985
1279
|
__wbg_set_origin_5531aa268ce97d9d: function(arg0, arg1) {
|
|
986
1280
|
getObject(arg0).origin = getObject(arg1);
|
|
987
1281
|
},
|
|
1282
|
+
__wbg_set_pass_op_e82189d4f2d5c48d: function(arg0, arg1) {
|
|
1283
|
+
getObject(arg0).passOp = __wbindgen_enum_GpuStencilOperation[arg1];
|
|
1284
|
+
},
|
|
988
1285
|
__wbg_set_power_preference_f8956c3fea27c41d: function(arg0, arg1) {
|
|
989
1286
|
getObject(arg0).powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
|
|
990
1287
|
},
|
|
1288
|
+
__wbg_set_primitive_65a118359b90be29: function(arg0, arg1) {
|
|
1289
|
+
getObject(arg0).primitive = getObject(arg1);
|
|
1290
|
+
},
|
|
1291
|
+
__wbg_set_query_set_17c4bef32f23bd7e: function(arg0, arg1) {
|
|
1292
|
+
getObject(arg0).querySet = getObject(arg1);
|
|
1293
|
+
},
|
|
1294
|
+
__wbg_set_r_399b4e4373534d2d: function(arg0, arg1) {
|
|
1295
|
+
getObject(arg0).r = arg1;
|
|
1296
|
+
},
|
|
991
1297
|
__wbg_set_refDistance_8ea4a5e2e800a09a: function(arg0, arg1) {
|
|
992
1298
|
getObject(arg0).refDistance = arg1;
|
|
993
1299
|
},
|
|
994
1300
|
__wbg_set_required_features_83604ede3c9e0352: function(arg0, arg1) {
|
|
995
1301
|
getObject(arg0).requiredFeatures = getObject(arg1);
|
|
996
1302
|
},
|
|
1303
|
+
__wbg_set_resolve_target_1a8386ab8943f477: function(arg0, arg1) {
|
|
1304
|
+
getObject(arg0).resolveTarget = getObject(arg1);
|
|
1305
|
+
},
|
|
1306
|
+
__wbg_set_resource_ec6d0e1222a3141f: function(arg0, arg1) {
|
|
1307
|
+
getObject(arg0).resource = getObject(arg1);
|
|
1308
|
+
},
|
|
997
1309
|
__wbg_set_rolloffFactor_329653fa9008d227: function(arg0, arg1) {
|
|
998
1310
|
getObject(arg0).rolloffFactor = arg1;
|
|
999
1311
|
},
|
|
@@ -1009,21 +1321,72 @@ function __wbg_get_imports() {
|
|
|
1009
1321
|
__wbg_set_sampler_e11b32a88597fe6a: function(arg0, arg1) {
|
|
1010
1322
|
getObject(arg0).sampler = getObject(arg1);
|
|
1011
1323
|
},
|
|
1324
|
+
__wbg_set_shader_location_87fe60eb5cf2ef69: function(arg0, arg1) {
|
|
1325
|
+
getObject(arg0).shaderLocation = arg1 >>> 0;
|
|
1326
|
+
},
|
|
1327
|
+
__wbg_set_size_724b776b74138f07: function(arg0, arg1) {
|
|
1328
|
+
getObject(arg0).size = arg1;
|
|
1329
|
+
},
|
|
1012
1330
|
__wbg_set_size_a15931d6b21f35f9: function(arg0, arg1) {
|
|
1013
1331
|
getObject(arg0).size = arg1;
|
|
1014
1332
|
},
|
|
1015
1333
|
__wbg_set_size_e76794a3069a90d7: function(arg0, arg1) {
|
|
1016
1334
|
getObject(arg0).size = getObject(arg1);
|
|
1017
1335
|
},
|
|
1336
|
+
__wbg_set_src_factor_00c2d54742fd17a4: function(arg0, arg1) {
|
|
1337
|
+
getObject(arg0).srcFactor = __wbindgen_enum_GpuBlendFactor[arg1];
|
|
1338
|
+
},
|
|
1339
|
+
__wbg_set_stencil_back_9ee211b35e39be71: function(arg0, arg1) {
|
|
1340
|
+
getObject(arg0).stencilBack = getObject(arg1);
|
|
1341
|
+
},
|
|
1342
|
+
__wbg_set_stencil_clear_value_884e0e38f410ec12: function(arg0, arg1) {
|
|
1343
|
+
getObject(arg0).stencilClearValue = arg1 >>> 0;
|
|
1344
|
+
},
|
|
1345
|
+
__wbg_set_stencil_front_4fc7b9162e3cc71f: function(arg0, arg1) {
|
|
1346
|
+
getObject(arg0).stencilFront = getObject(arg1);
|
|
1347
|
+
},
|
|
1348
|
+
__wbg_set_stencil_load_op_eeb37a3ee387626f: function(arg0, arg1) {
|
|
1349
|
+
getObject(arg0).stencilLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
|
|
1350
|
+
},
|
|
1351
|
+
__wbg_set_stencil_read_mask_52264a1876326ce1: function(arg0, arg1) {
|
|
1352
|
+
getObject(arg0).stencilReadMask = arg1 >>> 0;
|
|
1353
|
+
},
|
|
1354
|
+
__wbg_set_stencil_read_only_192e9b65a6822039: function(arg0, arg1) {
|
|
1355
|
+
getObject(arg0).stencilReadOnly = arg1 !== 0;
|
|
1356
|
+
},
|
|
1357
|
+
__wbg_set_stencil_store_op_c110d1172a277982: function(arg0, arg1) {
|
|
1358
|
+
getObject(arg0).stencilStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
|
|
1359
|
+
},
|
|
1360
|
+
__wbg_set_stencil_write_mask_5e49d555c45a16fa: function(arg0, arg1) {
|
|
1361
|
+
getObject(arg0).stencilWriteMask = arg1 >>> 0;
|
|
1362
|
+
},
|
|
1363
|
+
__wbg_set_step_mode_80a80308a6783be4: function(arg0, arg1) {
|
|
1364
|
+
getObject(arg0).stepMode = __wbindgen_enum_GpuVertexStepMode[arg1];
|
|
1365
|
+
},
|
|
1018
1366
|
__wbg_set_storage_texture_dab6c69662cecb15: function(arg0, arg1) {
|
|
1019
1367
|
getObject(arg0).storageTexture = getObject(arg1);
|
|
1020
1368
|
},
|
|
1369
|
+
__wbg_set_store_op_2bf481ef4a30f927: function(arg0, arg1) {
|
|
1370
|
+
getObject(arg0).storeOp = __wbindgen_enum_GpuStoreOp[arg1];
|
|
1371
|
+
},
|
|
1372
|
+
__wbg_set_strip_index_format_ab81420028504e38: function(arg0, arg1) {
|
|
1373
|
+
getObject(arg0).stripIndexFormat = __wbindgen_enum_GpuIndexFormat[arg1];
|
|
1374
|
+
},
|
|
1375
|
+
__wbg_set_targets_f00488491d26619c: function(arg0, arg1) {
|
|
1376
|
+
getObject(arg0).targets = getObject(arg1);
|
|
1377
|
+
},
|
|
1021
1378
|
__wbg_set_texture_8732ea1b0f00cc28: function(arg0, arg1) {
|
|
1022
1379
|
getObject(arg0).texture = getObject(arg1);
|
|
1023
1380
|
},
|
|
1024
1381
|
__wbg_set_texture_e3dad6e696ee0d00: function(arg0, arg1) {
|
|
1025
1382
|
getObject(arg0).texture = getObject(arg1);
|
|
1026
1383
|
},
|
|
1384
|
+
__wbg_set_timestamp_writes_0e233b1252b29a60: function(arg0, arg1) {
|
|
1385
|
+
getObject(arg0).timestampWrites = getObject(arg1);
|
|
1386
|
+
},
|
|
1387
|
+
__wbg_set_topology_774e967bf9bd3600: function(arg0, arg1) {
|
|
1388
|
+
getObject(arg0).topology = __wbindgen_enum_GpuPrimitiveTopology[arg1];
|
|
1389
|
+
},
|
|
1027
1390
|
__wbg_set_type_23374c1c5d7ac64c: function(arg0, arg1) {
|
|
1028
1391
|
getObject(arg0).type = __wbindgen_enum_GpuQueryType[arg1];
|
|
1029
1392
|
},
|
|
@@ -1033,6 +1396,9 @@ function __wbg_get_imports() {
|
|
|
1033
1396
|
__wbg_set_type_fc5fb8ab00ac41ab: function(arg0, arg1) {
|
|
1034
1397
|
getObject(arg0).type = __wbindgen_enum_GpuBufferBindingType[arg1];
|
|
1035
1398
|
},
|
|
1399
|
+
__wbg_set_unclipped_depth_bbe4b97da619705e: function(arg0, arg1) {
|
|
1400
|
+
getObject(arg0).unclippedDepth = arg1 !== 0;
|
|
1401
|
+
},
|
|
1036
1402
|
__wbg_set_usage_215da50f99ff465b: function(arg0, arg1) {
|
|
1037
1403
|
getObject(arg0).usage = arg1 >>> 0;
|
|
1038
1404
|
},
|
|
@@ -1048,6 +1414,15 @@ function __wbg_get_imports() {
|
|
|
1048
1414
|
__wbg_set_value_4379db49464da2c7: function(arg0, arg1) {
|
|
1049
1415
|
getObject(arg0).value = arg1;
|
|
1050
1416
|
},
|
|
1417
|
+
__wbg_set_vertex_879729b1ef5390a2: function(arg0, arg1) {
|
|
1418
|
+
getObject(arg0).vertex = getObject(arg1);
|
|
1419
|
+
},
|
|
1420
|
+
__wbg_set_view_9850fe7aa8b4eae3: function(arg0, arg1) {
|
|
1421
|
+
getObject(arg0).view = getObject(arg1);
|
|
1422
|
+
},
|
|
1423
|
+
__wbg_set_view_b8a1c6698b913d81: function(arg0, arg1) {
|
|
1424
|
+
getObject(arg0).view = getObject(arg1);
|
|
1425
|
+
},
|
|
1051
1426
|
__wbg_set_view_dimension_5c6c0dc0d28476c3: function(arg0, arg1) {
|
|
1052
1427
|
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
1053
1428
|
},
|
|
@@ -1072,6 +1447,9 @@ function __wbg_get_imports() {
|
|
|
1072
1447
|
__wbg_set_width_c0fcaa2da53cd540: function(arg0, arg1) {
|
|
1073
1448
|
getObject(arg0).width = arg1 >>> 0;
|
|
1074
1449
|
},
|
|
1450
|
+
__wbg_set_write_mask_dceb6456d5310b39: function(arg0, arg1) {
|
|
1451
|
+
getObject(arg0).writeMask = arg1 >>> 0;
|
|
1452
|
+
},
|
|
1075
1453
|
__wbg_set_x_40188fe21190a1a8: function(arg0, arg1) {
|
|
1076
1454
|
getObject(arg0).x = arg1 >>> 0;
|
|
1077
1455
|
},
|
|
@@ -1085,6 +1463,13 @@ function __wbg_get_imports() {
|
|
|
1085
1463
|
const ret = getObject(arg0).shiftKey;
|
|
1086
1464
|
return ret;
|
|
1087
1465
|
},
|
|
1466
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
1467
|
+
const ret = getObject(arg1).stack;
|
|
1468
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1469
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1470
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1471
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1472
|
+
},
|
|
1088
1473
|
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
1089
1474
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1090
1475
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -1120,6 +1505,9 @@ function __wbg_get_imports() {
|
|
|
1120
1505
|
const ret = getObject(arg0).top;
|
|
1121
1506
|
return ret;
|
|
1122
1507
|
},
|
|
1508
|
+
__wbg_unmap_c2954ef341a2b85d: function(arg0) {
|
|
1509
|
+
getObject(arg0).unmap();
|
|
1510
|
+
},
|
|
1123
1511
|
__wbg_value_f3d531408c0c70aa: function(arg0) {
|
|
1124
1512
|
const ret = getObject(arg0).value;
|
|
1125
1513
|
return ret;
|
|
@@ -1140,22 +1528,22 @@ function __wbg_get_imports() {
|
|
|
1140
1528
|
}, arguments); },
|
|
1141
1529
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1142
1530
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [Externref], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1143
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1531
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2007, __wasm_bindgen_func_elem_4413);
|
|
1144
1532
|
return addHeapObject(ret);
|
|
1145
1533
|
},
|
|
1146
1534
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1147
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [Externref], shim_idx:
|
|
1148
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1535
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [Externref], shim_idx: 63, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1536
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2007, __wasm_bindgen_func_elem_2009);
|
|
1149
1537
|
return addHeapObject(ret);
|
|
1150
1538
|
},
|
|
1151
1539
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1152
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [F64], shim_idx:
|
|
1153
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1540
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [F64], shim_idx: 65, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1541
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2007, __wasm_bindgen_func_elem_2008);
|
|
1154
1542
|
return addHeapObject(ret);
|
|
1155
1543
|
},
|
|
1156
1544
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1157
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
1158
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1545
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [NamedExternref("Event")], shim_idx: 63, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1546
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2007, __wasm_bindgen_func_elem_2009_3);
|
|
1159
1547
|
return addHeapObject(ret);
|
|
1160
1548
|
},
|
|
1161
1549
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -1164,6 +1552,11 @@ function __wbg_get_imports() {
|
|
|
1164
1552
|
return addHeapObject(ret);
|
|
1165
1553
|
},
|
|
1166
1554
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1555
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1556
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1557
|
+
return addHeapObject(ret);
|
|
1558
|
+
},
|
|
1559
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1167
1560
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1168
1561
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1169
1562
|
return addHeapObject(ret);
|
|
@@ -1183,18 +1576,18 @@ function __wbg_get_imports() {
|
|
|
1183
1576
|
}
|
|
1184
1577
|
|
|
1185
1578
|
const lAudioContext = (typeof AudioContext !== 'undefined' ? AudioContext : (typeof webkitAudioContext !== 'undefined' ? webkitAudioContext : undefined));
|
|
1186
|
-
function
|
|
1187
|
-
wasm.
|
|
1579
|
+
function __wasm_bindgen_func_elem_2009(arg0, arg1, arg2) {
|
|
1580
|
+
wasm.__wasm_bindgen_func_elem_2009(arg0, arg1, addHeapObject(arg2));
|
|
1188
1581
|
}
|
|
1189
1582
|
|
|
1190
|
-
function
|
|
1191
|
-
wasm.
|
|
1583
|
+
function __wasm_bindgen_func_elem_2009_3(arg0, arg1, arg2) {
|
|
1584
|
+
wasm.__wasm_bindgen_func_elem_2009_3(arg0, arg1, addHeapObject(arg2));
|
|
1192
1585
|
}
|
|
1193
1586
|
|
|
1194
|
-
function
|
|
1587
|
+
function __wasm_bindgen_func_elem_4413(arg0, arg1, arg2) {
|
|
1195
1588
|
try {
|
|
1196
1589
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1197
|
-
wasm.
|
|
1590
|
+
wasm.__wasm_bindgen_func_elem_4413(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1198
1591
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1199
1592
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1200
1593
|
if (r1) {
|
|
@@ -1205,14 +1598,20 @@ function __wasm_bindgen_func_elem_3378(arg0, arg1, arg2) {
|
|
|
1205
1598
|
}
|
|
1206
1599
|
}
|
|
1207
1600
|
|
|
1208
|
-
function
|
|
1209
|
-
wasm.
|
|
1601
|
+
function __wasm_bindgen_func_elem_2008(arg0, arg1, arg2) {
|
|
1602
|
+
wasm.__wasm_bindgen_func_elem_2008(arg0, arg1, arg2);
|
|
1210
1603
|
}
|
|
1211
1604
|
|
|
1212
1605
|
|
|
1213
1606
|
const __wbindgen_enum_GpuAddressMode = ["clamp-to-edge", "repeat", "mirror-repeat"];
|
|
1214
1607
|
|
|
1215
1608
|
|
|
1609
|
+
const __wbindgen_enum_GpuBlendFactor = ["zero", "one", "src", "one-minus-src", "src-alpha", "one-minus-src-alpha", "dst", "one-minus-dst", "dst-alpha", "one-minus-dst-alpha", "src-alpha-saturated", "constant", "one-minus-constant", "src1", "one-minus-src1", "src1-alpha", "one-minus-src1-alpha"];
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
const __wbindgen_enum_GpuBlendOperation = ["add", "subtract", "reverse-subtract", "min", "max"];
|
|
1613
|
+
|
|
1614
|
+
|
|
1216
1615
|
const __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
|
|
1217
1616
|
|
|
1218
1617
|
|
|
@@ -1222,24 +1621,45 @@ const __wbindgen_enum_GpuCanvasAlphaMode = ["opaque", "premultiplied"];
|
|
|
1222
1621
|
const __wbindgen_enum_GpuCompareFunction = ["never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always"];
|
|
1223
1622
|
|
|
1224
1623
|
|
|
1624
|
+
const __wbindgen_enum_GpuCullMode = ["none", "front", "back"];
|
|
1625
|
+
|
|
1626
|
+
|
|
1225
1627
|
const __wbindgen_enum_GpuFilterMode = ["nearest", "linear"];
|
|
1226
1628
|
|
|
1227
1629
|
|
|
1630
|
+
const __wbindgen_enum_GpuFrontFace = ["ccw", "cw"];
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
const __wbindgen_enum_GpuLoadOp = ["load", "clear"];
|
|
1637
|
+
|
|
1638
|
+
|
|
1228
1639
|
const __wbindgen_enum_GpuMipmapFilterMode = ["nearest", "linear"];
|
|
1229
1640
|
|
|
1230
1641
|
|
|
1231
1642
|
const __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
|
|
1232
1643
|
|
|
1233
1644
|
|
|
1645
|
+
const __wbindgen_enum_GpuPrimitiveTopology = ["point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"];
|
|
1646
|
+
|
|
1647
|
+
|
|
1234
1648
|
const __wbindgen_enum_GpuQueryType = ["occlusion", "timestamp"];
|
|
1235
1649
|
|
|
1236
1650
|
|
|
1237
1651
|
const __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
|
|
1238
1652
|
|
|
1239
1653
|
|
|
1654
|
+
const __wbindgen_enum_GpuStencilOperation = ["keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap"];
|
|
1655
|
+
|
|
1656
|
+
|
|
1240
1657
|
const __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
|
|
1241
1658
|
|
|
1242
1659
|
|
|
1660
|
+
const __wbindgen_enum_GpuStoreOp = ["store", "discard"];
|
|
1661
|
+
|
|
1662
|
+
|
|
1243
1663
|
const __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
|
|
1244
1664
|
|
|
1245
1665
|
|
|
@@ -1253,6 +1673,12 @@ const __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "de
|
|
|
1253
1673
|
|
|
1254
1674
|
|
|
1255
1675
|
const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
const __wbindgen_enum_GpuVertexFormat = ["uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra"];
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
const __wbindgen_enum_GpuVertexStepMode = ["vertex", "instance"];
|
|
1256
1682
|
const BufferResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1257
1683
|
? { register: () => {}, unregister: () => {} }
|
|
1258
1684
|
: new FinalizationRegistry(ptr => wasm.__wbg_bufferresult_free(ptr >>> 0, 1));
|
|
@@ -1341,6 +1767,11 @@ function dropObject(idx) {
|
|
|
1341
1767
|
heap_next = idx;
|
|
1342
1768
|
}
|
|
1343
1769
|
|
|
1770
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
1771
|
+
ptr = ptr >>> 0;
|
|
1772
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1344
1775
|
function getArrayU8FromWasm0(ptr, len) {
|
|
1345
1776
|
ptr = ptr >>> 0;
|
|
1346
1777
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -1359,6 +1790,14 @@ function getStringFromWasm0(ptr, len) {
|
|
|
1359
1790
|
return decodeText(ptr, len);
|
|
1360
1791
|
}
|
|
1361
1792
|
|
|
1793
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1794
|
+
function getUint32ArrayMemory0() {
|
|
1795
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1796
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1797
|
+
}
|
|
1798
|
+
return cachedUint32ArrayMemory0;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1362
1801
|
let cachedUint8ArrayMemory0 = null;
|
|
1363
1802
|
function getUint8ArrayMemory0() {
|
|
1364
1803
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -1498,7 +1937,9 @@ function __wbg_finalize_init(instance, module) {
|
|
|
1498
1937
|
wasm = instance.exports;
|
|
1499
1938
|
wasmModule = module;
|
|
1500
1939
|
cachedDataViewMemory0 = null;
|
|
1940
|
+
cachedUint32ArrayMemory0 = null;
|
|
1501
1941
|
cachedUint8ArrayMemory0 = null;
|
|
1942
|
+
wasm.__wbindgen_start();
|
|
1502
1943
|
return wasm;
|
|
1503
1944
|
}
|
|
1504
1945
|
|
package/lib/vulfram_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -12,13 +12,15 @@ export const vulfram_receive_queue: () => number;
|
|
|
12
12
|
export const vulfram_send_queue: (a: number, b: number) => number;
|
|
13
13
|
export const vulfram_tick: (a: number, b: number) => number;
|
|
14
14
|
export const vulfram_upload_buffer: (a: bigint, b: number, c: number, d: number) => number;
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
15
|
+
export const wasm_start: () => void;
|
|
16
|
+
export const __wasm_bindgen_func_elem_2007: (a: number, b: number) => void;
|
|
17
|
+
export const __wasm_bindgen_func_elem_2008: (a: number, b: number, c: number) => void;
|
|
18
|
+
export const __wasm_bindgen_func_elem_4413: (a: number, b: number, c: number, d: number) => void;
|
|
19
|
+
export const __wasm_bindgen_func_elem_2009: (a: number, b: number, c: number) => void;
|
|
20
|
+
export const __wasm_bindgen_func_elem_2009_3: (a: number, b: number, c: number) => void;
|
|
20
21
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
21
22
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
22
23
|
export const __wbindgen_export3: (a: number) => void;
|
|
23
|
-
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
24
24
|
export const __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
25
|
+
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
26
|
+
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { EngineTransport, EngineTransportFactory } from '@vulfram/transport-types';
|
|
2
|
-
import {
|
|
3
|
-
VULFRAM_R2_DEFAULT_BASE_URL,
|
|
4
|
-
buildArtifactUrl,
|
|
5
|
-
parsePackageArtifactTarget,
|
|
6
|
-
} from '@vulfram/transport-types';
|
|
7
|
-
|
|
8
|
-
import pkg from '../package.json' with { type: 'json' };
|
|
2
|
+
import { detectRuntime } from '@vulfram/transport-types';
|
|
9
3
|
|
|
10
4
|
export type InitInput = unknown | Promise<unknown>;
|
|
11
5
|
|
|
@@ -31,38 +25,24 @@ type WasmBindings = {
|
|
|
31
25
|
) => number;
|
|
32
26
|
};
|
|
33
27
|
|
|
34
|
-
const packageVersion = (pkg as { version?: string }).version ?? '0.0.0';
|
|
35
|
-
const { channel, artifactVersion } = parsePackageArtifactTarget(packageVersion);
|
|
36
|
-
|
|
37
28
|
let initialized = false;
|
|
38
29
|
let bindings: WasmBindings | null = null;
|
|
39
30
|
|
|
40
|
-
function resolveBrowserArtifactUrl(artifact: string): string {
|
|
41
|
-
return buildArtifactUrl({
|
|
42
|
-
baseUrl: VULFRAM_R2_DEFAULT_BASE_URL,
|
|
43
|
-
channel,
|
|
44
|
-
artifactVersion,
|
|
45
|
-
binding: 'wasm',
|
|
46
|
-
platform: 'browser',
|
|
47
|
-
artifact,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
31
|
async function loadBindings(): Promise<WasmBindings> {
|
|
52
32
|
if (bindings) return bindings;
|
|
53
33
|
|
|
34
|
+
const localModulePath = '../lib/vulfram_core.js';
|
|
35
|
+
|
|
54
36
|
try {
|
|
55
|
-
const localModulePath = '../lib/vulfram_core.js';
|
|
56
37
|
bindings = (await import(
|
|
57
38
|
/* @vite-ignore */ localModulePath
|
|
58
39
|
)) as WasmBindings;
|
|
59
40
|
return bindings;
|
|
60
|
-
} catch {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
)
|
|
65
|
-
return bindings;
|
|
41
|
+
} catch (error) {
|
|
42
|
+
const runtime = detectRuntime();
|
|
43
|
+
throw new Error(
|
|
44
|
+
`Failed to load browser transport module (runtime=${runtime.runtime}, platform=${runtime.platform ?? 'unknown'}, arch=${runtime.arch ?? 'unknown'}, expected=${localModulePath}): ${String(error)}`,
|
|
45
|
+
);
|
|
66
46
|
}
|
|
67
47
|
}
|
|
68
48
|
|
|
@@ -93,12 +73,12 @@ export async function initBrowserTransport(
|
|
|
93
73
|
try {
|
|
94
74
|
await wasm.default(moduleOrPath);
|
|
95
75
|
} catch (error) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
76
|
+
const runtime = detectRuntime();
|
|
77
|
+
const expectedArtifact =
|
|
78
|
+
moduleOrPath === undefined ? '../lib/vulfram_core_bg.wasm' : 'custom-init-input';
|
|
79
|
+
throw new Error(
|
|
80
|
+
`Failed to initialize browser transport (runtime=${runtime.runtime}, platform=${runtime.platform ?? 'unknown'}, arch=${runtime.arch ?? 'unknown'}, expected=${expectedArtifact}): ${String(error)}`,
|
|
81
|
+
);
|
|
102
82
|
}
|
|
103
83
|
|
|
104
84
|
initialized = true;
|