lebai_sdk 0.2.16 → 0.2.17

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/lebai_sdk.d.ts CHANGED
@@ -88,9 +88,10 @@ export class Robot {
88
88
  /**
89
89
  * @param {string} name
90
90
  * @param {string | undefined} [dir]
91
+ * @param {boolean | undefined} [raw_pose]
91
92
  * @returns {Promise<any>}
92
93
  */
93
- load_pose(name: string, dir?: string): Promise<any>;
94
+ load_pose(name: string, dir?: string, raw_pose?: boolean): Promise<any>;
94
95
  /**
95
96
  * @param {string} name
96
97
  * @param {string | undefined} [dir]
package/lebai_sdk_bg.js CHANGED
@@ -24,6 +24,15 @@ function takeObject(idx) {
24
24
  return ret;
25
25
  }
26
26
 
27
+ function addHeapObject(obj) {
28
+ if (heap_next === heap.length) heap.push(heap.length + 1);
29
+ const idx = heap_next;
30
+ heap_next = heap[idx];
31
+
32
+ heap[idx] = obj;
33
+ return idx;
34
+ }
35
+
27
36
  let WASM_VECTOR_LEN = 0;
28
37
 
29
38
  let cachedUint8Memory0 = null;
@@ -104,15 +113,6 @@ function getInt32Memory0() {
104
113
  return cachedInt32Memory0;
105
114
  }
106
115
 
107
- function addHeapObject(obj) {
108
- if (heap_next === heap.length) heap.push(heap.length + 1);
109
- const idx = heap_next;
110
- heap_next = heap[idx];
111
-
112
- heap[idx] = obj;
113
- return idx;
114
- }
115
-
116
116
  const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
117
117
 
118
118
  let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
@@ -238,19 +238,19 @@ function makeMutClosure(arg0, arg1, dtor, f) {
238
238
  return real;
239
239
  }
240
240
  function __wbg_adapter_50(arg0, arg1, arg2) {
241
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6121ef333731fb26(arg0, arg1, addHeapObject(arg2));
241
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0acae28fae4ea96d(arg0, arg1, addHeapObject(arg2));
242
242
  }
243
243
 
244
- function __wbg_adapter_57(arg0, arg1) {
245
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he0c0364d6d20296d(arg0, arg1);
244
+ function __wbg_adapter_53(arg0, arg1) {
245
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h17d8ba5655610ca3(arg0, arg1);
246
246
  }
247
247
 
248
248
  function __wbg_adapter_60(arg0, arg1, arg2) {
249
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc486438ec3cc4a1(arg0, arg1, addHeapObject(arg2));
249
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h96d576336492a8f4(arg0, arg1, addHeapObject(arg2));
250
250
  }
251
251
 
252
252
  function __wbg_adapter_63(arg0, arg1) {
253
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3e2b5989697e424d(arg0, arg1);
253
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha776d7ed227c2188(arg0, arg1);
254
254
  }
255
255
 
256
256
  let cachedUint32Memory0 = null;
@@ -358,7 +358,7 @@ function getArrayU8FromWasm0(ptr, len) {
358
358
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
359
359
  }
360
360
  function __wbg_adapter_259(arg0, arg1, arg2, arg3) {
361
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7d0b3c93ffe76285(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
361
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h6e41000e25534132(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
362
362
  }
363
363
 
364
364
  const RobotFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -489,14 +489,15 @@ export class Robot {
489
489
  /**
490
490
  * @param {string} name
491
491
  * @param {string | undefined} [dir]
492
+ * @param {boolean | undefined} [raw_pose]
492
493
  * @returns {Promise<any>}
493
494
  */
494
- load_pose(name, dir) {
495
+ load_pose(name, dir, raw_pose) {
495
496
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
496
497
  const len0 = WASM_VECTOR_LEN;
497
498
  var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
498
499
  var len1 = WASM_VECTOR_LEN;
499
- const ret = wasm.robot_load_pose(this.__wbg_ptr, ptr0, len0, ptr1, len1);
500
+ const ret = wasm.robot_load_pose(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(raw_pose) ? 0xFFFFFF : raw_pose ? 1 : 0);
500
501
  return takeObject(ret);
501
502
  }
502
503
  /**
@@ -1388,6 +1389,11 @@ export function __wbindgen_object_drop_ref(arg0) {
1388
1389
  takeObject(arg0);
1389
1390
  };
1390
1391
 
1392
+ export function __wbindgen_number_new(arg0) {
1393
+ const ret = arg0;
1394
+ return addHeapObject(ret);
1395
+ };
1396
+
1391
1397
  export function __wbindgen_string_get(arg0, arg1) {
1392
1398
  const obj = getObject(arg1);
1393
1399
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1397,8 +1403,8 @@ export function __wbindgen_string_get(arg0, arg1) {
1397
1403
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1398
1404
  };
1399
1405
 
1400
- export function __wbindgen_number_new(arg0) {
1401
- const ret = arg0;
1406
+ export function __wbg_robot_new(arg0) {
1407
+ const ret = Robot.__wrap(arg0);
1402
1408
  return addHeapObject(ret);
1403
1409
  };
1404
1410
 
@@ -1412,16 +1418,6 @@ export function __wbg_robotsubscription_new(arg0) {
1412
1418
  return addHeapObject(ret);
1413
1419
  };
1414
1420
 
1415
- export function __wbg_robot_new(arg0) {
1416
- const ret = Robot.__wrap(arg0);
1417
- return addHeapObject(ret);
1418
- };
1419
-
1420
- export function __wbindgen_error_new(arg0, arg1) {
1421
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1422
- return addHeapObject(ret);
1423
- };
1424
-
1425
1421
  export function __wbindgen_number_get(arg0, arg1) {
1426
1422
  const obj = getObject(arg1);
1427
1423
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -1435,10 +1431,9 @@ export function __wbindgen_boolean_get(arg0) {
1435
1431
  return ret;
1436
1432
  };
1437
1433
 
1438
- export function __wbindgen_is_object(arg0) {
1439
- const val = getObject(arg0);
1440
- const ret = typeof(val) === 'object' && val !== null;
1441
- return ret;
1434
+ export function __wbindgen_error_new(arg0, arg1) {
1435
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1436
+ return addHeapObject(ret);
1442
1437
  };
1443
1438
 
1444
1439
  export function __wbindgen_cb_drop(arg0) {
@@ -1451,23 +1446,24 @@ export function __wbindgen_cb_drop(arg0) {
1451
1446
  return ret;
1452
1447
  };
1453
1448
 
1454
- export function __wbindgen_is_bigint(arg0) {
1455
- const ret = typeof(getObject(arg0)) === 'bigint';
1449
+ export function __wbindgen_as_number(arg0) {
1450
+ const ret = +getObject(arg0);
1456
1451
  return ret;
1457
1452
  };
1458
1453
 
1459
- export function __wbindgen_in(arg0, arg1) {
1460
- const ret = getObject(arg0) in getObject(arg1);
1461
- return ret;
1454
+ export function __wbindgen_object_clone_ref(arg0) {
1455
+ const ret = getObject(arg0);
1456
+ return addHeapObject(ret);
1462
1457
  };
1463
1458
 
1464
- export function __wbindgen_bigint_from_i64(arg0) {
1465
- const ret = arg0;
1466
- return addHeapObject(ret);
1459
+ export function __wbindgen_is_object(arg0) {
1460
+ const val = getObject(arg0);
1461
+ const ret = typeof(val) === 'object' && val !== null;
1462
+ return ret;
1467
1463
  };
1468
1464
 
1469
- export function __wbindgen_jsval_eq(arg0, arg1) {
1470
- const ret = getObject(arg0) === getObject(arg1);
1465
+ export function __wbindgen_is_bigint(arg0) {
1466
+ const ret = typeof(getObject(arg0)) === 'bigint';
1471
1467
  return ret;
1472
1468
  };
1473
1469
 
@@ -1476,21 +1472,26 @@ export function __wbindgen_bigint_from_u64(arg0) {
1476
1472
  return addHeapObject(ret);
1477
1473
  };
1478
1474
 
1479
- export function __wbindgen_is_undefined(arg0) {
1480
- const ret = getObject(arg0) === undefined;
1475
+ export function __wbindgen_jsval_eq(arg0, arg1) {
1476
+ const ret = getObject(arg0) === getObject(arg1);
1481
1477
  return ret;
1482
1478
  };
1483
1479
 
1484
- export function __wbindgen_as_number(arg0) {
1485
- const ret = +getObject(arg0);
1480
+ export function __wbindgen_in(arg0, arg1) {
1481
+ const ret = getObject(arg0) in getObject(arg1);
1486
1482
  return ret;
1487
1483
  };
1488
1484
 
1489
- export function __wbindgen_object_clone_ref(arg0) {
1490
- const ret = getObject(arg0);
1485
+ export function __wbindgen_bigint_from_i64(arg0) {
1486
+ const ret = arg0;
1491
1487
  return addHeapObject(ret);
1492
1488
  };
1493
1489
 
1490
+ export function __wbindgen_is_undefined(arg0) {
1491
+ const ret = getObject(arg0) === undefined;
1492
+ return ret;
1493
+ };
1494
+
1494
1495
  export function __wbindgen_is_string(arg0) {
1495
1496
  const ret = typeof(getObject(arg0)) === 'string';
1496
1497
  return ret;
@@ -1567,10 +1568,6 @@ export function __wbg_send_8e8f1c88be375fc1() { return handleError(function (arg
1567
1568
  getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
1568
1569
  }, arguments) };
1569
1570
 
1570
- export function __wbg_queueMicrotask_f61ee94ee663068b(arg0) {
1571
- queueMicrotask(getObject(arg0));
1572
- };
1573
-
1574
1571
  export function __wbg_queueMicrotask_f82fc5d1e8f816ae(arg0) {
1575
1572
  const ret = getObject(arg0).queueMicrotask;
1576
1573
  return addHeapObject(ret);
@@ -1581,6 +1578,10 @@ export function __wbindgen_is_function(arg0) {
1581
1578
  return ret;
1582
1579
  };
1583
1580
 
1581
+ export function __wbg_queueMicrotask_f61ee94ee663068b(arg0) {
1582
+ queueMicrotask(getObject(arg0));
1583
+ };
1584
+
1584
1585
  export function __wbg_clearTimeout_76877dbc010e786d(arg0) {
1585
1586
  const ret = clearTimeout(takeObject(arg0));
1586
1587
  return addHeapObject(ret);
@@ -1845,33 +1846,33 @@ export function __wbindgen_memory() {
1845
1846
  return addHeapObject(ret);
1846
1847
  };
1847
1848
 
1848
- export function __wbindgen_closure_wrapper1910(arg0, arg1, arg2) {
1849
- const ret = makeMutClosure(arg0, arg1, 789, __wbg_adapter_50);
1849
+ export function __wbindgen_closure_wrapper1869(arg0, arg1, arg2) {
1850
+ const ret = makeMutClosure(arg0, arg1, 764, __wbg_adapter_50);
1850
1851
  return addHeapObject(ret);
1851
1852
  };
1852
1853
 
1853
- export function __wbindgen_closure_wrapper1912(arg0, arg1, arg2) {
1854
- const ret = makeMutClosure(arg0, arg1, 789, __wbg_adapter_50);
1854
+ export function __wbindgen_closure_wrapper1871(arg0, arg1, arg2) {
1855
+ const ret = makeMutClosure(arg0, arg1, 764, __wbg_adapter_53);
1855
1856
  return addHeapObject(ret);
1856
1857
  };
1857
1858
 
1858
- export function __wbindgen_closure_wrapper1914(arg0, arg1, arg2) {
1859
- const ret = makeMutClosure(arg0, arg1, 789, __wbg_adapter_50);
1859
+ export function __wbindgen_closure_wrapper1873(arg0, arg1, arg2) {
1860
+ const ret = makeMutClosure(arg0, arg1, 764, __wbg_adapter_50);
1860
1861
  return addHeapObject(ret);
1861
1862
  };
1862
1863
 
1863
- export function __wbindgen_closure_wrapper1916(arg0, arg1, arg2) {
1864
- const ret = makeMutClosure(arg0, arg1, 789, __wbg_adapter_57);
1864
+ export function __wbindgen_closure_wrapper1875(arg0, arg1, arg2) {
1865
+ const ret = makeMutClosure(arg0, arg1, 764, __wbg_adapter_50);
1865
1866
  return addHeapObject(ret);
1866
1867
  };
1867
1868
 
1868
- export function __wbindgen_closure_wrapper2595(arg0, arg1, arg2) {
1869
- const ret = makeMutClosure(arg0, arg1, 886, __wbg_adapter_60);
1869
+ export function __wbindgen_closure_wrapper2525(arg0, arg1, arg2) {
1870
+ const ret = makeMutClosure(arg0, arg1, 840, __wbg_adapter_60);
1870
1871
  return addHeapObject(ret);
1871
1872
  };
1872
1873
 
1873
- export function __wbindgen_closure_wrapper2626(arg0, arg1, arg2) {
1874
- const ret = makeMutClosure(arg0, arg1, 899, __wbg_adapter_63);
1874
+ export function __wbindgen_closure_wrapper2566(arg0, arg1, arg2) {
1875
+ const ret = makeMutClosure(arg0, arg1, 855, __wbg_adapter_63);
1875
1876
  return addHeapObject(ret);
1876
1877
  };
1877
1878
 
package/lebai_sdk_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "lebai_sdk",
3
+ "type": "module",
3
4
  "collaborators": [
4
5
  "rise0chen<rise0chen@163.com>"
5
6
  ],
6
7
  "description": "lebai_sdk",
7
- "version": "0.2.16",
8
+ "version": "0.2.17",
8
9
  "license": "SEE LICENSE IN LICENSE",
9
10
  "repository": {
10
11
  "type": "git",
@@ -16,7 +17,7 @@
16
17
  "lebai_sdk_bg.js",
17
18
  "lebai_sdk.d.ts"
18
19
  ],
19
- "module": "lebai_sdk.js",
20
+ "main": "lebai_sdk.js",
20
21
  "types": "lebai_sdk.d.ts",
21
22
  "sideEffects": [
22
23
  "./lebai_sdk.js",