lebai_sdk 0.1.6 → 0.1.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 +7 -12
- package/lebai_sdk_bg.js +105 -139
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +5 -2
package/lebai_sdk.d.ts
CHANGED
@@ -12,18 +12,6 @@ export function connect(ip: string, simu: boolean): Promise<Robot>;
|
|
12
12
|
*/
|
13
13
|
export function discover_devices(time: number): Promise<any>;
|
14
14
|
/**
|
15
|
-
* @param {bigint} ms
|
16
|
-
* @returns {Promise<void>}
|
17
|
-
*/
|
18
|
-
export function sleep_ms(ms: bigint): Promise<void>;
|
19
|
-
/**
|
20
|
-
* @returns {bigint}
|
21
|
-
*/
|
22
|
-
export function timestamp(): bigint;
|
23
|
-
/**
|
24
|
-
*/
|
25
|
-
export function init(): void;
|
26
|
-
/**
|
27
15
|
* @returns {string}
|
28
16
|
*/
|
29
17
|
export function version(): string;
|
@@ -61,6 +49,13 @@ export class Robot {
|
|
61
49
|
*/
|
62
50
|
pose_trans(from: any, to: any): Promise<any>;
|
63
51
|
/**
|
52
|
+
* @param {any} pose
|
53
|
+
* @param {any} frame
|
54
|
+
* @param {any} delta
|
55
|
+
* @returns {Promise<any>}
|
56
|
+
*/
|
57
|
+
pose_add(pose: any, frame: any, delta: any): Promise<any>;
|
58
|
+
/**
|
64
59
|
* @param {any} p
|
65
60
|
* @returns {Promise<any>}
|
66
61
|
*/
|
package/lebai_sdk_bg.js
CHANGED
@@ -24,6 +24,37 @@ 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
|
+
function isLikeNone(x) {
|
37
|
+
return x === undefined || x === null;
|
38
|
+
}
|
39
|
+
|
40
|
+
let cachedFloat64Memory0 = null;
|
41
|
+
|
42
|
+
function getFloat64Memory0() {
|
43
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
44
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
45
|
+
}
|
46
|
+
return cachedFloat64Memory0;
|
47
|
+
}
|
48
|
+
|
49
|
+
let cachedInt32Memory0 = null;
|
50
|
+
|
51
|
+
function getInt32Memory0() {
|
52
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
53
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
54
|
+
}
|
55
|
+
return cachedInt32Memory0;
|
56
|
+
}
|
57
|
+
|
27
58
|
let WASM_VECTOR_LEN = 0;
|
28
59
|
|
29
60
|
let cachedUint8Memory0 = null;
|
@@ -90,28 +121,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
90
121
|
return ptr;
|
91
122
|
}
|
92
123
|
|
93
|
-
function isLikeNone(x) {
|
94
|
-
return x === undefined || x === null;
|
95
|
-
}
|
96
|
-
|
97
|
-
let cachedInt32Memory0 = null;
|
98
|
-
|
99
|
-
function getInt32Memory0() {
|
100
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
101
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
102
|
-
}
|
103
|
-
return cachedInt32Memory0;
|
104
|
-
}
|
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
124
|
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
116
125
|
|
117
126
|
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
@@ -122,15 +131,6 @@ function getStringFromWasm0(ptr, len) {
|
|
122
131
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
123
132
|
}
|
124
133
|
|
125
|
-
let cachedFloat64Memory0 = null;
|
126
|
-
|
127
|
-
function getFloat64Memory0() {
|
128
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
129
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
130
|
-
}
|
131
|
-
return cachedFloat64Memory0;
|
132
|
-
}
|
133
|
-
|
134
134
|
let cachedBigInt64Memory0 = null;
|
135
135
|
|
136
136
|
function getBigInt64Memory0() {
|
@@ -229,20 +229,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
229
229
|
|
230
230
|
return real;
|
231
231
|
}
|
232
|
-
function __wbg_adapter_48(arg0, arg1
|
233
|
-
wasm.
|
232
|
+
function __wbg_adapter_48(arg0, arg1) {
|
233
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39f5d915b9118494(arg0, arg1);
|
234
234
|
}
|
235
235
|
|
236
|
-
function __wbg_adapter_51(arg0, arg1) {
|
237
|
-
wasm.
|
236
|
+
function __wbg_adapter_51(arg0, arg1, arg2) {
|
237
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0a70a922144212b1(arg0, arg1, addHeapObject(arg2));
|
238
238
|
}
|
239
239
|
|
240
240
|
function __wbg_adapter_58(arg0, arg1, arg2) {
|
241
|
-
wasm.
|
241
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbaa19d2314244e0e(arg0, arg1, addHeapObject(arg2));
|
242
242
|
}
|
243
243
|
|
244
244
|
function __wbg_adapter_61(arg0, arg1) {
|
245
|
-
wasm.
|
245
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb103ecbb8424f107(arg0, arg1);
|
246
246
|
}
|
247
247
|
|
248
248
|
let cachedUint32Memory0 = null;
|
@@ -281,50 +281,6 @@ export function discover_devices(time) {
|
|
281
281
|
return takeObject(ret);
|
282
282
|
}
|
283
283
|
|
284
|
-
/**
|
285
|
-
* @param {bigint} ms
|
286
|
-
* @returns {Promise<void>}
|
287
|
-
*/
|
288
|
-
export function sleep_ms(ms) {
|
289
|
-
const ret = wasm.sleep_ms(ms);
|
290
|
-
return takeObject(ret);
|
291
|
-
}
|
292
|
-
|
293
|
-
/**
|
294
|
-
* @returns {bigint}
|
295
|
-
*/
|
296
|
-
export function timestamp() {
|
297
|
-
try {
|
298
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
299
|
-
wasm.timestamp(retptr);
|
300
|
-
var r0 = getBigInt64Memory0()[retptr / 8 + 0];
|
301
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
302
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
303
|
-
if (r3) {
|
304
|
-
throw takeObject(r2);
|
305
|
-
}
|
306
|
-
return BigInt.asUintN(64, r0);
|
307
|
-
} finally {
|
308
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
309
|
-
}
|
310
|
-
}
|
311
|
-
|
312
|
-
/**
|
313
|
-
*/
|
314
|
-
export function init() {
|
315
|
-
try {
|
316
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
317
|
-
wasm.init(retptr);
|
318
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
319
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
320
|
-
if (r1) {
|
321
|
-
throw takeObject(r0);
|
322
|
-
}
|
323
|
-
} finally {
|
324
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
325
|
-
}
|
326
|
-
}
|
327
|
-
|
328
284
|
/**
|
329
285
|
* @returns {string}
|
330
286
|
*/
|
@@ -360,8 +316,8 @@ function handleError(f, args) {
|
|
360
316
|
function getArrayU8FromWasm0(ptr, len) {
|
361
317
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
362
318
|
}
|
363
|
-
function
|
364
|
-
wasm.
|
319
|
+
function __wbg_adapter_217(arg0, arg1, arg2, arg3) {
|
320
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hbe1345a0d36fb2f6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
365
321
|
}
|
366
322
|
|
367
323
|
/**
|
@@ -439,6 +395,16 @@ export class Robot {
|
|
439
395
|
return takeObject(ret);
|
440
396
|
}
|
441
397
|
/**
|
398
|
+
* @param {any} pose
|
399
|
+
* @param {any} frame
|
400
|
+
* @param {any} delta
|
401
|
+
* @returns {Promise<any>}
|
402
|
+
*/
|
403
|
+
pose_add(pose, frame, delta) {
|
404
|
+
const ret = wasm.robot_pose_add(this.ptr, addHeapObject(pose), addHeapObject(frame), addHeapObject(delta));
|
405
|
+
return takeObject(ret);
|
406
|
+
}
|
407
|
+
/**
|
442
408
|
* @param {any} p
|
443
409
|
* @returns {Promise<any>}
|
444
410
|
*/
|
@@ -1089,46 +1055,28 @@ export class RobotSubscription {
|
|
1089
1055
|
}
|
1090
1056
|
}
|
1091
1057
|
|
1092
|
-
export function __wbindgen_cb_drop(arg0) {
|
1093
|
-
const obj = takeObject(arg0).original;
|
1094
|
-
if (obj.cnt-- == 1) {
|
1095
|
-
obj.a = 0;
|
1096
|
-
return true;
|
1097
|
-
}
|
1098
|
-
const ret = false;
|
1099
|
-
return ret;
|
1100
|
-
};
|
1101
|
-
|
1102
1058
|
export function __wbindgen_object_drop_ref(arg0) {
|
1103
1059
|
takeObject(arg0);
|
1104
1060
|
};
|
1105
1061
|
|
1106
|
-
export function
|
1107
|
-
const
|
1108
|
-
const ret = typeof(
|
1109
|
-
|
1110
|
-
var len0 = WASM_VECTOR_LEN;
|
1111
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1112
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1113
|
-
};
|
1114
|
-
|
1115
|
-
export function __wbindgen_number_new(arg0) {
|
1116
|
-
const ret = arg0;
|
1117
|
-
return addHeapObject(ret);
|
1062
|
+
export function __wbindgen_is_object(arg0) {
|
1063
|
+
const val = getObject(arg0);
|
1064
|
+
const ret = typeof(val) === 'object' && val !== null;
|
1065
|
+
return ret;
|
1118
1066
|
};
|
1119
1067
|
|
1120
|
-
export function
|
1121
|
-
const ret =
|
1122
|
-
return
|
1068
|
+
export function __wbindgen_is_undefined(arg0) {
|
1069
|
+
const ret = getObject(arg0) === undefined;
|
1070
|
+
return ret;
|
1123
1071
|
};
|
1124
1072
|
|
1125
|
-
export function
|
1126
|
-
const ret =
|
1127
|
-
return
|
1073
|
+
export function __wbindgen_in(arg0, arg1) {
|
1074
|
+
const ret = getObject(arg0) in getObject(arg1);
|
1075
|
+
return ret;
|
1128
1076
|
};
|
1129
1077
|
|
1130
|
-
export function
|
1131
|
-
const ret =
|
1078
|
+
export function __wbindgen_number_new(arg0) {
|
1079
|
+
const ret = arg0;
|
1132
1080
|
return addHeapObject(ret);
|
1133
1081
|
};
|
1134
1082
|
|
@@ -1160,15 +1108,13 @@ export function __wbindgen_number_get(arg0, arg1) {
|
|
1160
1108
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1161
1109
|
};
|
1162
1110
|
|
1163
|
-
export function
|
1164
|
-
const
|
1165
|
-
const ret = typeof(
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
const ret = getObject(arg0) in getObject(arg1);
|
1171
|
-
return ret;
|
1111
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
1112
|
+
const obj = getObject(arg1);
|
1113
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
1114
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1115
|
+
var len0 = WASM_VECTOR_LEN;
|
1116
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1117
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1172
1118
|
};
|
1173
1119
|
|
1174
1120
|
export function __wbindgen_bigint_from_u64(arg0) {
|
@@ -1176,11 +1122,31 @@ export function __wbindgen_bigint_from_u64(arg0) {
|
|
1176
1122
|
return addHeapObject(ret);
|
1177
1123
|
};
|
1178
1124
|
|
1179
|
-
export function
|
1180
|
-
const
|
1125
|
+
export function __wbindgen_cb_drop(arg0) {
|
1126
|
+
const obj = takeObject(arg0).original;
|
1127
|
+
if (obj.cnt-- == 1) {
|
1128
|
+
obj.a = 0;
|
1129
|
+
return true;
|
1130
|
+
}
|
1131
|
+
const ret = false;
|
1181
1132
|
return ret;
|
1182
1133
|
};
|
1183
1134
|
|
1135
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
1136
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
1137
|
+
return addHeapObject(ret);
|
1138
|
+
};
|
1139
|
+
|
1140
|
+
export function __wbg_robot_new(arg0) {
|
1141
|
+
const ret = Robot.__wrap(arg0);
|
1142
|
+
return addHeapObject(ret);
|
1143
|
+
};
|
1144
|
+
|
1145
|
+
export function __wbg_robotsubscription_new(arg0) {
|
1146
|
+
const ret = RobotSubscription.__wrap(arg0);
|
1147
|
+
return addHeapObject(ret);
|
1148
|
+
};
|
1149
|
+
|
1184
1150
|
export function __wbindgen_error_new(arg0, arg1) {
|
1185
1151
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1186
1152
|
return addHeapObject(ret);
|
@@ -1282,12 +1248,12 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
1282
1248
|
return ret;
|
1283
1249
|
};
|
1284
1250
|
|
1285
|
-
export function
|
1251
|
+
export function __wbg_getwithrefkey_5e6d9547403deab8(arg0, arg1) {
|
1286
1252
|
const ret = getObject(arg0)[getObject(arg1)];
|
1287
1253
|
return addHeapObject(ret);
|
1288
1254
|
};
|
1289
1255
|
|
1290
|
-
export function
|
1256
|
+
export function __wbg_set_841ac57cff3d672b(arg0, arg1, arg2) {
|
1291
1257
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
1292
1258
|
};
|
1293
1259
|
|
@@ -1419,7 +1385,7 @@ export function __wbg_new_9d3a9ce4282a18a8(arg0, arg1) {
|
|
1419
1385
|
const a = state0.a;
|
1420
1386
|
state0.a = 0;
|
1421
1387
|
try {
|
1422
|
-
return
|
1388
|
+
return __wbg_adapter_217(a, state0.b, arg0, arg1);
|
1423
1389
|
} finally {
|
1424
1390
|
state0.a = a;
|
1425
1391
|
}
|
@@ -1500,33 +1466,33 @@ export function __wbindgen_memory() {
|
|
1500
1466
|
return addHeapObject(ret);
|
1501
1467
|
};
|
1502
1468
|
|
1503
|
-
export function
|
1504
|
-
const ret = makeMutClosure(arg0, arg1,
|
1469
|
+
export function __wbindgen_closure_wrapper1504(arg0, arg1, arg2) {
|
1470
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_48);
|
1505
1471
|
return addHeapObject(ret);
|
1506
1472
|
};
|
1507
1473
|
|
1508
|
-
export function
|
1509
|
-
const ret = makeMutClosure(arg0, arg1,
|
1474
|
+
export function __wbindgen_closure_wrapper1506(arg0, arg1, arg2) {
|
1475
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_51);
|
1510
1476
|
return addHeapObject(ret);
|
1511
1477
|
};
|
1512
1478
|
|
1513
|
-
export function
|
1514
|
-
const ret = makeMutClosure(arg0, arg1,
|
1479
|
+
export function __wbindgen_closure_wrapper1508(arg0, arg1, arg2) {
|
1480
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_51);
|
1515
1481
|
return addHeapObject(ret);
|
1516
1482
|
};
|
1517
1483
|
|
1518
|
-
export function
|
1519
|
-
const ret = makeMutClosure(arg0, arg1,
|
1484
|
+
export function __wbindgen_closure_wrapper1510(arg0, arg1, arg2) {
|
1485
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_51);
|
1520
1486
|
return addHeapObject(ret);
|
1521
1487
|
};
|
1522
1488
|
|
1523
|
-
export function
|
1524
|
-
const ret = makeMutClosure(arg0, arg1,
|
1489
|
+
export function __wbindgen_closure_wrapper1989(arg0, arg1, arg2) {
|
1490
|
+
const ret = makeMutClosure(arg0, arg1, 664, __wbg_adapter_58);
|
1525
1491
|
return addHeapObject(ret);
|
1526
1492
|
};
|
1527
1493
|
|
1528
|
-
export function
|
1529
|
-
const ret = makeMutClosure(arg0, arg1,
|
1494
|
+
export function __wbindgen_closure_wrapper2023(arg0, arg1, arg2) {
|
1495
|
+
const ret = makeMutClosure(arg0, arg1, 678, __wbg_adapter_61);
|
1530
1496
|
return addHeapObject(ret);
|
1531
1497
|
};
|
1532
1498
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "lebai_sdk",
|
3
3
|
"description": "lebai_sdk",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.8",
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -15,5 +15,8 @@
|
|
15
15
|
],
|
16
16
|
"module": "lebai_sdk.js",
|
17
17
|
"types": "lebai_sdk.d.ts",
|
18
|
-
"sideEffects":
|
18
|
+
"sideEffects": [
|
19
|
+
"./lebai_sdk.js",
|
20
|
+
"./snippets/*"
|
21
|
+
]
|
19
22
|
}
|