@francisdb/vpin-wasm 0.27.0 → 0.28.1

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/vpin.js +29 -25
  3. package/vpin_bg.wasm +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@francisdb/vpin-wasm",
3
- "version": "0.27.0",
3
+ "version": "0.28.1",
4
4
  "description": "WASM bindings for vpin, a rust library for the visual/virtual pinball ecosystem.",
5
5
  "homepage": "https://github.com/francisdb/vpin",
6
6
  "bugs": {
package/vpin.js CHANGED
@@ -247,18 +247,18 @@ export function obj_to_mesh(data, convert_to_left_handed) {
247
247
  function __wbg_get_imports() {
248
248
  const import0 = {
249
249
  __proto__: null,
250
- __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
250
+ __wbg_Error_408e67f47ca7b58b: function(arg0, arg1) {
251
251
  const ret = Error(getStringFromWasm0(arg0, arg1));
252
252
  return ret;
253
253
  },
254
- __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
254
+ __wbg___wbindgen_debug_string_a57024b9c6e4a48b: function(arg0, arg1) {
255
255
  const ret = debugString(arg1);
256
256
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
257
  const len1 = WASM_VECTOR_LEN;
258
258
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
259
259
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
260
260
  },
261
- __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
261
+ __wbg___wbindgen_string_get_d154f1e671052120: function(arg0, arg1) {
262
262
  const obj = arg1;
263
263
  const ret = typeof(obj) === 'string' ? obj : undefined;
264
264
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -266,14 +266,14 @@ function __wbg_get_imports() {
266
266
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
267
267
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
268
268
  },
269
- __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
269
+ __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
270
270
  throw new Error(getStringFromWasm0(arg0, arg1));
271
271
  },
272
- __wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
272
+ __wbg_call_35dba3c747ad7521: function() { return handleError(function (arg0, arg1, arg2) {
273
273
  const ret = arg0.call(arg1, arg2);
274
274
  return ret;
275
275
  }, arguments); },
276
- __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
276
+ __wbg_error_757e9472f8410341: function(arg0, arg1) {
277
277
  let deferred0_0;
278
278
  let deferred0_1;
279
279
  try {
@@ -284,23 +284,23 @@ function __wbg_get_imports() {
284
284
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
285
285
  }
286
286
  },
287
- __wbg_get_507a50627bffa49b: function(arg0, arg1) {
288
- const ret = arg0[arg1 >>> 0];
289
- return ret;
290
- },
291
- __wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
287
+ __wbg_get_971a0c45d172643f: function() { return handleError(function (arg0, arg1) {
292
288
  const ret = Reflect.get(arg0, arg1);
293
289
  return ret;
294
290
  }, arguments); },
295
- __wbg_keys_58421f8f96795607: function(arg0) {
291
+ __wbg_get_c0c8f8d7da0c03dd: function(arg0, arg1) {
292
+ const ret = arg0[arg1 >>> 0];
293
+ return ret;
294
+ },
295
+ __wbg_keys_ec7f8c0c2370d91d: function(arg0) {
296
296
  const ret = Object.keys(arg0);
297
297
  return ret;
298
298
  },
299
- __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
299
+ __wbg_length_36bd29c6848c2144: function(arg0) {
300
300
  const ret = arg0.length;
301
301
  return ret;
302
302
  },
303
- __wbg_length_370319915dc99107: function(arg0) {
303
+ __wbg_length_ecfa2c63d3d0d82c: function(arg0) {
304
304
  const ret = arg0.length;
305
305
  return ret;
306
306
  },
@@ -308,30 +308,30 @@ function __wbg_get_imports() {
308
308
  const ret = new Error();
309
309
  return ret;
310
310
  },
311
- __wbg_new_da52cf8fe3429cb2: function() {
311
+ __wbg_new_ebe3e0f6837f0879: function() {
312
312
  const ret = new Object();
313
313
  return ret;
314
314
  },
315
- __wbg_new_from_slice_7568ba55b4a7e81f: function(arg0, arg1) {
316
- const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
317
- return ret;
318
- },
319
- __wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
315
+ __wbg_new_from_slice_3eea173078478cfe: function(arg0, arg1) {
320
316
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
321
317
  return ret;
322
318
  },
323
- __wbg_new_from_slice_ddf8b82c4d6af38e: function(arg0, arg1) {
319
+ __wbg_new_from_slice_709ab7061ebcc5da: function(arg0, arg1) {
324
320
  const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
325
321
  return ret;
326
322
  },
327
- __wbg_now_86c0d4ba3fa605b8: function() {
323
+ __wbg_new_from_slice_8aed4f0384605526: function(arg0, arg1) {
324
+ const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
325
+ return ret;
326
+ },
327
+ __wbg_now_8b265300afd5f2b9: function() {
328
328
  const ret = Date.now();
329
329
  return ret;
330
330
  },
331
- __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
331
+ __wbg_prototypesetcall_de8e0d9553586985: function(arg0, arg1, arg2) {
332
332
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
333
333
  },
334
- __wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
334
+ __wbg_set_8155bb79a948541b: function() { return handleError(function (arg0, arg1, arg2) {
335
335
  const ret = Reflect.set(arg0, arg1, arg2);
336
336
  return ret;
337
337
  }, arguments); },
@@ -610,11 +610,15 @@ function __wbg_finalize_init(instance, module) {
610
610
 
611
611
  async function __wbg_load(module, imports) {
612
612
  if (typeof Response === 'function' && module instanceof Response) {
613
+ if (!module.ok) {
614
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
615
+ }
616
+
613
617
  if (typeof WebAssembly.instantiateStreaming === 'function') {
614
618
  try {
615
619
  return await WebAssembly.instantiateStreaming(module, imports);
616
620
  } catch (e) {
617
- const validResponse = module.ok && expectedResponseType(module.type);
621
+ const validResponse = expectedResponseType(module.type);
618
622
 
619
623
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
620
624
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
package/vpin_bg.wasm CHANGED
Binary file