lebai_sdk 0.2.6 → 0.2.8

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
@@ -71,6 +71,13 @@ export class Robot {
71
71
  pose_inverse(p: any): Promise<any>;
72
72
  /**
73
73
  * @param {string} name
74
+ * @param {any} pose
75
+ * @param {string | undefined} [dir]
76
+ * @returns {Promise<void>}
77
+ */
78
+ save_pose(name: string, pose: any, dir?: string): Promise<void>;
79
+ /**
80
+ * @param {string} name
74
81
  * @param {string | undefined} [dir]
75
82
  * @returns {Promise<any>}
76
83
  */
package/lebai_sdk_bg.js CHANGED
@@ -24,20 +24,7 @@ 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
-
36
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
37
-
38
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
39
-
40
- cachedTextDecoder.decode();
27
+ let WASM_VECTOR_LEN = 0;
41
28
 
42
29
  let cachedUint8Memory0 = null;
43
30
 
@@ -48,13 +35,6 @@ function getUint8Memory0() {
48
35
  return cachedUint8Memory0;
49
36
  }
50
37
 
51
- function getStringFromWasm0(ptr, len) {
52
- ptr = ptr >>> 0;
53
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
54
- }
55
-
56
- let WASM_VECTOR_LEN = 0;
57
-
58
38
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
59
39
 
60
40
  let cachedTextEncoder = new lTextEncoder('utf-8');
@@ -123,6 +103,26 @@ function getInt32Memory0() {
123
103
  return cachedInt32Memory0;
124
104
  }
125
105
 
106
+ function addHeapObject(obj) {
107
+ if (heap_next === heap.length) heap.push(heap.length + 1);
108
+ const idx = heap_next;
109
+ heap_next = heap[idx];
110
+
111
+ heap[idx] = obj;
112
+ return idx;
113
+ }
114
+
115
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
116
+
117
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
118
+
119
+ cachedTextDecoder.decode();
120
+
121
+ function getStringFromWasm0(ptr, len) {
122
+ ptr = ptr >>> 0;
123
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
124
+ }
125
+
126
126
  let cachedFloat64Memory0 = null;
127
127
 
128
128
  function getFloat64Memory0() {
@@ -350,7 +350,7 @@ function getArrayU8FromWasm0(ptr, len) {
350
350
  ptr = ptr >>> 0;
351
351
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
352
352
  }
353
- function __wbg_adapter_252(arg0, arg1, arg2, arg3) {
353
+ function __wbg_adapter_253(arg0, arg1, arg2, arg3) {
354
354
  wasm.wasm_bindgen__convert__closures__invoke2_mut__hec2b27bf71d5ba83(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
355
355
  }
356
356
 
@@ -449,6 +449,20 @@ export class Robot {
449
449
  }
450
450
  /**
451
451
  * @param {string} name
452
+ * @param {any} pose
453
+ * @param {string | undefined} [dir]
454
+ * @returns {Promise<void>}
455
+ */
456
+ save_pose(name, pose, dir) {
457
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
+ const len0 = WASM_VECTOR_LEN;
459
+ var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
460
+ var len1 = WASM_VECTOR_LEN;
461
+ const ret = wasm.robot_save_pose(this.__wbg_ptr, ptr0, len0, addHeapObject(pose), ptr1, len1);
462
+ return takeObject(ret);
463
+ }
464
+ /**
465
+ * @param {string} name
452
466
  * @param {string | undefined} [dir]
453
467
  * @returns {Promise<any>}
454
468
  */
@@ -1329,16 +1343,6 @@ export function __wbindgen_object_drop_ref(arg0) {
1329
1343
  takeObject(arg0);
1330
1344
  };
1331
1345
 
1332
- export function __wbindgen_number_new(arg0) {
1333
- const ret = arg0;
1334
- return addHeapObject(ret);
1335
- };
1336
-
1337
- export function __wbindgen_string_new(arg0, arg1) {
1338
- const ret = getStringFromWasm0(arg0, arg1);
1339
- return addHeapObject(ret);
1340
- };
1341
-
1342
1346
  export function __wbindgen_string_get(arg0, arg1) {
1343
1347
  const obj = getObject(arg1);
1344
1348
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1348,8 +1352,8 @@ export function __wbindgen_string_get(arg0, arg1) {
1348
1352
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1349
1353
  };
1350
1354
 
1351
- export function __wbg_robot_new(arg0) {
1352
- const ret = Robot.__wrap(arg0);
1355
+ export function __wbindgen_number_new(arg0) {
1356
+ const ret = arg0;
1353
1357
  return addHeapObject(ret);
1354
1358
  };
1355
1359
 
@@ -1358,32 +1362,19 @@ export function __wbg_robotsubscription_new(arg0) {
1358
1362
  return addHeapObject(ret);
1359
1363
  };
1360
1364
 
1361
- export function __wbindgen_cb_drop(arg0) {
1362
- const obj = takeObject(arg0).original;
1363
- if (obj.cnt-- == 1) {
1364
- obj.a = 0;
1365
- return true;
1366
- }
1367
- const ret = false;
1368
- return ret;
1369
- };
1370
-
1371
- export function __wbindgen_error_new(arg0, arg1) {
1372
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1365
+ export function __wbindgen_string_new(arg0, arg1) {
1366
+ const ret = getStringFromWasm0(arg0, arg1);
1373
1367
  return addHeapObject(ret);
1374
1368
  };
1375
1369
 
1376
- export function __wbindgen_boolean_get(arg0) {
1377
- const v = getObject(arg0);
1378
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1379
- return ret;
1370
+ export function __wbg_robot_new(arg0) {
1371
+ const ret = Robot.__wrap(arg0);
1372
+ return addHeapObject(ret);
1380
1373
  };
1381
1374
 
1382
- export function __wbindgen_number_get(arg0, arg1) {
1383
- const obj = getObject(arg1);
1384
- const ret = typeof(obj) === 'number' ? obj : undefined;
1385
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
1386
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1375
+ export function __wbindgen_error_new(arg0, arg1) {
1376
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1377
+ return addHeapObject(ret);
1387
1378
  };
1388
1379
 
1389
1380
  export function __wbindgen_is_object(arg0) {
@@ -1392,16 +1383,6 @@ export function __wbindgen_is_object(arg0) {
1392
1383
  return ret;
1393
1384
  };
1394
1385
 
1395
- export function __wbindgen_as_number(arg0) {
1396
- const ret = +getObject(arg0);
1397
- return ret;
1398
- };
1399
-
1400
- export function __wbindgen_object_clone_ref(arg0) {
1401
- const ret = getObject(arg0);
1402
- return addHeapObject(ret);
1403
- };
1404
-
1405
1386
  export function __wbindgen_is_undefined(arg0) {
1406
1387
  const ret = getObject(arg0) === undefined;
1407
1388
  return ret;
@@ -1412,6 +1393,19 @@ export function __wbindgen_in(arg0, arg1) {
1412
1393
  return ret;
1413
1394
  };
1414
1395
 
1396
+ export function __wbindgen_number_get(arg0, arg1) {
1397
+ const obj = getObject(arg1);
1398
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1399
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
1400
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1401
+ };
1402
+
1403
+ export function __wbindgen_boolean_get(arg0) {
1404
+ const v = getObject(arg0);
1405
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1406
+ return ret;
1407
+ };
1408
+
1415
1409
  export function __wbindgen_is_bigint(arg0) {
1416
1410
  const ret = typeof(getObject(arg0)) === 'bigint';
1417
1411
  return ret;
@@ -1432,6 +1426,26 @@ export function __wbindgen_bigint_from_u64(arg0) {
1432
1426
  return addHeapObject(ret);
1433
1427
  };
1434
1428
 
1429
+ export function __wbindgen_cb_drop(arg0) {
1430
+ const obj = takeObject(arg0).original;
1431
+ if (obj.cnt-- == 1) {
1432
+ obj.a = 0;
1433
+ return true;
1434
+ }
1435
+ const ret = false;
1436
+ return ret;
1437
+ };
1438
+
1439
+ export function __wbindgen_as_number(arg0) {
1440
+ const ret = +getObject(arg0);
1441
+ return ret;
1442
+ };
1443
+
1444
+ export function __wbindgen_object_clone_ref(arg0) {
1445
+ const ret = getObject(arg0);
1446
+ return addHeapObject(ret);
1447
+ };
1448
+
1435
1449
  export function __wbindgen_is_string(arg0) {
1436
1450
  const ret = typeof(getObject(arg0)) === 'string';
1437
1451
  return ret;
@@ -1694,7 +1708,7 @@ export function __wbg_new_60f57089c7563e81(arg0, arg1) {
1694
1708
  const a = state0.a;
1695
1709
  state0.a = 0;
1696
1710
  try {
1697
- return __wbg_adapter_252(a, state0.b, arg0, arg1);
1711
+ return __wbg_adapter_253(a, state0.b, arg0, arg1);
1698
1712
  } finally {
1699
1713
  state0.a = a;
1700
1714
  }
@@ -1775,33 +1789,33 @@ export function __wbindgen_memory() {
1775
1789
  return addHeapObject(ret);
1776
1790
  };
1777
1791
 
1778
- export function __wbindgen_closure_wrapper1761(arg0, arg1, arg2) {
1779
- const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_50);
1792
+ export function __wbindgen_closure_wrapper1781(arg0, arg1, arg2) {
1793
+ const ret = makeMutClosure(arg0, arg1, 750, __wbg_adapter_50);
1780
1794
  return addHeapObject(ret);
1781
1795
  };
1782
1796
 
1783
- export function __wbindgen_closure_wrapper1763(arg0, arg1, arg2) {
1784
- const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_53);
1797
+ export function __wbindgen_closure_wrapper1783(arg0, arg1, arg2) {
1798
+ const ret = makeMutClosure(arg0, arg1, 750, __wbg_adapter_53);
1785
1799
  return addHeapObject(ret);
1786
1800
  };
1787
1801
 
1788
- export function __wbindgen_closure_wrapper1765(arg0, arg1, arg2) {
1789
- const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_53);
1802
+ export function __wbindgen_closure_wrapper1785(arg0, arg1, arg2) {
1803
+ const ret = makeMutClosure(arg0, arg1, 750, __wbg_adapter_53);
1790
1804
  return addHeapObject(ret);
1791
1805
  };
1792
1806
 
1793
- export function __wbindgen_closure_wrapper1767(arg0, arg1, arg2) {
1794
- const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_53);
1807
+ export function __wbindgen_closure_wrapper1787(arg0, arg1, arg2) {
1808
+ const ret = makeMutClosure(arg0, arg1, 750, __wbg_adapter_53);
1795
1809
  return addHeapObject(ret);
1796
1810
  };
1797
1811
 
1798
- export function __wbindgen_closure_wrapper2426(arg0, arg1, arg2) {
1799
- const ret = makeMutClosure(arg0, arg1, 854, __wbg_adapter_60);
1812
+ export function __wbindgen_closure_wrapper2446(arg0, arg1, arg2) {
1813
+ const ret = makeMutClosure(arg0, arg1, 860, __wbg_adapter_60);
1800
1814
  return addHeapObject(ret);
1801
1815
  };
1802
1816
 
1803
- export function __wbindgen_closure_wrapper2466(arg0, arg1, arg2) {
1804
- const ret = makeMutClosure(arg0, arg1, 871, __wbg_adapter_63);
1817
+ export function __wbindgen_closure_wrapper2486(arg0, arg1, arg2) {
1818
+ const ret = makeMutClosure(arg0, arg1, 877, __wbg_adapter_63);
1805
1819
  return addHeapObject(ret);
1806
1820
  };
1807
1821
 
package/lebai_sdk_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "rise0chen<rise0chen@163.com>"
5
5
  ],
6
6
  "description": "lebai_sdk",
7
- "version": "0.2.6",
7
+ "version": "0.2.8",
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "repository": {
10
10
  "type": "git",