lebai_sdk 0.1.2 → 0.1.4
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/LICENSE +127 -127
- package/README.md +3 -3
- package/lebai_sdk.js +2 -1427
- package/lebai_sdk_bg.js +1418 -0
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +4 -3
package/lebai_sdk.js
CHANGED
@@ -1,1427 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
let wasm;
|
4
|
-
const { TextDecoder, TextEncoder } = require(`util`);
|
5
|
-
|
6
|
-
const heap = new Array(32).fill(undefined);
|
7
|
-
|
8
|
-
heap.push(undefined, null, true, false);
|
9
|
-
|
10
|
-
function getObject(idx) { return heap[idx]; }
|
11
|
-
|
12
|
-
let heap_next = heap.length;
|
13
|
-
|
14
|
-
function dropObject(idx) {
|
15
|
-
if (idx < 36) return;
|
16
|
-
heap[idx] = heap_next;
|
17
|
-
heap_next = idx;
|
18
|
-
}
|
19
|
-
|
20
|
-
function takeObject(idx) {
|
21
|
-
const ret = getObject(idx);
|
22
|
-
dropObject(idx);
|
23
|
-
return ret;
|
24
|
-
}
|
25
|
-
|
26
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
27
|
-
|
28
|
-
cachedTextDecoder.decode();
|
29
|
-
|
30
|
-
let cachedUint8Memory0 = new Uint8Array();
|
31
|
-
|
32
|
-
function getUint8Memory0() {
|
33
|
-
if (cachedUint8Memory0.byteLength === 0) {
|
34
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
35
|
-
}
|
36
|
-
return cachedUint8Memory0;
|
37
|
-
}
|
38
|
-
|
39
|
-
function getStringFromWasm0(ptr, len) {
|
40
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
41
|
-
}
|
42
|
-
|
43
|
-
function addHeapObject(obj) {
|
44
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
45
|
-
const idx = heap_next;
|
46
|
-
heap_next = heap[idx];
|
47
|
-
|
48
|
-
heap[idx] = obj;
|
49
|
-
return idx;
|
50
|
-
}
|
51
|
-
|
52
|
-
let WASM_VECTOR_LEN = 0;
|
53
|
-
|
54
|
-
let cachedTextEncoder = new TextEncoder('utf-8');
|
55
|
-
|
56
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
57
|
-
? function (arg, view) {
|
58
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
59
|
-
}
|
60
|
-
: function (arg, view) {
|
61
|
-
const buf = cachedTextEncoder.encode(arg);
|
62
|
-
view.set(buf);
|
63
|
-
return {
|
64
|
-
read: arg.length,
|
65
|
-
written: buf.length
|
66
|
-
};
|
67
|
-
});
|
68
|
-
|
69
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
70
|
-
|
71
|
-
if (realloc === undefined) {
|
72
|
-
const buf = cachedTextEncoder.encode(arg);
|
73
|
-
const ptr = malloc(buf.length);
|
74
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
75
|
-
WASM_VECTOR_LEN = buf.length;
|
76
|
-
return ptr;
|
77
|
-
}
|
78
|
-
|
79
|
-
let len = arg.length;
|
80
|
-
let ptr = malloc(len);
|
81
|
-
|
82
|
-
const mem = getUint8Memory0();
|
83
|
-
|
84
|
-
let offset = 0;
|
85
|
-
|
86
|
-
for (; offset < len; offset++) {
|
87
|
-
const code = arg.charCodeAt(offset);
|
88
|
-
if (code > 0x7F) break;
|
89
|
-
mem[ptr + offset] = code;
|
90
|
-
}
|
91
|
-
|
92
|
-
if (offset !== len) {
|
93
|
-
if (offset !== 0) {
|
94
|
-
arg = arg.slice(offset);
|
95
|
-
}
|
96
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
97
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
98
|
-
const ret = encodeString(arg, view);
|
99
|
-
|
100
|
-
offset += ret.written;
|
101
|
-
}
|
102
|
-
|
103
|
-
WASM_VECTOR_LEN = offset;
|
104
|
-
return ptr;
|
105
|
-
}
|
106
|
-
|
107
|
-
function isLikeNone(x) {
|
108
|
-
return x === undefined || x === null;
|
109
|
-
}
|
110
|
-
|
111
|
-
let cachedInt32Memory0 = new Int32Array();
|
112
|
-
|
113
|
-
function getInt32Memory0() {
|
114
|
-
if (cachedInt32Memory0.byteLength === 0) {
|
115
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
116
|
-
}
|
117
|
-
return cachedInt32Memory0;
|
118
|
-
}
|
119
|
-
|
120
|
-
let cachedFloat64Memory0 = new Float64Array();
|
121
|
-
|
122
|
-
function getFloat64Memory0() {
|
123
|
-
if (cachedFloat64Memory0.byteLength === 0) {
|
124
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
125
|
-
}
|
126
|
-
return cachedFloat64Memory0;
|
127
|
-
}
|
128
|
-
|
129
|
-
let cachedBigInt64Memory0 = new BigInt64Array();
|
130
|
-
|
131
|
-
function getBigInt64Memory0() {
|
132
|
-
if (cachedBigInt64Memory0.byteLength === 0) {
|
133
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
134
|
-
}
|
135
|
-
return cachedBigInt64Memory0;
|
136
|
-
}
|
137
|
-
|
138
|
-
function debugString(val) {
|
139
|
-
// primitive types
|
140
|
-
const type = typeof val;
|
141
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
142
|
-
return `${val}`;
|
143
|
-
}
|
144
|
-
if (type == 'string') {
|
145
|
-
return `"${val}"`;
|
146
|
-
}
|
147
|
-
if (type == 'symbol') {
|
148
|
-
const description = val.description;
|
149
|
-
if (description == null) {
|
150
|
-
return 'Symbol';
|
151
|
-
} else {
|
152
|
-
return `Symbol(${description})`;
|
153
|
-
}
|
154
|
-
}
|
155
|
-
if (type == 'function') {
|
156
|
-
const name = val.name;
|
157
|
-
if (typeof name == 'string' && name.length > 0) {
|
158
|
-
return `Function(${name})`;
|
159
|
-
} else {
|
160
|
-
return 'Function';
|
161
|
-
}
|
162
|
-
}
|
163
|
-
// objects
|
164
|
-
if (Array.isArray(val)) {
|
165
|
-
const length = val.length;
|
166
|
-
let debug = '[';
|
167
|
-
if (length > 0) {
|
168
|
-
debug += debugString(val[0]);
|
169
|
-
}
|
170
|
-
for(let i = 1; i < length; i++) {
|
171
|
-
debug += ', ' + debugString(val[i]);
|
172
|
-
}
|
173
|
-
debug += ']';
|
174
|
-
return debug;
|
175
|
-
}
|
176
|
-
// Test for built-in
|
177
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
178
|
-
let className;
|
179
|
-
if (builtInMatches.length > 1) {
|
180
|
-
className = builtInMatches[1];
|
181
|
-
} else {
|
182
|
-
// Failed to match the standard '[object ClassName]'
|
183
|
-
return toString.call(val);
|
184
|
-
}
|
185
|
-
if (className == 'Object') {
|
186
|
-
// we're a user defined class or Object
|
187
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
188
|
-
// easier than looping through ownProperties of `val`.
|
189
|
-
try {
|
190
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
191
|
-
} catch (_) {
|
192
|
-
return 'Object';
|
193
|
-
}
|
194
|
-
}
|
195
|
-
// errors
|
196
|
-
if (val instanceof Error) {
|
197
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
198
|
-
}
|
199
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
200
|
-
return className;
|
201
|
-
}
|
202
|
-
|
203
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
204
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
205
|
-
const real = (...args) => {
|
206
|
-
// First up with a closure we increment the internal reference
|
207
|
-
// count. This ensures that the Rust closure environment won't
|
208
|
-
// be deallocated while we're invoking it.
|
209
|
-
state.cnt++;
|
210
|
-
const a = state.a;
|
211
|
-
state.a = 0;
|
212
|
-
try {
|
213
|
-
return f(a, state.b, ...args);
|
214
|
-
} finally {
|
215
|
-
if (--state.cnt === 0) {
|
216
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
217
|
-
|
218
|
-
} else {
|
219
|
-
state.a = a;
|
220
|
-
}
|
221
|
-
}
|
222
|
-
};
|
223
|
-
real.original = state;
|
224
|
-
|
225
|
-
return real;
|
226
|
-
}
|
227
|
-
function __wbg_adapter_48(arg0, arg1, arg2) {
|
228
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha07359bf35162156(arg0, arg1, addHeapObject(arg2));
|
229
|
-
}
|
230
|
-
|
231
|
-
function __wbg_adapter_55(arg0, arg1) {
|
232
|
-
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h74626abf33d980cc(arg0, arg1);
|
233
|
-
}
|
234
|
-
|
235
|
-
function __wbg_adapter_58(arg0, arg1, arg2) {
|
236
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf6e7306ad2a6cb3a(arg0, arg1, addHeapObject(arg2));
|
237
|
-
}
|
238
|
-
|
239
|
-
function __wbg_adapter_61(arg0, arg1) {
|
240
|
-
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab8fb19b8faf1e9f(arg0, arg1);
|
241
|
-
}
|
242
|
-
|
243
|
-
/**
|
244
|
-
* @param {string} ip
|
245
|
-
* @param {boolean} simu
|
246
|
-
* @returns {Promise<Robot>}
|
247
|
-
*/
|
248
|
-
module.exports.connect = function(ip, simu) {
|
249
|
-
const ptr0 = passStringToWasm0(ip, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
250
|
-
const len0 = WASM_VECTOR_LEN;
|
251
|
-
const ret = wasm.connect(ptr0, len0, simu);
|
252
|
-
return takeObject(ret);
|
253
|
-
};
|
254
|
-
|
255
|
-
/**
|
256
|
-
* @param {number} time
|
257
|
-
* @returns {Promise<any>}
|
258
|
-
*/
|
259
|
-
module.exports.discover_devices = function(time) {
|
260
|
-
const ret = wasm.discover_devices(time);
|
261
|
-
return takeObject(ret);
|
262
|
-
};
|
263
|
-
|
264
|
-
/**
|
265
|
-
* @returns {string}
|
266
|
-
*/
|
267
|
-
module.exports.version = function() {
|
268
|
-
try {
|
269
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
270
|
-
wasm.version(retptr);
|
271
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
272
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
273
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
274
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
275
|
-
var ptr0 = r0;
|
276
|
-
var len0 = r1;
|
277
|
-
if (r3) {
|
278
|
-
ptr0 = 0; len0 = 0;
|
279
|
-
throw takeObject(r2);
|
280
|
-
}
|
281
|
-
return getStringFromWasm0(ptr0, len0);
|
282
|
-
} finally {
|
283
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
284
|
-
wasm.__wbindgen_free(ptr0, len0);
|
285
|
-
}
|
286
|
-
};
|
287
|
-
|
288
|
-
function handleError(f, args) {
|
289
|
-
try {
|
290
|
-
return f.apply(this, args);
|
291
|
-
} catch (e) {
|
292
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
293
|
-
}
|
294
|
-
}
|
295
|
-
|
296
|
-
function getArrayU8FromWasm0(ptr, len) {
|
297
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
298
|
-
}
|
299
|
-
|
300
|
-
function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; }
|
301
|
-
function __wbg_adapter_211(arg0, arg1, arg2, arg3) {
|
302
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h0a47f7ef5d013fae(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
303
|
-
}
|
304
|
-
|
305
|
-
/**
|
306
|
-
*/
|
307
|
-
class Robot {
|
308
|
-
|
309
|
-
static __wrap(ptr) {
|
310
|
-
const obj = Object.create(Robot.prototype);
|
311
|
-
obj.ptr = ptr;
|
312
|
-
|
313
|
-
return obj;
|
314
|
-
}
|
315
|
-
|
316
|
-
__destroy_into_raw() {
|
317
|
-
const ptr = this.ptr;
|
318
|
-
this.ptr = 0;
|
319
|
-
|
320
|
-
return ptr;
|
321
|
-
}
|
322
|
-
|
323
|
-
free() {
|
324
|
-
const ptr = this.__destroy_into_raw();
|
325
|
-
wasm.__wbg_robot_free(ptr);
|
326
|
-
}
|
327
|
-
/**
|
328
|
-
* @param {string} method
|
329
|
-
* @param {string | undefined} param
|
330
|
-
* @returns {Promise<string>}
|
331
|
-
*/
|
332
|
-
call(method, param) {
|
333
|
-
const ptr0 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
334
|
-
const len0 = WASM_VECTOR_LEN;
|
335
|
-
var ptr1 = isLikeNone(param) ? 0 : passStringToWasm0(param, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
336
|
-
var len1 = WASM_VECTOR_LEN;
|
337
|
-
const ret = wasm.robot_call(this.ptr, ptr0, len0, ptr1, len1);
|
338
|
-
return takeObject(ret);
|
339
|
-
}
|
340
|
-
/**
|
341
|
-
* @param {string} method
|
342
|
-
* @param {string | undefined} param
|
343
|
-
* @returns {Promise<RobotSubscription>}
|
344
|
-
*/
|
345
|
-
subscribe(method, param) {
|
346
|
-
const ptr0 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
347
|
-
const len0 = WASM_VECTOR_LEN;
|
348
|
-
var ptr1 = isLikeNone(param) ? 0 : passStringToWasm0(param, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
349
|
-
var len1 = WASM_VECTOR_LEN;
|
350
|
-
const ret = wasm.robot_subscribe(this.ptr, ptr0, len0, ptr1, len1);
|
351
|
-
return takeObject(ret);
|
352
|
-
}
|
353
|
-
/**
|
354
|
-
* @param {any} p
|
355
|
-
* @returns {Promise<any>}
|
356
|
-
*/
|
357
|
-
kinematics_forward(p) {
|
358
|
-
const ret = wasm.robot_kinematics_forward(this.ptr, addHeapObject(p));
|
359
|
-
return takeObject(ret);
|
360
|
-
}
|
361
|
-
/**
|
362
|
-
* @param {any} p
|
363
|
-
* @param {any | undefined} refer
|
364
|
-
* @returns {Promise<any>}
|
365
|
-
*/
|
366
|
-
kinematics_inverse(p, refer) {
|
367
|
-
const ret = wasm.robot_kinematics_inverse(this.ptr, addHeapObject(p), isLikeNone(refer) ? 0 : addHeapObject(refer));
|
368
|
-
return takeObject(ret);
|
369
|
-
}
|
370
|
-
/**
|
371
|
-
* @param {any} from
|
372
|
-
* @param {any} to
|
373
|
-
* @returns {Promise<any>}
|
374
|
-
*/
|
375
|
-
pose_trans(from, to) {
|
376
|
-
const ret = wasm.robot_pose_trans(this.ptr, addHeapObject(from), addHeapObject(to));
|
377
|
-
return takeObject(ret);
|
378
|
-
}
|
379
|
-
/**
|
380
|
-
* @param {any} p
|
381
|
-
* @returns {Promise<any>}
|
382
|
-
*/
|
383
|
-
pose_inverse(p) {
|
384
|
-
const ret = wasm.robot_pose_inverse(this.ptr, addHeapObject(p));
|
385
|
-
return takeObject(ret);
|
386
|
-
}
|
387
|
-
/**
|
388
|
-
* @param {string} name
|
389
|
-
* @param {string | undefined} dir
|
390
|
-
* @returns {Promise<any>}
|
391
|
-
*/
|
392
|
-
load_pose(name, dir) {
|
393
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
394
|
-
const len0 = WASM_VECTOR_LEN;
|
395
|
-
var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
396
|
-
var len1 = WASM_VECTOR_LEN;
|
397
|
-
const ret = wasm.robot_load_pose(this.ptr, ptr0, len0, ptr1, len1);
|
398
|
-
return takeObject(ret);
|
399
|
-
}
|
400
|
-
/**
|
401
|
-
* @param {string} name
|
402
|
-
* @param {string | undefined} dir
|
403
|
-
* @returns {Promise<any>}
|
404
|
-
*/
|
405
|
-
load_frame(name, dir) {
|
406
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
407
|
-
const len0 = WASM_VECTOR_LEN;
|
408
|
-
var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
409
|
-
var len1 = WASM_VECTOR_LEN;
|
410
|
-
const ret = wasm.robot_load_frame(this.ptr, ptr0, len0, ptr1, len1);
|
411
|
-
return takeObject(ret);
|
412
|
-
}
|
413
|
-
/**
|
414
|
-
* @returns {Promise<void>}
|
415
|
-
*/
|
416
|
-
stop_move() {
|
417
|
-
const ret = wasm.robot_stop_move(this.ptr);
|
418
|
-
return takeObject(ret);
|
419
|
-
}
|
420
|
-
/**
|
421
|
-
* @param {number | undefined} id
|
422
|
-
* @returns {Promise<void>}
|
423
|
-
*/
|
424
|
-
wait_move(id) {
|
425
|
-
const ret = wasm.robot_wait_move(this.ptr, !isLikeNone(id), isLikeNone(id) ? 0 : id);
|
426
|
-
return takeObject(ret);
|
427
|
-
}
|
428
|
-
/**
|
429
|
-
* @returns {Promise<number>}
|
430
|
-
*/
|
431
|
-
get_running_motion() {
|
432
|
-
const ret = wasm.robot_get_running_motion(this.ptr);
|
433
|
-
return takeObject(ret);
|
434
|
-
}
|
435
|
-
/**
|
436
|
-
* @param {number} id
|
437
|
-
* @returns {Promise<string>}
|
438
|
-
*/
|
439
|
-
get_motion_state(id) {
|
440
|
-
const ret = wasm.robot_get_motion_state(this.ptr, id);
|
441
|
-
return takeObject(ret);
|
442
|
-
}
|
443
|
-
/**
|
444
|
-
* @param {any} p
|
445
|
-
* @param {number} a
|
446
|
-
* @param {number} v
|
447
|
-
* @param {number} t
|
448
|
-
* @param {number | undefined} r
|
449
|
-
* @returns {Promise<number>}
|
450
|
-
*/
|
451
|
-
towardj(p, a, v, t, r) {
|
452
|
-
const ret = wasm.robot_towardj(this.ptr, addHeapObject(p), a, v, t, !isLikeNone(r), isLikeNone(r) ? 0 : r);
|
453
|
-
return takeObject(ret);
|
454
|
-
}
|
455
|
-
/**
|
456
|
-
* @param {any} p
|
457
|
-
* @param {number} a
|
458
|
-
* @param {number} v
|
459
|
-
* @param {number} t
|
460
|
-
* @param {number | undefined} r
|
461
|
-
* @returns {Promise<number>}
|
462
|
-
*/
|
463
|
-
movej(p, a, v, t, r) {
|
464
|
-
const ret = wasm.robot_movej(this.ptr, addHeapObject(p), a, v, t, !isLikeNone(r), isLikeNone(r) ? 0 : r);
|
465
|
-
return takeObject(ret);
|
466
|
-
}
|
467
|
-
/**
|
468
|
-
* @param {any} p
|
469
|
-
* @param {number} a
|
470
|
-
* @param {number} v
|
471
|
-
* @param {number} t
|
472
|
-
* @param {number | undefined} r
|
473
|
-
* @returns {Promise<number>}
|
474
|
-
*/
|
475
|
-
movel(p, a, v, t, r) {
|
476
|
-
const ret = wasm.robot_movel(this.ptr, addHeapObject(p), a, v, t, !isLikeNone(r), isLikeNone(r) ? 0 : r);
|
477
|
-
return takeObject(ret);
|
478
|
-
}
|
479
|
-
/**
|
480
|
-
* @param {any} via
|
481
|
-
* @param {any} p
|
482
|
-
* @param {number} rad
|
483
|
-
* @param {number} a
|
484
|
-
* @param {number} v
|
485
|
-
* @param {number} t
|
486
|
-
* @param {number | undefined} r
|
487
|
-
* @returns {Promise<number>}
|
488
|
-
*/
|
489
|
-
movec(via, p, rad, a, v, t, r) {
|
490
|
-
const ret = wasm.robot_movec(this.ptr, addHeapObject(via), addHeapObject(p), rad, a, v, t, !isLikeNone(r), isLikeNone(r) ? 0 : r);
|
491
|
-
return takeObject(ret);
|
492
|
-
}
|
493
|
-
/**
|
494
|
-
* @param {any} p
|
495
|
-
* @param {number} v
|
496
|
-
* @param {number} t
|
497
|
-
* @returns {Promise<void>}
|
498
|
-
*/
|
499
|
-
move_pvt(p, v, t) {
|
500
|
-
const ret = wasm.robot_move_pvt(this.ptr, addHeapObject(p), v, t);
|
501
|
-
return takeObject(ret);
|
502
|
-
}
|
503
|
-
/**
|
504
|
-
* @param {any} p
|
505
|
-
* @param {number} v
|
506
|
-
* @param {number} a
|
507
|
-
* @param {number} t
|
508
|
-
* @returns {Promise<void>}
|
509
|
-
*/
|
510
|
-
move_pvat(p, v, a, t) {
|
511
|
-
const ret = wasm.robot_move_pvat(this.ptr, addHeapObject(p), v, a, t);
|
512
|
-
return takeObject(ret);
|
513
|
-
}
|
514
|
-
/**
|
515
|
-
* @param {any} v
|
516
|
-
* @returns {Promise<void>}
|
517
|
-
*/
|
518
|
-
speedj(v) {
|
519
|
-
const ret = wasm.robot_speedj(this.ptr, addHeapObject(v));
|
520
|
-
return takeObject(ret);
|
521
|
-
}
|
522
|
-
/**
|
523
|
-
* @param {any} v
|
524
|
-
* @param {any | undefined} frame
|
525
|
-
* @returns {Promise<void>}
|
526
|
-
*/
|
527
|
-
speedl(v, frame) {
|
528
|
-
const ret = wasm.robot_speedl(this.ptr, addHeapObject(v), isLikeNone(frame) ? 0 : addHeapObject(frame));
|
529
|
-
return takeObject(ret);
|
530
|
-
}
|
531
|
-
/**
|
532
|
-
* @returns {Promise<void>}
|
533
|
-
*/
|
534
|
-
start_teach_mode() {
|
535
|
-
const ret = wasm.robot_start_teach_mode(this.ptr);
|
536
|
-
return takeObject(ret);
|
537
|
-
}
|
538
|
-
/**
|
539
|
-
* @returns {Promise<void>}
|
540
|
-
*/
|
541
|
-
end_teach_mode() {
|
542
|
-
const ret = wasm.robot_end_teach_mode(this.ptr);
|
543
|
-
return takeObject(ret);
|
544
|
-
}
|
545
|
-
/**
|
546
|
-
* @param {any} device
|
547
|
-
* @param {number} pin
|
548
|
-
* @param {number} value
|
549
|
-
* @returns {Promise<void>}
|
550
|
-
*/
|
551
|
-
set_do(device, pin, value) {
|
552
|
-
const ret = wasm.robot_set_do(this.ptr, addHeapObject(device), pin, value);
|
553
|
-
return takeObject(ret);
|
554
|
-
}
|
555
|
-
/**
|
556
|
-
* @param {any} device
|
557
|
-
* @param {number} pin
|
558
|
-
* @returns {Promise<number>}
|
559
|
-
*/
|
560
|
-
get_do(device, pin) {
|
561
|
-
const ret = wasm.robot_get_do(this.ptr, addHeapObject(device), pin);
|
562
|
-
return takeObject(ret);
|
563
|
-
}
|
564
|
-
/**
|
565
|
-
* @param {any} device
|
566
|
-
* @param {number} pin
|
567
|
-
* @param {number} num
|
568
|
-
* @returns {Promise<any>}
|
569
|
-
*/
|
570
|
-
get_dos(device, pin, num) {
|
571
|
-
const ret = wasm.robot_get_dos(this.ptr, addHeapObject(device), pin, num);
|
572
|
-
return takeObject(ret);
|
573
|
-
}
|
574
|
-
/**
|
575
|
-
* @param {any} device
|
576
|
-
* @param {number} pin
|
577
|
-
* @returns {Promise<number>}
|
578
|
-
*/
|
579
|
-
get_di(device, pin) {
|
580
|
-
const ret = wasm.robot_get_di(this.ptr, addHeapObject(device), pin);
|
581
|
-
return takeObject(ret);
|
582
|
-
}
|
583
|
-
/**
|
584
|
-
* @param {any} device
|
585
|
-
* @param {number} pin
|
586
|
-
* @param {number} num
|
587
|
-
* @returns {Promise<any>}
|
588
|
-
*/
|
589
|
-
get_dis(device, pin, num) {
|
590
|
-
const ret = wasm.robot_get_dis(this.ptr, addHeapObject(device), pin, num);
|
591
|
-
return takeObject(ret);
|
592
|
-
}
|
593
|
-
/**
|
594
|
-
* @param {any} device
|
595
|
-
* @param {number} pin
|
596
|
-
* @param {number} value
|
597
|
-
* @returns {Promise<void>}
|
598
|
-
*/
|
599
|
-
set_ao(device, pin, value) {
|
600
|
-
const ret = wasm.robot_set_ao(this.ptr, addHeapObject(device), pin, value);
|
601
|
-
return takeObject(ret);
|
602
|
-
}
|
603
|
-
/**
|
604
|
-
* @param {any} device
|
605
|
-
* @param {number} pin
|
606
|
-
* @returns {Promise<number>}
|
607
|
-
*/
|
608
|
-
get_ao(device, pin) {
|
609
|
-
const ret = wasm.robot_get_ao(this.ptr, addHeapObject(device), pin);
|
610
|
-
return takeObject(ret);
|
611
|
-
}
|
612
|
-
/**
|
613
|
-
* @param {any} device
|
614
|
-
* @param {number} pin
|
615
|
-
* @param {number} num
|
616
|
-
* @returns {Promise<any>}
|
617
|
-
*/
|
618
|
-
get_aos(device, pin, num) {
|
619
|
-
const ret = wasm.robot_get_aos(this.ptr, addHeapObject(device), pin, num);
|
620
|
-
return takeObject(ret);
|
621
|
-
}
|
622
|
-
/**
|
623
|
-
* @param {any} device
|
624
|
-
* @param {number} pin
|
625
|
-
* @returns {Promise<number>}
|
626
|
-
*/
|
627
|
-
get_ai(device, pin) {
|
628
|
-
const ret = wasm.robot_get_ai(this.ptr, addHeapObject(device), pin);
|
629
|
-
return takeObject(ret);
|
630
|
-
}
|
631
|
-
/**
|
632
|
-
* @param {any} device
|
633
|
-
* @param {number} pin
|
634
|
-
* @param {number} num
|
635
|
-
* @returns {Promise<any>}
|
636
|
-
*/
|
637
|
-
get_ais(device, pin, num) {
|
638
|
-
const ret = wasm.robot_get_ais(this.ptr, addHeapObject(device), pin, num);
|
639
|
-
return takeObject(ret);
|
640
|
-
}
|
641
|
-
/**
|
642
|
-
* @param {number} index
|
643
|
-
* @param {number} value
|
644
|
-
* @returns {Promise<void>}
|
645
|
-
*/
|
646
|
-
set_signal(index, value) {
|
647
|
-
const ret = wasm.robot_set_signal(this.ptr, index, value);
|
648
|
-
return takeObject(ret);
|
649
|
-
}
|
650
|
-
/**
|
651
|
-
* @param {number} index
|
652
|
-
* @returns {Promise<number>}
|
653
|
-
*/
|
654
|
-
get_signal(index) {
|
655
|
-
const ret = wasm.robot_get_signal(this.ptr, index);
|
656
|
-
return takeObject(ret);
|
657
|
-
}
|
658
|
-
/**
|
659
|
-
* @param {number} index
|
660
|
-
* @param {number} value
|
661
|
-
* @returns {Promise<void>}
|
662
|
-
*/
|
663
|
-
add_signal(index, value) {
|
664
|
-
const ret = wasm.robot_add_signal(this.ptr, index, value);
|
665
|
-
return takeObject(ret);
|
666
|
-
}
|
667
|
-
/**
|
668
|
-
* @param {string} scene
|
669
|
-
* @param {any | undefined} params
|
670
|
-
* @param {string | undefined} dir
|
671
|
-
* @param {boolean | undefined} is_parallel
|
672
|
-
* @param {number | undefined} loop_to
|
673
|
-
* @returns {Promise<number>}
|
674
|
-
*/
|
675
|
-
start_task(scene, params, dir, is_parallel, loop_to) {
|
676
|
-
const ptr0 = passStringToWasm0(scene, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
677
|
-
const len0 = WASM_VECTOR_LEN;
|
678
|
-
var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
679
|
-
var len1 = WASM_VECTOR_LEN;
|
680
|
-
const ret = wasm.robot_start_task(this.ptr, ptr0, len0, isLikeNone(params) ? 0 : addHeapObject(params), ptr1, len1, isLikeNone(is_parallel) ? 0xFFFFFF : is_parallel ? 1 : 0, !isLikeNone(loop_to), isLikeNone(loop_to) ? 0 : loop_to);
|
681
|
-
return takeObject(ret);
|
682
|
-
}
|
683
|
-
/**
|
684
|
-
* @param {number | undefined} id
|
685
|
-
* @returns {Promise<string>}
|
686
|
-
*/
|
687
|
-
get_task_state(id) {
|
688
|
-
const ret = wasm.robot_get_task_state(this.ptr, !isLikeNone(id), isLikeNone(id) ? 0 : id);
|
689
|
-
return takeObject(ret);
|
690
|
-
}
|
691
|
-
/**
|
692
|
-
* @param {string} device
|
693
|
-
* @param {string} pin
|
694
|
-
* @param {boolean} value
|
695
|
-
* @returns {Promise<void>}
|
696
|
-
*/
|
697
|
-
write_single_coil(device, pin, value) {
|
698
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
699
|
-
const len0 = WASM_VECTOR_LEN;
|
700
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
701
|
-
const len1 = WASM_VECTOR_LEN;
|
702
|
-
const ret = wasm.robot_write_single_coil(this.ptr, ptr0, len0, ptr1, len1, value);
|
703
|
-
return takeObject(ret);
|
704
|
-
}
|
705
|
-
/**
|
706
|
-
* @param {string} device
|
707
|
-
* @param {string} pin
|
708
|
-
* @param {any} values
|
709
|
-
* @returns {Promise<void>}
|
710
|
-
*/
|
711
|
-
write_multiple_coils(device, pin, values) {
|
712
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
713
|
-
const len0 = WASM_VECTOR_LEN;
|
714
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
715
|
-
const len1 = WASM_VECTOR_LEN;
|
716
|
-
const ret = wasm.robot_write_multiple_coils(this.ptr, ptr0, len0, ptr1, len1, addHeapObject(values));
|
717
|
-
return takeObject(ret);
|
718
|
-
}
|
719
|
-
/**
|
720
|
-
* @param {string} device
|
721
|
-
* @param {string} pin
|
722
|
-
* @param {number} count
|
723
|
-
* @returns {Promise<any>}
|
724
|
-
*/
|
725
|
-
read_coils(device, pin, count) {
|
726
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
727
|
-
const len0 = WASM_VECTOR_LEN;
|
728
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
729
|
-
const len1 = WASM_VECTOR_LEN;
|
730
|
-
const ret = wasm.robot_read_coils(this.ptr, ptr0, len0, ptr1, len1, count);
|
731
|
-
return takeObject(ret);
|
732
|
-
}
|
733
|
-
/**
|
734
|
-
* @param {string} device
|
735
|
-
* @param {string} pin
|
736
|
-
* @param {number} count
|
737
|
-
* @returns {Promise<any>}
|
738
|
-
*/
|
739
|
-
read_discrete_inputs(device, pin, count) {
|
740
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
741
|
-
const len0 = WASM_VECTOR_LEN;
|
742
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
743
|
-
const len1 = WASM_VECTOR_LEN;
|
744
|
-
const ret = wasm.robot_read_discrete_inputs(this.ptr, ptr0, len0, ptr1, len1, count);
|
745
|
-
return takeObject(ret);
|
746
|
-
}
|
747
|
-
/**
|
748
|
-
* @param {string} device
|
749
|
-
* @param {string} pin
|
750
|
-
* @param {number} value
|
751
|
-
* @returns {Promise<void>}
|
752
|
-
*/
|
753
|
-
write_single_register(device, pin, value) {
|
754
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
755
|
-
const len0 = WASM_VECTOR_LEN;
|
756
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
757
|
-
const len1 = WASM_VECTOR_LEN;
|
758
|
-
const ret = wasm.robot_write_single_register(this.ptr, ptr0, len0, ptr1, len1, value);
|
759
|
-
return takeObject(ret);
|
760
|
-
}
|
761
|
-
/**
|
762
|
-
* @param {string} device
|
763
|
-
* @param {string} pin
|
764
|
-
* @param {any} values
|
765
|
-
* @returns {Promise<void>}
|
766
|
-
*/
|
767
|
-
write_multiple_registers(device, pin, values) {
|
768
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
769
|
-
const len0 = WASM_VECTOR_LEN;
|
770
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
771
|
-
const len1 = WASM_VECTOR_LEN;
|
772
|
-
const ret = wasm.robot_write_multiple_registers(this.ptr, ptr0, len0, ptr1, len1, addHeapObject(values));
|
773
|
-
return takeObject(ret);
|
774
|
-
}
|
775
|
-
/**
|
776
|
-
* @param {string} device
|
777
|
-
* @param {string} pin
|
778
|
-
* @param {number} count
|
779
|
-
* @returns {Promise<any>}
|
780
|
-
*/
|
781
|
-
read_holding_registers(device, pin, count) {
|
782
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
783
|
-
const len0 = WASM_VECTOR_LEN;
|
784
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
785
|
-
const len1 = WASM_VECTOR_LEN;
|
786
|
-
const ret = wasm.robot_read_holding_registers(this.ptr, ptr0, len0, ptr1, len1, count);
|
787
|
-
return takeObject(ret);
|
788
|
-
}
|
789
|
-
/**
|
790
|
-
* @param {string} device
|
791
|
-
* @param {string} pin
|
792
|
-
* @param {number} count
|
793
|
-
* @returns {Promise<any>}
|
794
|
-
*/
|
795
|
-
read_input_registers(device, pin, count) {
|
796
|
-
const ptr0 = passStringToWasm0(device, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
797
|
-
const len0 = WASM_VECTOR_LEN;
|
798
|
-
const ptr1 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
799
|
-
const len1 = WASM_VECTOR_LEN;
|
800
|
-
const ret = wasm.robot_read_input_registers(this.ptr, ptr0, len0, ptr1, len1, count);
|
801
|
-
return takeObject(ret);
|
802
|
-
}
|
803
|
-
/**
|
804
|
-
* @param {number | undefined} force
|
805
|
-
* @param {number | undefined} amplitude
|
806
|
-
* @returns {Promise<void>}
|
807
|
-
*/
|
808
|
-
set_claw(force, amplitude) {
|
809
|
-
const ret = wasm.robot_set_claw(this.ptr, !isLikeNone(force), isLikeNone(force) ? 0 : force, !isLikeNone(amplitude), isLikeNone(amplitude) ? 0 : amplitude);
|
810
|
-
return takeObject(ret);
|
811
|
-
}
|
812
|
-
/**
|
813
|
-
* @returns {Promise<any>}
|
814
|
-
*/
|
815
|
-
get_claw() {
|
816
|
-
const ret = wasm.robot_get_claw(this.ptr);
|
817
|
-
return takeObject(ret);
|
818
|
-
}
|
819
|
-
/**
|
820
|
-
* @returns {Promise<void>}
|
821
|
-
*/
|
822
|
-
start_sys() {
|
823
|
-
const ret = wasm.robot_start_sys(this.ptr);
|
824
|
-
return takeObject(ret);
|
825
|
-
}
|
826
|
-
/**
|
827
|
-
* @returns {Promise<void>}
|
828
|
-
*/
|
829
|
-
stop_sys() {
|
830
|
-
const ret = wasm.robot_stop_sys(this.ptr);
|
831
|
-
return takeObject(ret);
|
832
|
-
}
|
833
|
-
/**
|
834
|
-
* @returns {Promise<void>}
|
835
|
-
*/
|
836
|
-
powerdown() {
|
837
|
-
const ret = wasm.robot_powerdown(this.ptr);
|
838
|
-
return takeObject(ret);
|
839
|
-
}
|
840
|
-
/**
|
841
|
-
* @returns {Promise<void>}
|
842
|
-
*/
|
843
|
-
reboot() {
|
844
|
-
const ret = wasm.robot_reboot(this.ptr);
|
845
|
-
return takeObject(ret);
|
846
|
-
}
|
847
|
-
/**
|
848
|
-
* @returns {Promise<void>}
|
849
|
-
*/
|
850
|
-
stop() {
|
851
|
-
const ret = wasm.robot_stop(this.ptr);
|
852
|
-
return takeObject(ret);
|
853
|
-
}
|
854
|
-
/**
|
855
|
-
* @returns {Promise<void>}
|
856
|
-
*/
|
857
|
-
estop() {
|
858
|
-
const ret = wasm.robot_estop(this.ptr);
|
859
|
-
return takeObject(ret);
|
860
|
-
}
|
861
|
-
/**
|
862
|
-
* @param {string} name
|
863
|
-
* @param {string | undefined} dir
|
864
|
-
* @returns {Promise<any>}
|
865
|
-
*/
|
866
|
-
load_tcp(name, dir) {
|
867
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
868
|
-
const len0 = WASM_VECTOR_LEN;
|
869
|
-
var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
870
|
-
var len1 = WASM_VECTOR_LEN;
|
871
|
-
const ret = wasm.robot_load_tcp(this.ptr, ptr0, len0, ptr1, len1);
|
872
|
-
return takeObject(ret);
|
873
|
-
}
|
874
|
-
/**
|
875
|
-
* @param {any} pose
|
876
|
-
* @returns {Promise<void>}
|
877
|
-
*/
|
878
|
-
set_tcp(pose) {
|
879
|
-
const ret = wasm.robot_set_tcp(this.ptr, addHeapObject(pose));
|
880
|
-
return takeObject(ret);
|
881
|
-
}
|
882
|
-
/**
|
883
|
-
* @returns {Promise<any>}
|
884
|
-
*/
|
885
|
-
get_tcp() {
|
886
|
-
const ret = wasm.robot_get_tcp(this.ptr);
|
887
|
-
return takeObject(ret);
|
888
|
-
}
|
889
|
-
/**
|
890
|
-
* @param {number} speed_factor
|
891
|
-
* @returns {Promise<void>}
|
892
|
-
*/
|
893
|
-
set_velocity_factor(speed_factor) {
|
894
|
-
const ret = wasm.robot_set_velocity_factor(this.ptr, speed_factor);
|
895
|
-
return takeObject(ret);
|
896
|
-
}
|
897
|
-
/**
|
898
|
-
* @returns {Promise<number>}
|
899
|
-
*/
|
900
|
-
get_velocity_factor() {
|
901
|
-
const ret = wasm.robot_get_velocity_factor(this.ptr);
|
902
|
-
return takeObject(ret);
|
903
|
-
}
|
904
|
-
/**
|
905
|
-
* @param {string} name
|
906
|
-
* @param {string | undefined} dir
|
907
|
-
* @returns {Promise<any>}
|
908
|
-
*/
|
909
|
-
load_payload(name, dir) {
|
910
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
911
|
-
const len0 = WASM_VECTOR_LEN;
|
912
|
-
var ptr1 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
913
|
-
var len1 = WASM_VECTOR_LEN;
|
914
|
-
const ret = wasm.robot_load_payload(this.ptr, ptr0, len0, ptr1, len1);
|
915
|
-
return takeObject(ret);
|
916
|
-
}
|
917
|
-
/**
|
918
|
-
* @param {number | undefined} mass
|
919
|
-
* @param {any | undefined} cog
|
920
|
-
* @returns {Promise<void>}
|
921
|
-
*/
|
922
|
-
set_payload(mass, cog) {
|
923
|
-
const ret = wasm.robot_set_payload(this.ptr, !isLikeNone(mass), isLikeNone(mass) ? 0 : mass, isLikeNone(cog) ? 0 : addHeapObject(cog));
|
924
|
-
return takeObject(ret);
|
925
|
-
}
|
926
|
-
/**
|
927
|
-
* @returns {Promise<any>}
|
928
|
-
*/
|
929
|
-
get_payload() {
|
930
|
-
const ret = wasm.robot_get_payload(this.ptr);
|
931
|
-
return takeObject(ret);
|
932
|
-
}
|
933
|
-
/**
|
934
|
-
* @param {any} pose
|
935
|
-
* @returns {Promise<void>}
|
936
|
-
*/
|
937
|
-
set_gravity(pose) {
|
938
|
-
const ret = wasm.robot_set_gravity(this.ptr, addHeapObject(pose));
|
939
|
-
return takeObject(ret);
|
940
|
-
}
|
941
|
-
/**
|
942
|
-
* @returns {Promise<any>}
|
943
|
-
*/
|
944
|
-
get_gravity() {
|
945
|
-
const ret = wasm.robot_get_gravity(this.ptr);
|
946
|
-
return takeObject(ret);
|
947
|
-
}
|
948
|
-
}
|
949
|
-
module.exports.Robot = Robot;
|
950
|
-
/**
|
951
|
-
*/
|
952
|
-
class RobotSubscription {
|
953
|
-
|
954
|
-
static __wrap(ptr) {
|
955
|
-
const obj = Object.create(RobotSubscription.prototype);
|
956
|
-
obj.ptr = ptr;
|
957
|
-
|
958
|
-
return obj;
|
959
|
-
}
|
960
|
-
|
961
|
-
__destroy_into_raw() {
|
962
|
-
const ptr = this.ptr;
|
963
|
-
this.ptr = 0;
|
964
|
-
|
965
|
-
return ptr;
|
966
|
-
}
|
967
|
-
|
968
|
-
free() {
|
969
|
-
const ptr = this.__destroy_into_raw();
|
970
|
-
wasm.__wbg_robotsubscription_free(ptr);
|
971
|
-
}
|
972
|
-
/**
|
973
|
-
* @returns {Promise<string | undefined>}
|
974
|
-
*/
|
975
|
-
next() {
|
976
|
-
const ret = wasm.robotsubscription_next(this.ptr);
|
977
|
-
return takeObject(ret);
|
978
|
-
}
|
979
|
-
}
|
980
|
-
module.exports.RobotSubscription = RobotSubscription;
|
981
|
-
|
982
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
983
|
-
takeObject(arg0);
|
984
|
-
};
|
985
|
-
|
986
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
987
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
988
|
-
return addHeapObject(ret);
|
989
|
-
};
|
990
|
-
|
991
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
992
|
-
const ret = arg0;
|
993
|
-
return addHeapObject(ret);
|
994
|
-
};
|
995
|
-
|
996
|
-
module.exports.__wbg_robotsubscription_new = function(arg0) {
|
997
|
-
const ret = RobotSubscription.__wrap(arg0);
|
998
|
-
return addHeapObject(ret);
|
999
|
-
};
|
1000
|
-
|
1001
|
-
module.exports.__wbg_robot_new = function(arg0) {
|
1002
|
-
const ret = Robot.__wrap(arg0);
|
1003
|
-
return addHeapObject(ret);
|
1004
|
-
};
|
1005
|
-
|
1006
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
1007
|
-
const obj = getObject(arg1);
|
1008
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
1009
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1010
|
-
var len0 = WASM_VECTOR_LEN;
|
1011
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1012
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1013
|
-
};
|
1014
|
-
|
1015
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
1016
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1017
|
-
return addHeapObject(ret);
|
1018
|
-
};
|
1019
|
-
|
1020
|
-
module.exports.__wbindgen_cb_drop = function(arg0) {
|
1021
|
-
const obj = takeObject(arg0).original;
|
1022
|
-
if (obj.cnt-- == 1) {
|
1023
|
-
obj.a = 0;
|
1024
|
-
return true;
|
1025
|
-
}
|
1026
|
-
const ret = false;
|
1027
|
-
return ret;
|
1028
|
-
};
|
1029
|
-
|
1030
|
-
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
1031
|
-
const obj = getObject(arg1);
|
1032
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
1033
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
1034
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1035
|
-
};
|
1036
|
-
|
1037
|
-
module.exports.__wbindgen_boolean_get = function(arg0) {
|
1038
|
-
const v = getObject(arg0);
|
1039
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1040
|
-
return ret;
|
1041
|
-
};
|
1042
|
-
|
1043
|
-
module.exports.__wbindgen_is_bigint = function(arg0) {
|
1044
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
1045
|
-
return ret;
|
1046
|
-
};
|
1047
|
-
|
1048
|
-
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
1049
|
-
const ret = arg0;
|
1050
|
-
return addHeapObject(ret);
|
1051
|
-
};
|
1052
|
-
|
1053
|
-
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
1054
|
-
const ret = getObject(arg0) === getObject(arg1);
|
1055
|
-
return ret;
|
1056
|
-
};
|
1057
|
-
|
1058
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
1059
|
-
const val = getObject(arg0);
|
1060
|
-
const ret = typeof(val) === 'object' && val !== null;
|
1061
|
-
return ret;
|
1062
|
-
};
|
1063
|
-
|
1064
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
1065
|
-
const ret = getObject(arg0) in getObject(arg1);
|
1066
|
-
return ret;
|
1067
|
-
};
|
1068
|
-
|
1069
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
1070
|
-
const ret = BigInt.asUintN(64, arg0);
|
1071
|
-
return addHeapObject(ret);
|
1072
|
-
};
|
1073
|
-
|
1074
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
1075
|
-
const ret = getObject(arg0) === undefined;
|
1076
|
-
return ret;
|
1077
|
-
};
|
1078
|
-
|
1079
|
-
module.exports.__wbindgen_is_string = function(arg0) {
|
1080
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
1081
|
-
return ret;
|
1082
|
-
};
|
1083
|
-
|
1084
|
-
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
1085
|
-
const ret = getObject(arg0);
|
1086
|
-
return addHeapObject(ret);
|
1087
|
-
};
|
1088
|
-
|
1089
|
-
module.exports.__wbg_addEventListener_cbe4c6f619b032f3 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
1090
|
-
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
1091
|
-
}, arguments) };
|
1092
|
-
|
1093
|
-
module.exports.__wbg_addEventListener_1fc744729ac6dc27 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
1094
|
-
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
|
1095
|
-
}, arguments) };
|
1096
|
-
|
1097
|
-
module.exports.__wbg_dispatchEvent_9c61816a838ce0ce = function() { return handleError(function (arg0, arg1) {
|
1098
|
-
const ret = getObject(arg0).dispatchEvent(getObject(arg1));
|
1099
|
-
return ret;
|
1100
|
-
}, arguments) };
|
1101
|
-
|
1102
|
-
module.exports.__wbg_removeEventListener_dd20475efce70084 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
1103
|
-
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
1104
|
-
}, arguments) };
|
1105
|
-
|
1106
|
-
module.exports.__wbg_wasClean_2af04e6cf2076497 = function(arg0) {
|
1107
|
-
const ret = getObject(arg0).wasClean;
|
1108
|
-
return ret;
|
1109
|
-
};
|
1110
|
-
|
1111
|
-
module.exports.__wbg_code_24e161f043adce8a = function(arg0) {
|
1112
|
-
const ret = getObject(arg0).code;
|
1113
|
-
return ret;
|
1114
|
-
};
|
1115
|
-
|
1116
|
-
module.exports.__wbg_reason_40159cc3d2fc655d = function(arg0, arg1) {
|
1117
|
-
const ret = getObject(arg1).reason;
|
1118
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1119
|
-
const len0 = WASM_VECTOR_LEN;
|
1120
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1121
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1122
|
-
};
|
1123
|
-
|
1124
|
-
module.exports.__wbg_newwitheventinitdict_36f3576f1bff6dbc = function() { return handleError(function (arg0, arg1, arg2) {
|
1125
|
-
const ret = new CloseEvent(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
1126
|
-
return addHeapObject(ret);
|
1127
|
-
}, arguments) };
|
1128
|
-
|
1129
|
-
module.exports.__wbg_readyState_9c0f66433e329c9e = function(arg0) {
|
1130
|
-
const ret = getObject(arg0).readyState;
|
1131
|
-
return ret;
|
1132
|
-
};
|
1133
|
-
|
1134
|
-
module.exports.__wbg_setbinaryType_ee55743ddf4beb37 = function(arg0, arg1) {
|
1135
|
-
getObject(arg0).binaryType = takeObject(arg1);
|
1136
|
-
};
|
1137
|
-
|
1138
|
-
module.exports.__wbg_new_d29e507f6606de91 = function() { return handleError(function (arg0, arg1) {
|
1139
|
-
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
1140
|
-
return addHeapObject(ret);
|
1141
|
-
}, arguments) };
|
1142
|
-
|
1143
|
-
module.exports.__wbg_close_45d053bea59e7746 = function() { return handleError(function (arg0) {
|
1144
|
-
getObject(arg0).close();
|
1145
|
-
}, arguments) };
|
1146
|
-
|
1147
|
-
module.exports.__wbg_send_80b256d87a6779e5 = function() { return handleError(function (arg0, arg1, arg2) {
|
1148
|
-
getObject(arg0).send(getStringFromWasm0(arg1, arg2));
|
1149
|
-
}, arguments) };
|
1150
|
-
|
1151
|
-
module.exports.__wbg_send_640853f8eb0f0385 = function() { return handleError(function (arg0, arg1, arg2) {
|
1152
|
-
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
|
1153
|
-
}, arguments) };
|
1154
|
-
|
1155
|
-
module.exports.__wbg_data_7b1f01f4e6a64fbe = function(arg0) {
|
1156
|
-
const ret = getObject(arg0).data;
|
1157
|
-
return addHeapObject(ret);
|
1158
|
-
};
|
1159
|
-
|
1160
|
-
module.exports.__wbg_clearTimeout_23ee6db72c0ad922 = typeof clearTimeout == 'function' ? clearTimeout : notDefined('clearTimeout');
|
1161
|
-
|
1162
|
-
module.exports.__wbg_setTimeout_09074a1669d0f224 = function() { return handleError(function (arg0, arg1) {
|
1163
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
1164
|
-
return ret;
|
1165
|
-
}, arguments) };
|
1166
|
-
|
1167
|
-
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
1168
|
-
const ret = getObject(arg0) == getObject(arg1);
|
1169
|
-
return ret;
|
1170
|
-
};
|
1171
|
-
|
1172
|
-
module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
1173
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
1174
|
-
return addHeapObject(ret);
|
1175
|
-
};
|
1176
|
-
|
1177
|
-
module.exports.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
1178
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
1179
|
-
};
|
1180
|
-
|
1181
|
-
module.exports.__wbg_get_57245cc7d7c7619d = function(arg0, arg1) {
|
1182
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
1183
|
-
return addHeapObject(ret);
|
1184
|
-
};
|
1185
|
-
|
1186
|
-
module.exports.__wbg_length_6e3bbe7c8bd4dbd8 = function(arg0) {
|
1187
|
-
const ret = getObject(arg0).length;
|
1188
|
-
return ret;
|
1189
|
-
};
|
1190
|
-
|
1191
|
-
module.exports.__wbg_new_1d9a920c6bfc44a8 = function() {
|
1192
|
-
const ret = new Array();
|
1193
|
-
return addHeapObject(ret);
|
1194
|
-
};
|
1195
|
-
|
1196
|
-
module.exports.__wbindgen_is_function = function(arg0) {
|
1197
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
1198
|
-
return ret;
|
1199
|
-
};
|
1200
|
-
|
1201
|
-
module.exports.__wbg_next_579e583d33566a86 = function(arg0) {
|
1202
|
-
const ret = getObject(arg0).next;
|
1203
|
-
return addHeapObject(ret);
|
1204
|
-
};
|
1205
|
-
|
1206
|
-
module.exports.__wbg_next_aaef7c8aa5e212ac = function() { return handleError(function (arg0) {
|
1207
|
-
const ret = getObject(arg0).next();
|
1208
|
-
return addHeapObject(ret);
|
1209
|
-
}, arguments) };
|
1210
|
-
|
1211
|
-
module.exports.__wbg_done_1b73b0672e15f234 = function(arg0) {
|
1212
|
-
const ret = getObject(arg0).done;
|
1213
|
-
return ret;
|
1214
|
-
};
|
1215
|
-
|
1216
|
-
module.exports.__wbg_value_1ccc36bc03462d71 = function(arg0) {
|
1217
|
-
const ret = getObject(arg0).value;
|
1218
|
-
return addHeapObject(ret);
|
1219
|
-
};
|
1220
|
-
|
1221
|
-
module.exports.__wbg_iterator_6f9d4f28845f426c = function() {
|
1222
|
-
const ret = Symbol.iterator;
|
1223
|
-
return addHeapObject(ret);
|
1224
|
-
};
|
1225
|
-
|
1226
|
-
module.exports.__wbg_get_765201544a2b6869 = function() { return handleError(function (arg0, arg1) {
|
1227
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
1228
|
-
return addHeapObject(ret);
|
1229
|
-
}, arguments) };
|
1230
|
-
|
1231
|
-
module.exports.__wbg_call_97ae9d8645dc388b = function() { return handleError(function (arg0, arg1) {
|
1232
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
1233
|
-
return addHeapObject(ret);
|
1234
|
-
}, arguments) };
|
1235
|
-
|
1236
|
-
module.exports.__wbg_new_0b9bfdd97583284e = function() {
|
1237
|
-
const ret = new Object();
|
1238
|
-
return addHeapObject(ret);
|
1239
|
-
};
|
1240
|
-
|
1241
|
-
module.exports.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
|
1242
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
1243
|
-
};
|
1244
|
-
|
1245
|
-
module.exports.__wbg_isArray_27c46c67f498e15d = function(arg0) {
|
1246
|
-
const ret = Array.isArray(getObject(arg0));
|
1247
|
-
return ret;
|
1248
|
-
};
|
1249
|
-
|
1250
|
-
module.exports.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b = function(arg0) {
|
1251
|
-
let result;
|
1252
|
-
try {
|
1253
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
1254
|
-
} catch {
|
1255
|
-
result = false;
|
1256
|
-
}
|
1257
|
-
const ret = result;
|
1258
|
-
return ret;
|
1259
|
-
};
|
1260
|
-
|
1261
|
-
module.exports.__wbg_instanceof_Error_56b496a10a56de66 = function(arg0) {
|
1262
|
-
let result;
|
1263
|
-
try {
|
1264
|
-
result = getObject(arg0) instanceof Error;
|
1265
|
-
} catch {
|
1266
|
-
result = false;
|
1267
|
-
}
|
1268
|
-
const ret = result;
|
1269
|
-
return ret;
|
1270
|
-
};
|
1271
|
-
|
1272
|
-
module.exports.__wbg_message_fe2af63ccc8985bc = function(arg0) {
|
1273
|
-
const ret = getObject(arg0).message;
|
1274
|
-
return addHeapObject(ret);
|
1275
|
-
};
|
1276
|
-
|
1277
|
-
module.exports.__wbg_name_48eda3ae6aa697ca = function(arg0) {
|
1278
|
-
const ret = getObject(arg0).name;
|
1279
|
-
return addHeapObject(ret);
|
1280
|
-
};
|
1281
|
-
|
1282
|
-
module.exports.__wbg_toString_73c9b562dccf34bd = function(arg0) {
|
1283
|
-
const ret = getObject(arg0).toString();
|
1284
|
-
return addHeapObject(ret);
|
1285
|
-
};
|
1286
|
-
|
1287
|
-
module.exports.__wbg_call_168da88779e35f61 = function() { return handleError(function (arg0, arg1, arg2) {
|
1288
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
1289
|
-
return addHeapObject(ret);
|
1290
|
-
}, arguments) };
|
1291
|
-
|
1292
|
-
module.exports.__wbg_isSafeInteger_dfa0593e8d7ac35a = function(arg0) {
|
1293
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
1294
|
-
return ret;
|
1295
|
-
};
|
1296
|
-
|
1297
|
-
module.exports.__wbg_entries_65a76a413fc91037 = function(arg0) {
|
1298
|
-
const ret = Object.entries(getObject(arg0));
|
1299
|
-
return addHeapObject(ret);
|
1300
|
-
};
|
1301
|
-
|
1302
|
-
module.exports.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
1303
|
-
try {
|
1304
|
-
var state0 = {a: arg0, b: arg1};
|
1305
|
-
var cb0 = (arg0, arg1) => {
|
1306
|
-
const a = state0.a;
|
1307
|
-
state0.a = 0;
|
1308
|
-
try {
|
1309
|
-
return __wbg_adapter_211(a, state0.b, arg0, arg1);
|
1310
|
-
} finally {
|
1311
|
-
state0.a = a;
|
1312
|
-
}
|
1313
|
-
};
|
1314
|
-
const ret = new Promise(cb0);
|
1315
|
-
return addHeapObject(ret);
|
1316
|
-
} finally {
|
1317
|
-
state0.a = state0.b = 0;
|
1318
|
-
}
|
1319
|
-
};
|
1320
|
-
|
1321
|
-
module.exports.__wbg_resolve_99fe17964f31ffc0 = function(arg0) {
|
1322
|
-
const ret = Promise.resolve(getObject(arg0));
|
1323
|
-
return addHeapObject(ret);
|
1324
|
-
};
|
1325
|
-
|
1326
|
-
module.exports.__wbg_then_11f7a54d67b4bfad = function(arg0, arg1) {
|
1327
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
1328
|
-
return addHeapObject(ret);
|
1329
|
-
};
|
1330
|
-
|
1331
|
-
module.exports.__wbg_buffer_3f3d764d4747d564 = function(arg0) {
|
1332
|
-
const ret = getObject(arg0).buffer;
|
1333
|
-
return addHeapObject(ret);
|
1334
|
-
};
|
1335
|
-
|
1336
|
-
module.exports.__wbg_new_8c3f0052272a457a = function(arg0) {
|
1337
|
-
const ret = new Uint8Array(getObject(arg0));
|
1338
|
-
return addHeapObject(ret);
|
1339
|
-
};
|
1340
|
-
|
1341
|
-
module.exports.__wbg_set_83db9690f9353e79 = function(arg0, arg1, arg2) {
|
1342
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
1343
|
-
};
|
1344
|
-
|
1345
|
-
module.exports.__wbg_length_9e1ae1900cb0fbd5 = function(arg0) {
|
1346
|
-
const ret = getObject(arg0).length;
|
1347
|
-
return ret;
|
1348
|
-
};
|
1349
|
-
|
1350
|
-
module.exports.__wbg_instanceof_Uint8Array_971eeda69eb75003 = function(arg0) {
|
1351
|
-
let result;
|
1352
|
-
try {
|
1353
|
-
result = getObject(arg0) instanceof Uint8Array;
|
1354
|
-
} catch {
|
1355
|
-
result = false;
|
1356
|
-
}
|
1357
|
-
const ret = result;
|
1358
|
-
return ret;
|
1359
|
-
};
|
1360
|
-
|
1361
|
-
module.exports.__wbg_set_bf3f89b92d5a34bf = function() { return handleError(function (arg0, arg1, arg2) {
|
1362
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
1363
|
-
return ret;
|
1364
|
-
}, arguments) };
|
1365
|
-
|
1366
|
-
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
1367
|
-
const v = getObject(arg1);
|
1368
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
1369
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0n : ret;
|
1370
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1371
|
-
};
|
1372
|
-
|
1373
|
-
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
1374
|
-
const ret = debugString(getObject(arg1));
|
1375
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1376
|
-
const len0 = WASM_VECTOR_LEN;
|
1377
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1378
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1379
|
-
};
|
1380
|
-
|
1381
|
-
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
1382
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
1383
|
-
};
|
1384
|
-
|
1385
|
-
module.exports.__wbindgen_memory = function() {
|
1386
|
-
const ret = wasm.memory;
|
1387
|
-
return addHeapObject(ret);
|
1388
|
-
};
|
1389
|
-
|
1390
|
-
module.exports.__wbindgen_closure_wrapper1409 = function(arg0, arg1, arg2) {
|
1391
|
-
const ret = makeMutClosure(arg0, arg1, 532, __wbg_adapter_48);
|
1392
|
-
return addHeapObject(ret);
|
1393
|
-
};
|
1394
|
-
|
1395
|
-
module.exports.__wbindgen_closure_wrapper1411 = function(arg0, arg1, arg2) {
|
1396
|
-
const ret = makeMutClosure(arg0, arg1, 532, __wbg_adapter_48);
|
1397
|
-
return addHeapObject(ret);
|
1398
|
-
};
|
1399
|
-
|
1400
|
-
module.exports.__wbindgen_closure_wrapper1413 = function(arg0, arg1, arg2) {
|
1401
|
-
const ret = makeMutClosure(arg0, arg1, 532, __wbg_adapter_48);
|
1402
|
-
return addHeapObject(ret);
|
1403
|
-
};
|
1404
|
-
|
1405
|
-
module.exports.__wbindgen_closure_wrapper1415 = function(arg0, arg1, arg2) {
|
1406
|
-
const ret = makeMutClosure(arg0, arg1, 532, __wbg_adapter_55);
|
1407
|
-
return addHeapObject(ret);
|
1408
|
-
};
|
1409
|
-
|
1410
|
-
module.exports.__wbindgen_closure_wrapper1884 = function(arg0, arg1, arg2) {
|
1411
|
-
const ret = makeMutClosure(arg0, arg1, 625, __wbg_adapter_58);
|
1412
|
-
return addHeapObject(ret);
|
1413
|
-
};
|
1414
|
-
|
1415
|
-
module.exports.__wbindgen_closure_wrapper1918 = function(arg0, arg1, arg2) {
|
1416
|
-
const ret = makeMutClosure(arg0, arg1, 639, __wbg_adapter_61);
|
1417
|
-
return addHeapObject(ret);
|
1418
|
-
};
|
1419
|
-
|
1420
|
-
const path = require('path').join(__dirname, 'lebai_sdk_bg.wasm');
|
1421
|
-
const bytes = require('fs').readFileSync(path);
|
1422
|
-
|
1423
|
-
const wasmModule = new WebAssembly.Module(bytes);
|
1424
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
1425
|
-
wasm = wasmInstance.exports;
|
1426
|
-
module.exports.__wasm = wasm;
|
1427
|
-
|
1
|
+
import * as wasm from "./lebai_sdk_bg.wasm";
|
2
|
+
export * from "./lebai_sdk_bg.js";
|