lebai_sdk 0.2.5 → 0.2.6
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 +6 -0
- package/lebai_sdk_bg.js +65 -52
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +1 -1
package/lebai_sdk.d.ts
CHANGED
@@ -161,6 +161,12 @@ export class Robot {
|
|
161
161
|
*/
|
162
162
|
move_pvat(p: any, v: any, a: any, t: number): Promise<void>;
|
163
163
|
/**
|
164
|
+
* @param {string} name
|
165
|
+
* @param {string | undefined} [dir]
|
166
|
+
* @returns {Promise<number>}
|
167
|
+
*/
|
168
|
+
move_trajectory(name: string, dir?: string): Promise<number>;
|
169
|
+
/**
|
164
170
|
* @param {number} a
|
165
171
|
* @param {any} v
|
166
172
|
* @param {number | undefined} [t]
|
package/lebai_sdk_bg.js
CHANGED
@@ -8,19 +8,10 @@ const heap = new Array(128).fill(undefined);
|
|
8
8
|
|
9
9
|
heap.push(undefined, null, true, false);
|
10
10
|
|
11
|
-
let heap_next = heap.length;
|
12
|
-
|
13
|
-
function addHeapObject(obj) {
|
14
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
15
|
-
const idx = heap_next;
|
16
|
-
heap_next = heap[idx];
|
17
|
-
|
18
|
-
heap[idx] = obj;
|
19
|
-
return idx;
|
20
|
-
}
|
21
|
-
|
22
11
|
function getObject(idx) { return heap[idx]; }
|
23
12
|
|
13
|
+
let heap_next = heap.length;
|
14
|
+
|
24
15
|
function dropObject(idx) {
|
25
16
|
if (idx < 132) return;
|
26
17
|
heap[idx] = heap_next;
|
@@ -33,7 +24,20 @@ function takeObject(idx) {
|
|
33
24
|
return ret;
|
34
25
|
}
|
35
26
|
|
36
|
-
|
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();
|
37
41
|
|
38
42
|
let cachedUint8Memory0 = null;
|
39
43
|
|
@@ -44,6 +48,13 @@ function getUint8Memory0() {
|
|
44
48
|
return cachedUint8Memory0;
|
45
49
|
}
|
46
50
|
|
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
|
+
|
47
58
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
48
59
|
|
49
60
|
let cachedTextEncoder = new lTextEncoder('utf-8');
|
@@ -112,17 +123,6 @@ function getInt32Memory0() {
|
|
112
123
|
return cachedInt32Memory0;
|
113
124
|
}
|
114
125
|
|
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
|
353
|
+
function __wbg_adapter_252(arg0, arg1, arg2, arg3) {
|
354
354
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__hec2b27bf71d5ba83(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
355
355
|
}
|
356
356
|
|
@@ -589,6 +589,19 @@ export class Robot {
|
|
589
589
|
return takeObject(ret);
|
590
590
|
}
|
591
591
|
/**
|
592
|
+
* @param {string} name
|
593
|
+
* @param {string | undefined} [dir]
|
594
|
+
* @returns {Promise<number>}
|
595
|
+
*/
|
596
|
+
move_trajectory(name, dir) {
|
597
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
598
|
+
const len0 = WASM_VECTOR_LEN;
|
599
|
+
var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
600
|
+
var len1 = WASM_VECTOR_LEN;
|
601
|
+
const ret = wasm.robot_move_trajectory(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
602
|
+
return takeObject(ret);
|
603
|
+
}
|
604
|
+
/**
|
592
605
|
* @param {number} a
|
593
606
|
* @param {any} v
|
594
607
|
* @param {number | undefined} [t]
|
@@ -1312,13 +1325,18 @@ export class RobotSubscription {
|
|
1312
1325
|
}
|
1313
1326
|
}
|
1314
1327
|
|
1328
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
1329
|
+
takeObject(arg0);
|
1330
|
+
};
|
1331
|
+
|
1315
1332
|
export function __wbindgen_number_new(arg0) {
|
1316
1333
|
const ret = arg0;
|
1317
1334
|
return addHeapObject(ret);
|
1318
1335
|
};
|
1319
1336
|
|
1320
|
-
export function
|
1321
|
-
|
1337
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
1338
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
1339
|
+
return addHeapObject(ret);
|
1322
1340
|
};
|
1323
1341
|
|
1324
1342
|
export function __wbindgen_string_get(arg0, arg1) {
|
@@ -1330,8 +1348,8 @@ export function __wbindgen_string_get(arg0, arg1) {
|
|
1330
1348
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
1331
1349
|
};
|
1332
1350
|
|
1333
|
-
export function
|
1334
|
-
const ret =
|
1351
|
+
export function __wbg_robot_new(arg0) {
|
1352
|
+
const ret = Robot.__wrap(arg0);
|
1335
1353
|
return addHeapObject(ret);
|
1336
1354
|
};
|
1337
1355
|
|
@@ -1340,17 +1358,6 @@ export function __wbg_robotsubscription_new(arg0) {
|
|
1340
1358
|
return addHeapObject(ret);
|
1341
1359
|
};
|
1342
1360
|
|
1343
|
-
export function __wbg_robot_new(arg0) {
|
1344
|
-
const ret = Robot.__wrap(arg0);
|
1345
|
-
return addHeapObject(ret);
|
1346
|
-
};
|
1347
|
-
|
1348
|
-
export function __wbindgen_is_object(arg0) {
|
1349
|
-
const val = getObject(arg0);
|
1350
|
-
const ret = typeof(val) === 'object' && val !== null;
|
1351
|
-
return ret;
|
1352
|
-
};
|
1353
|
-
|
1354
1361
|
export function __wbindgen_cb_drop(arg0) {
|
1355
1362
|
const obj = takeObject(arg0).original;
|
1356
1363
|
if (obj.cnt-- == 1) {
|
@@ -1379,6 +1386,12 @@ export function __wbindgen_number_get(arg0, arg1) {
|
|
1379
1386
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1380
1387
|
};
|
1381
1388
|
|
1389
|
+
export function __wbindgen_is_object(arg0) {
|
1390
|
+
const val = getObject(arg0);
|
1391
|
+
const ret = typeof(val) === 'object' && val !== null;
|
1392
|
+
return ret;
|
1393
|
+
};
|
1394
|
+
|
1382
1395
|
export function __wbindgen_as_number(arg0) {
|
1383
1396
|
const ret = +getObject(arg0);
|
1384
1397
|
return ret;
|
@@ -1681,7 +1694,7 @@ export function __wbg_new_60f57089c7563e81(arg0, arg1) {
|
|
1681
1694
|
const a = state0.a;
|
1682
1695
|
state0.a = 0;
|
1683
1696
|
try {
|
1684
|
-
return
|
1697
|
+
return __wbg_adapter_252(a, state0.b, arg0, arg1);
|
1685
1698
|
} finally {
|
1686
1699
|
state0.a = a;
|
1687
1700
|
}
|
@@ -1762,33 +1775,33 @@ export function __wbindgen_memory() {
|
|
1762
1775
|
return addHeapObject(ret);
|
1763
1776
|
};
|
1764
1777
|
|
1765
|
-
export function
|
1766
|
-
const ret = makeMutClosure(arg0, arg1,
|
1778
|
+
export function __wbindgen_closure_wrapper1761(arg0, arg1, arg2) {
|
1779
|
+
const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_50);
|
1767
1780
|
return addHeapObject(ret);
|
1768
1781
|
};
|
1769
1782
|
|
1770
|
-
export function
|
1771
|
-
const ret = makeMutClosure(arg0, arg1,
|
1783
|
+
export function __wbindgen_closure_wrapper1763(arg0, arg1, arg2) {
|
1784
|
+
const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_53);
|
1772
1785
|
return addHeapObject(ret);
|
1773
1786
|
};
|
1774
1787
|
|
1775
|
-
export function
|
1776
|
-
const ret = makeMutClosure(arg0, arg1,
|
1788
|
+
export function __wbindgen_closure_wrapper1765(arg0, arg1, arg2) {
|
1789
|
+
const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_53);
|
1777
1790
|
return addHeapObject(ret);
|
1778
1791
|
};
|
1779
1792
|
|
1780
|
-
export function
|
1781
|
-
const ret = makeMutClosure(arg0, arg1,
|
1793
|
+
export function __wbindgen_closure_wrapper1767(arg0, arg1, arg2) {
|
1794
|
+
const ret = makeMutClosure(arg0, arg1, 744, __wbg_adapter_53);
|
1782
1795
|
return addHeapObject(ret);
|
1783
1796
|
};
|
1784
1797
|
|
1785
|
-
export function
|
1786
|
-
const ret = makeMutClosure(arg0, arg1,
|
1798
|
+
export function __wbindgen_closure_wrapper2426(arg0, arg1, arg2) {
|
1799
|
+
const ret = makeMutClosure(arg0, arg1, 854, __wbg_adapter_60);
|
1787
1800
|
return addHeapObject(ret);
|
1788
1801
|
};
|
1789
1802
|
|
1790
|
-
export function
|
1791
|
-
const ret = makeMutClosure(arg0, arg1,
|
1803
|
+
export function __wbindgen_closure_wrapper2466(arg0, arg1, arg2) {
|
1804
|
+
const ret = makeMutClosure(arg0, arg1, 871, __wbg_adapter_63);
|
1792
1805
|
return addHeapObject(ret);
|
1793
1806
|
};
|
1794
1807
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|