buttplug 1.0.13 → 1.0.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/CHANGELOG.md +29 -0
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi.d.ts +9 -4
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi.js +2 -2
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg.js +6 -630
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg.wasm +0 -0
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg.wasm.d.ts +6 -6
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg_node.js +799 -0
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg_web.js +788 -0
- package/dist/module/buttplug_ffi.d.ts +2 -1
- package/dist/module/buttplug_ffi.js +2747 -2105
- package/dist/module/client.d.ts +2 -2
- package/dist/module/client.js +13 -13
- package/dist/module/client.js.map +1 -1
- package/dist/module/connectors.d.ts +2 -2
- package/dist/module/connectors.js +19 -14
- package/dist/module/connectors.js.map +1 -1
- package/dist/module/device.d.ts +4 -3
- package/dist/module/device.js +15 -14
- package/dist/module/device.js.map +1 -1
- package/dist/module/errors.d.ts +1 -1
- package/dist/module/errors.js +1 -1
- package/dist/module/errors.js.map +1 -1
- package/dist/module/ffi.d.ts +19 -19
- package/dist/module/ffi.js +52 -47
- package/dist/module/ffi.js.map +1 -1
- package/dist/module/index.d.ts +8 -8
- package/dist/module/index.js +8 -6
- package/dist/module/index.js.map +1 -1
- package/dist/module/sorter.d.ts +1 -1
- package/dist/module/sorter.js +1 -1
- package/dist/module/sorter.js.map +1 -1
- package/dist/module/web_index.d.ts +1 -1
- package/dist/module/web_index.js +1 -1
- package/dist/module/web_index.js.map +1 -1
- package/dist/web/0.buttplug.js +663 -384
- package/dist/web/1.buttplug.min.js +1 -1
- package/dist/web/1.buttplug.min.js.map +1 -1
- package/dist/web/b0219b34bc18e1ad0240.module.wasm +0 -0
- package/dist/web/buttplug.js +825 -740
- package/dist/web/buttplug.min.js +8 -8
- package/dist/web/buttplug.min.js.map +1 -1
- package/dist/web/e5566a8b6a3fda978549.module.wasm +0 -0
- package/index.html +6 -10
- package/package.json +28 -17
- package/tsconfig.json +0 -1
- package/{webpack.base.js → webpack.base.cjs} +30 -6
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi.js.map +0 -1
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg.d.ts +0 -117
- package/dist/module/buttplug-rs-ffi/buttplug_rs_ffi_bg.js.map +0 -1
- package/dist/module/buttplug_ffi.js.map +0 -1
- package/dist/web/17a5dc1db11d74b795d7.module.wasm +0 -0
- package/dist/web/7cd0851698bfb0cd22ea.module.wasm +0 -0
|
@@ -1,630 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (idx < 36)
|
|
8
|
-
return;
|
|
9
|
-
heap[idx] = heap_next;
|
|
10
|
-
heap_next = idx;
|
|
11
|
-
}
|
|
12
|
-
function takeObject(idx) {
|
|
13
|
-
const ret = getObject(idx);
|
|
14
|
-
dropObject(idx);
|
|
15
|
-
return ret;
|
|
16
|
-
}
|
|
17
|
-
function addHeapObject(obj) {
|
|
18
|
-
if (heap_next === heap.length)
|
|
19
|
-
heap.push(heap.length + 1);
|
|
20
|
-
const idx = heap_next;
|
|
21
|
-
heap_next = heap[idx];
|
|
22
|
-
heap[idx] = obj;
|
|
23
|
-
return idx;
|
|
24
|
-
}
|
|
25
|
-
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
26
|
-
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
27
|
-
cachedTextDecoder.decode();
|
|
28
|
-
let cachegetUint8Memory0 = null;
|
|
29
|
-
function getUint8Memory0() {
|
|
30
|
-
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
31
|
-
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
32
|
-
}
|
|
33
|
-
return cachegetUint8Memory0;
|
|
34
|
-
}
|
|
35
|
-
function getStringFromWasm0(ptr, len) {
|
|
36
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
37
|
-
}
|
|
38
|
-
let WASM_VECTOR_LEN = 0;
|
|
39
|
-
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
40
|
-
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
41
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
42
|
-
? function (arg, view) {
|
|
43
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
44
|
-
}
|
|
45
|
-
: function (arg, view) {
|
|
46
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
47
|
-
view.set(buf);
|
|
48
|
-
return {
|
|
49
|
-
read: arg.length,
|
|
50
|
-
written: buf.length
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
54
|
-
if (realloc === undefined) {
|
|
55
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
56
|
-
const ptr = malloc(buf.length);
|
|
57
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
58
|
-
WASM_VECTOR_LEN = buf.length;
|
|
59
|
-
return ptr;
|
|
60
|
-
}
|
|
61
|
-
let len = arg.length;
|
|
62
|
-
let ptr = malloc(len);
|
|
63
|
-
const mem = getUint8Memory0();
|
|
64
|
-
let offset = 0;
|
|
65
|
-
for (; offset < len; offset++) {
|
|
66
|
-
const code = arg.charCodeAt(offset);
|
|
67
|
-
if (code > 0x7F)
|
|
68
|
-
break;
|
|
69
|
-
mem[ptr + offset] = code;
|
|
70
|
-
}
|
|
71
|
-
if (offset !== len) {
|
|
72
|
-
if (offset !== 0) {
|
|
73
|
-
arg = arg.slice(offset);
|
|
74
|
-
}
|
|
75
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
76
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
77
|
-
const ret = encodeString(arg, view);
|
|
78
|
-
offset += ret.written;
|
|
79
|
-
}
|
|
80
|
-
WASM_VECTOR_LEN = offset;
|
|
81
|
-
return ptr;
|
|
82
|
-
}
|
|
83
|
-
function isLikeNone(x) {
|
|
84
|
-
return x === undefined || x === null;
|
|
85
|
-
}
|
|
86
|
-
let cachegetInt32Memory0 = null;
|
|
87
|
-
function getInt32Memory0() {
|
|
88
|
-
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
89
|
-
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
90
|
-
}
|
|
91
|
-
return cachegetInt32Memory0;
|
|
92
|
-
}
|
|
93
|
-
function debugString(val) {
|
|
94
|
-
// primitive types
|
|
95
|
-
const type = typeof val;
|
|
96
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
97
|
-
return `${val}`;
|
|
98
|
-
}
|
|
99
|
-
if (type == 'string') {
|
|
100
|
-
return `"${val}"`;
|
|
101
|
-
}
|
|
102
|
-
if (type == 'symbol') {
|
|
103
|
-
const description = val.description;
|
|
104
|
-
if (description == null) {
|
|
105
|
-
return 'Symbol';
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
return `Symbol(${description})`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (type == 'function') {
|
|
112
|
-
const name = val.name;
|
|
113
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
114
|
-
return `Function(${name})`;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
return 'Function';
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
// objects
|
|
121
|
-
if (Array.isArray(val)) {
|
|
122
|
-
const length = val.length;
|
|
123
|
-
let debug = '[';
|
|
124
|
-
if (length > 0) {
|
|
125
|
-
debug += debugString(val[0]);
|
|
126
|
-
}
|
|
127
|
-
for (let i = 1; i < length; i++) {
|
|
128
|
-
debug += ', ' + debugString(val[i]);
|
|
129
|
-
}
|
|
130
|
-
debug += ']';
|
|
131
|
-
return debug;
|
|
132
|
-
}
|
|
133
|
-
// Test for built-in
|
|
134
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
135
|
-
let className;
|
|
136
|
-
if (builtInMatches.length > 1) {
|
|
137
|
-
className = builtInMatches[1];
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
// Failed to match the standard '[object ClassName]'
|
|
141
|
-
return toString.call(val);
|
|
142
|
-
}
|
|
143
|
-
if (className == 'Object') {
|
|
144
|
-
// we're a user defined class or Object
|
|
145
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
146
|
-
// easier than looping through ownProperties of `val`.
|
|
147
|
-
try {
|
|
148
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
149
|
-
}
|
|
150
|
-
catch (_) {
|
|
151
|
-
return 'Object';
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
// errors
|
|
155
|
-
if (val instanceof Error) {
|
|
156
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
157
|
-
}
|
|
158
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
159
|
-
return className;
|
|
160
|
-
}
|
|
161
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
162
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
163
|
-
const real = (...args) => {
|
|
164
|
-
// First up with a closure we increment the internal reference
|
|
165
|
-
// count. This ensures that the Rust closure environment won't
|
|
166
|
-
// be deallocated while we're invoking it.
|
|
167
|
-
state.cnt++;
|
|
168
|
-
const a = state.a;
|
|
169
|
-
state.a = 0;
|
|
170
|
-
try {
|
|
171
|
-
return f(a, state.b, ...args);
|
|
172
|
-
}
|
|
173
|
-
finally {
|
|
174
|
-
if (--state.cnt === 0) {
|
|
175
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
state.a = a;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
real.original = state;
|
|
183
|
-
return real;
|
|
184
|
-
}
|
|
185
|
-
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
186
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0b764fa99a83aa89(arg0, arg1, addHeapObject(arg2));
|
|
187
|
-
}
|
|
188
|
-
function __wbg_adapter_25(arg0, arg1, arg2) {
|
|
189
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0b764fa99a83aa89(arg0, arg1, addHeapObject(arg2));
|
|
190
|
-
}
|
|
191
|
-
function __wbg_adapter_28(arg0, arg1, arg2) {
|
|
192
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0b764fa99a83aa89(arg0, arg1, addHeapObject(arg2));
|
|
193
|
-
}
|
|
194
|
-
function __wbg_adapter_31(arg0, arg1, arg2) {
|
|
195
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0b764fa99a83aa89(arg0, arg1, addHeapObject(arg2));
|
|
196
|
-
}
|
|
197
|
-
function __wbg_adapter_34(arg0, arg1, arg2) {
|
|
198
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab1e0ecd8ff83e01(arg0, arg1, addHeapObject(arg2));
|
|
199
|
-
}
|
|
200
|
-
function __wbg_adapter_37(arg0, arg1) {
|
|
201
|
-
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1e3b60da244339a5(arg0, arg1);
|
|
202
|
-
}
|
|
203
|
-
let stack_pointer = 32;
|
|
204
|
-
function addBorrowedObject(obj) {
|
|
205
|
-
if (stack_pointer == 1)
|
|
206
|
-
throw new Error('out of js stack');
|
|
207
|
-
heap[--stack_pointer] = obj;
|
|
208
|
-
return stack_pointer;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* @param {Function} callback
|
|
212
|
-
* @param {string} client_name
|
|
213
|
-
* @returns {number}
|
|
214
|
-
*/
|
|
215
|
-
export function buttplug_create_client(callback, client_name) {
|
|
216
|
-
try {
|
|
217
|
-
var ptr0 = passStringToWasm0(client_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
218
|
-
var len0 = WASM_VECTOR_LEN;
|
|
219
|
-
var ret = wasm.buttplug_create_client(addBorrowedObject(callback), ptr0, len0);
|
|
220
|
-
return ret;
|
|
221
|
-
}
|
|
222
|
-
finally {
|
|
223
|
-
heap[stack_pointer++] = undefined;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* @param {number} ptr
|
|
228
|
-
*/
|
|
229
|
-
export function buttplug_free_client(ptr) {
|
|
230
|
-
wasm.buttplug_free_client(ptr);
|
|
231
|
-
}
|
|
232
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
233
|
-
const ptr = malloc(arg.length * 1);
|
|
234
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
235
|
-
WASM_VECTOR_LEN = arg.length;
|
|
236
|
-
return ptr;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* @param {number} client_ptr
|
|
240
|
-
* @param {Uint8Array} buf
|
|
241
|
-
*/
|
|
242
|
-
export function buttplug_parse_client_message(client_ptr, buf) {
|
|
243
|
-
var ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
|
|
244
|
-
var len0 = WASM_VECTOR_LEN;
|
|
245
|
-
wasm.buttplug_parse_client_message(client_ptr, ptr0, len0);
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* @param {number} client_ptr
|
|
249
|
-
* @param {number} device_index
|
|
250
|
-
* @returns {number}
|
|
251
|
-
*/
|
|
252
|
-
export function buttplug_create_device(client_ptr, device_index) {
|
|
253
|
-
var ret = wasm.buttplug_create_device(client_ptr, device_index);
|
|
254
|
-
return ret;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* @param {number} device_ptr
|
|
258
|
-
* @param {Uint8Array} buf
|
|
259
|
-
*/
|
|
260
|
-
export function buttplug_parse_device_message(device_ptr, buf) {
|
|
261
|
-
var ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
|
|
262
|
-
var len0 = WASM_VECTOR_LEN;
|
|
263
|
-
wasm.buttplug_parse_device_message(device_ptr, ptr0, len0);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* @param {number} ptr
|
|
267
|
-
*/
|
|
268
|
-
export function buttplug_free_device(ptr) {
|
|
269
|
-
wasm.buttplug_free_device(ptr);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* @param {string} max_level
|
|
273
|
-
*/
|
|
274
|
-
export function buttplug_activate_env_logger(max_level) {
|
|
275
|
-
var ptr0 = passStringToWasm0(max_level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
276
|
-
var len0 = WASM_VECTOR_LEN;
|
|
277
|
-
wasm.buttplug_activate_env_logger(ptr0, len0);
|
|
278
|
-
}
|
|
279
|
-
function handleError(f) {
|
|
280
|
-
return function () {
|
|
281
|
-
try {
|
|
282
|
-
return f.apply(this, arguments);
|
|
283
|
-
}
|
|
284
|
-
catch (e) {
|
|
285
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
290
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
291
|
-
}
|
|
292
|
-
export const __wbindgen_object_drop_ref = function (arg0) {
|
|
293
|
-
takeObject(arg0);
|
|
294
|
-
};
|
|
295
|
-
export const __wbindgen_object_clone_ref = function (arg0) {
|
|
296
|
-
var ret = getObject(arg0);
|
|
297
|
-
return addHeapObject(ret);
|
|
298
|
-
};
|
|
299
|
-
export const __wbg_log_e6bbcfdff8337573 = function (arg0, arg1) {
|
|
300
|
-
console.log(getStringFromWasm0(arg0, arg1));
|
|
301
|
-
};
|
|
302
|
-
export const __wbindgen_string_new = function (arg0, arg1) {
|
|
303
|
-
var ret = getStringFromWasm0(arg0, arg1);
|
|
304
|
-
return addHeapObject(ret);
|
|
305
|
-
};
|
|
306
|
-
export const __wbindgen_cb_drop = function (arg0) {
|
|
307
|
-
const obj = takeObject(arg0).original;
|
|
308
|
-
if (obj.cnt-- == 1) {
|
|
309
|
-
obj.a = 0;
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
var ret = false;
|
|
313
|
-
return ret;
|
|
314
|
-
};
|
|
315
|
-
export const __wbg_new_59cb74e423758ede = function () {
|
|
316
|
-
var ret = new Error();
|
|
317
|
-
return addHeapObject(ret);
|
|
318
|
-
};
|
|
319
|
-
export const __wbg_stack_558ba5917b466edd = function (arg0, arg1) {
|
|
320
|
-
var ret = getObject(arg1).stack;
|
|
321
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
322
|
-
var len0 = WASM_VECTOR_LEN;
|
|
323
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
324
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
325
|
-
};
|
|
326
|
-
export const __wbg_error_4bb6c2a97407129a = function (arg0, arg1) {
|
|
327
|
-
try {
|
|
328
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
329
|
-
}
|
|
330
|
-
finally {
|
|
331
|
-
wasm.__wbindgen_free(arg0, arg1);
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
export const __wbg_log_b7dcb3facc73166d = function (arg0, arg1) {
|
|
335
|
-
console.log(getStringFromWasm0(arg0, arg1));
|
|
336
|
-
};
|
|
337
|
-
export const __wbg_log_96295d68ab8338df = function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
338
|
-
console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
339
|
-
};
|
|
340
|
-
export const __wbg_mark_55c5ecfe509deb6a = function (arg0, arg1) {
|
|
341
|
-
performance.mark(getStringFromWasm0(arg0, arg1));
|
|
342
|
-
};
|
|
343
|
-
export const __wbg_measure_608563106d70d48a = function (arg0, arg1, arg2, arg3) {
|
|
344
|
-
performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
345
|
-
};
|
|
346
|
-
export const __wbg_Window_f826a1dec163bacb = function (arg0) {
|
|
347
|
-
var ret = getObject(arg0).Window;
|
|
348
|
-
return addHeapObject(ret);
|
|
349
|
-
};
|
|
350
|
-
export const __wbindgen_is_undefined = function (arg0) {
|
|
351
|
-
var ret = getObject(arg0) === undefined;
|
|
352
|
-
return ret;
|
|
353
|
-
};
|
|
354
|
-
export const __wbg_WorkerGlobalScope_967d186155183d38 = function (arg0) {
|
|
355
|
-
var ret = getObject(arg0).WorkerGlobalScope;
|
|
356
|
-
return addHeapObject(ret);
|
|
357
|
-
};
|
|
358
|
-
export const __wbg_instanceof_Window_5993230e7331f098 = function (arg0) {
|
|
359
|
-
var ret = getObject(arg0) instanceof Window;
|
|
360
|
-
return ret;
|
|
361
|
-
};
|
|
362
|
-
export const __wbg_navigator_da501e0baab77d64 = function (arg0) {
|
|
363
|
-
var ret = getObject(arg0).navigator;
|
|
364
|
-
return addHeapObject(ret);
|
|
365
|
-
};
|
|
366
|
-
export const __wbg_clearTimeout_4fe71f721d0606af = function (arg0, arg1) {
|
|
367
|
-
getObject(arg0).clearTimeout(arg1);
|
|
368
|
-
};
|
|
369
|
-
export const __wbg_setTimeout_d75246e77e993c5d = handleError(function (arg0, arg1, arg2) {
|
|
370
|
-
var ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
371
|
-
return ret;
|
|
372
|
-
});
|
|
373
|
-
export const __wbg_getCharacteristic_c7f9dcc72f7a86f6 = function (arg0, arg1, arg2) {
|
|
374
|
-
var ret = getObject(arg0).getCharacteristic(getStringFromWasm0(arg1, arg2));
|
|
375
|
-
return addHeapObject(ret);
|
|
376
|
-
};
|
|
377
|
-
export const __wbg_value_ce5e4fe742d36a1c = function (arg0) {
|
|
378
|
-
var ret = getObject(arg0).value;
|
|
379
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
380
|
-
};
|
|
381
|
-
export const __wbg_setoncharacteristicvaluechanged_ece60eda828cb0ef = function (arg0, arg1) {
|
|
382
|
-
getObject(arg0).oncharacteristicvaluechanged = getObject(arg1);
|
|
383
|
-
};
|
|
384
|
-
export const __wbg_readValue_988440034a0e12ce = function (arg0) {
|
|
385
|
-
var ret = getObject(arg0).readValue();
|
|
386
|
-
return addHeapObject(ret);
|
|
387
|
-
};
|
|
388
|
-
export const __wbg_startNotifications_c88eeb920d1eb45c = function (arg0) {
|
|
389
|
-
var ret = getObject(arg0).startNotifications();
|
|
390
|
-
return addHeapObject(ret);
|
|
391
|
-
};
|
|
392
|
-
export const __wbg_writeValue_1c451e0da8c56ca9 = function (arg0, arg1, arg2) {
|
|
393
|
-
var ret = getObject(arg0).writeValue(getArrayU8FromWasm0(arg1, arg2));
|
|
394
|
-
return addHeapObject(ret);
|
|
395
|
-
};
|
|
396
|
-
export const __wbg_target_90b16facc122062f = function (arg0) {
|
|
397
|
-
var ret = getObject(arg0).target;
|
|
398
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
399
|
-
};
|
|
400
|
-
export const __wbg_requestDevice_2d1b71cc28a67a5a = function (arg0, arg1) {
|
|
401
|
-
var ret = getObject(arg0).requestDevice(getObject(arg1));
|
|
402
|
-
return addHeapObject(ret);
|
|
403
|
-
};
|
|
404
|
-
export const __wbg_id_45ecf3258c9f7dd7 = function (arg0, arg1) {
|
|
405
|
-
var ret = getObject(arg1).id;
|
|
406
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
-
var len0 = WASM_VECTOR_LEN;
|
|
408
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
409
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
410
|
-
};
|
|
411
|
-
export const __wbg_name_fe9ee17e821ecea5 = function (arg0, arg1) {
|
|
412
|
-
var ret = getObject(arg1).name;
|
|
413
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
414
|
-
var len0 = WASM_VECTOR_LEN;
|
|
415
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
416
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
417
|
-
};
|
|
418
|
-
export const __wbg_gatt_99df2e5380097484 = function (arg0) {
|
|
419
|
-
var ret = getObject(arg0).gatt;
|
|
420
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
421
|
-
};
|
|
422
|
-
export const __wbg_setongattserverdisconnected_80e78a9d86abdf7b = function (arg0, arg1) {
|
|
423
|
-
getObject(arg0).ongattserverdisconnected = getObject(arg1);
|
|
424
|
-
};
|
|
425
|
-
export const __wbg_clearTimeout_af54ac34efe00770 = function (arg0, arg1) {
|
|
426
|
-
getObject(arg0).clearTimeout(arg1);
|
|
427
|
-
};
|
|
428
|
-
export const __wbg_setTimeout_c5be4c054c4d7da5 = handleError(function (arg0, arg1, arg2) {
|
|
429
|
-
var ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
430
|
-
return ret;
|
|
431
|
-
});
|
|
432
|
-
export const __wbg_bluetooth_18ee05df03af2352 = function (arg0) {
|
|
433
|
-
var ret = getObject(arg0).bluetooth;
|
|
434
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
435
|
-
};
|
|
436
|
-
export const __wbg_setonopen_c3975a4f895a052a = function (arg0, arg1) {
|
|
437
|
-
getObject(arg0).onopen = getObject(arg1);
|
|
438
|
-
};
|
|
439
|
-
export const __wbg_setonerror_add0a293158012fc = function (arg0, arg1) {
|
|
440
|
-
getObject(arg0).onerror = getObject(arg1);
|
|
441
|
-
};
|
|
442
|
-
export const __wbg_setonmessage_0d42c79be06de84f = function (arg0, arg1) {
|
|
443
|
-
getObject(arg0).onmessage = getObject(arg1);
|
|
444
|
-
};
|
|
445
|
-
export const __wbg_new_fd9f3bfb89d96362 = handleError(function (arg0, arg1) {
|
|
446
|
-
var ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
447
|
-
return addHeapObject(ret);
|
|
448
|
-
});
|
|
449
|
-
export const __wbg_close_3797d4fae932c9b9 = handleError(function (arg0) {
|
|
450
|
-
getObject(arg0).close();
|
|
451
|
-
});
|
|
452
|
-
export const __wbg_send_ca85b0e6799803ef = handleError(function (arg0, arg1, arg2) {
|
|
453
|
-
getObject(arg0).send(getStringFromWasm0(arg1, arg2));
|
|
454
|
-
});
|
|
455
|
-
export const __wbg_connect_d31afa0760e2294e = function (arg0) {
|
|
456
|
-
var ret = getObject(arg0).connect();
|
|
457
|
-
return addHeapObject(ret);
|
|
458
|
-
};
|
|
459
|
-
export const __wbg_getPrimaryService_903e198e60097b4a = function (arg0, arg1, arg2) {
|
|
460
|
-
var ret = getObject(arg0).getPrimaryService(getStringFromWasm0(arg1, arg2));
|
|
461
|
-
return addHeapObject(ret);
|
|
462
|
-
};
|
|
463
|
-
export const __wbg_data_437e74b835241e70 = function (arg0) {
|
|
464
|
-
var ret = getObject(arg0).data;
|
|
465
|
-
return addHeapObject(ret);
|
|
466
|
-
};
|
|
467
|
-
export const __wbg_call_e5847d15cc228e4f = handleError(function (arg0, arg1) {
|
|
468
|
-
var ret = getObject(arg0).call(getObject(arg1));
|
|
469
|
-
return addHeapObject(ret);
|
|
470
|
-
});
|
|
471
|
-
export const __wbg_new_7c995f2adeba6fb5 = function () {
|
|
472
|
-
var ret = new Array();
|
|
473
|
-
return addHeapObject(ret);
|
|
474
|
-
};
|
|
475
|
-
export const __wbg_push_3f7c76b58919ce0d = function (arg0, arg1) {
|
|
476
|
-
var ret = getObject(arg0).push(getObject(arg1));
|
|
477
|
-
return ret;
|
|
478
|
-
};
|
|
479
|
-
export const __wbg_buffer_32296c67828fee6c = function (arg0) {
|
|
480
|
-
var ret = getObject(arg0).buffer;
|
|
481
|
-
return addHeapObject(ret);
|
|
482
|
-
};
|
|
483
|
-
export const __wbg_byteLength_da948e1afd83c8f8 = function (arg0) {
|
|
484
|
-
var ret = getObject(arg0).byteLength;
|
|
485
|
-
return ret;
|
|
486
|
-
};
|
|
487
|
-
export const __wbg_newnoargs_2349ba6aefe72376 = function (arg0, arg1) {
|
|
488
|
-
var ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
489
|
-
return addHeapObject(ret);
|
|
490
|
-
};
|
|
491
|
-
export const __wbg_call_d63edb857edf16f6 = handleError(function (arg0, arg1, arg2) {
|
|
492
|
-
var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
493
|
-
return addHeapObject(ret);
|
|
494
|
-
});
|
|
495
|
-
export const __wbg_new_59986c8731bebaa1 = function () {
|
|
496
|
-
var ret = new Object();
|
|
497
|
-
return addHeapObject(ret);
|
|
498
|
-
};
|
|
499
|
-
export const __wbg_resolve_e0690143406c88cb = function (arg0) {
|
|
500
|
-
var ret = Promise.resolve(getObject(arg0));
|
|
501
|
-
return addHeapObject(ret);
|
|
502
|
-
};
|
|
503
|
-
export const __wbg_then_9caf23122e4fd5d3 = function (arg0, arg1) {
|
|
504
|
-
var ret = getObject(arg0).then(getObject(arg1));
|
|
505
|
-
return addHeapObject(ret);
|
|
506
|
-
};
|
|
507
|
-
export const __wbg_then_16663faf60ffbe95 = function (arg0, arg1, arg2) {
|
|
508
|
-
var ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
509
|
-
return addHeapObject(ret);
|
|
510
|
-
};
|
|
511
|
-
export const __wbg_self_35a0fda3eb965abe = handleError(function () {
|
|
512
|
-
var ret = self.self;
|
|
513
|
-
return addHeapObject(ret);
|
|
514
|
-
});
|
|
515
|
-
export const __wbg_window_88a6f88dd3a474f1 = handleError(function () {
|
|
516
|
-
var ret = window.window;
|
|
517
|
-
return addHeapObject(ret);
|
|
518
|
-
});
|
|
519
|
-
export const __wbg_globalThis_1d843c4ad7b6a1f5 = handleError(function () {
|
|
520
|
-
var ret = globalThis.globalThis;
|
|
521
|
-
return addHeapObject(ret);
|
|
522
|
-
});
|
|
523
|
-
export const __wbg_global_294ce70448e8fbbf = handleError(function () {
|
|
524
|
-
var ret = global.global;
|
|
525
|
-
return addHeapObject(ret);
|
|
526
|
-
});
|
|
527
|
-
export const __wbg_buffer_0be9fb426f2dd82b = function (arg0) {
|
|
528
|
-
var ret = getObject(arg0).buffer;
|
|
529
|
-
return addHeapObject(ret);
|
|
530
|
-
};
|
|
531
|
-
export const __wbg_newwithbyteoffsetandlength_85b7ce82b001ea08 = function (arg0, arg1, arg2) {
|
|
532
|
-
var ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
533
|
-
return addHeapObject(ret);
|
|
534
|
-
};
|
|
535
|
-
export const __wbg_length_3a5138f465b971ad = function (arg0) {
|
|
536
|
-
var ret = getObject(arg0).length;
|
|
537
|
-
return ret;
|
|
538
|
-
};
|
|
539
|
-
export const __wbg_new_4e8d18dbf9cd5240 = function (arg0) {
|
|
540
|
-
var ret = new Uint8Array(getObject(arg0));
|
|
541
|
-
return addHeapObject(ret);
|
|
542
|
-
};
|
|
543
|
-
export const __wbg_set_4769de301eb521d7 = function (arg0, arg1, arg2) {
|
|
544
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
545
|
-
};
|
|
546
|
-
export const __wbg_newwithbyteoffset_0a6b0ce9d45270c3 = function (arg0, arg1) {
|
|
547
|
-
var ret = new Uint8Array(getObject(arg0), arg1 >>> 0);
|
|
548
|
-
return addHeapObject(ret);
|
|
549
|
-
};
|
|
550
|
-
export const __wbg_set_7e15d36563072b19 = handleError(function (arg0, arg1, arg2) {
|
|
551
|
-
var ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
552
|
-
return ret;
|
|
553
|
-
});
|
|
554
|
-
export const __wbg_getRandomValues_11115a852729f4e8 = handleError(function (arg0, arg1, arg2) {
|
|
555
|
-
getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
|
|
556
|
-
});
|
|
557
|
-
export const __wbg_randomFillSync_a2d002fc3b8e30f7 = handleError(function (arg0, arg1, arg2) {
|
|
558
|
-
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
559
|
-
});
|
|
560
|
-
export const __wbg_self_a5f0fe5564782787 = handleError(function () {
|
|
561
|
-
var ret = self.self;
|
|
562
|
-
return addHeapObject(ret);
|
|
563
|
-
});
|
|
564
|
-
export const __wbg_static_accessor_MODULE_7f278c5446c126c8 = function () {
|
|
565
|
-
var ret = module;
|
|
566
|
-
return addHeapObject(ret);
|
|
567
|
-
};
|
|
568
|
-
export const __wbg_require_29e58b5f6f133563 = handleError(function (arg0, arg1, arg2) {
|
|
569
|
-
var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
|
570
|
-
return addHeapObject(ret);
|
|
571
|
-
});
|
|
572
|
-
export const __wbg_crypto_d91429ea1a087f70 = function (arg0) {
|
|
573
|
-
var ret = getObject(arg0).crypto;
|
|
574
|
-
return addHeapObject(ret);
|
|
575
|
-
};
|
|
576
|
-
export const __wbg_msCrypto_c8be2bb4fc7d8cd3 = function (arg0) {
|
|
577
|
-
var ret = getObject(arg0).msCrypto;
|
|
578
|
-
return addHeapObject(ret);
|
|
579
|
-
};
|
|
580
|
-
export const __wbindgen_is_string = function (arg0) {
|
|
581
|
-
var ret = typeof (getObject(arg0)) === 'string';
|
|
582
|
-
return ret;
|
|
583
|
-
};
|
|
584
|
-
export const __wbindgen_string_get = function (arg0, arg1) {
|
|
585
|
-
const obj = getObject(arg1);
|
|
586
|
-
var ret = typeof (obj) === 'string' ? obj : undefined;
|
|
587
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
588
|
-
var len0 = WASM_VECTOR_LEN;
|
|
589
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
590
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
591
|
-
};
|
|
592
|
-
export const __wbindgen_debug_string = function (arg0, arg1) {
|
|
593
|
-
var ret = debugString(getObject(arg1));
|
|
594
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
595
|
-
var len0 = WASM_VECTOR_LEN;
|
|
596
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
597
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
598
|
-
};
|
|
599
|
-
export const __wbindgen_throw = function (arg0, arg1) {
|
|
600
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
601
|
-
};
|
|
602
|
-
export const __wbindgen_memory = function () {
|
|
603
|
-
var ret = wasm.memory;
|
|
604
|
-
return addHeapObject(ret);
|
|
605
|
-
};
|
|
606
|
-
export const __wbindgen_closure_wrapper677 = function (arg0, arg1, arg2) {
|
|
607
|
-
var ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_22);
|
|
608
|
-
return addHeapObject(ret);
|
|
609
|
-
};
|
|
610
|
-
export const __wbindgen_closure_wrapper679 = function (arg0, arg1, arg2) {
|
|
611
|
-
var ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_25);
|
|
612
|
-
return addHeapObject(ret);
|
|
613
|
-
};
|
|
614
|
-
export const __wbindgen_closure_wrapper681 = function (arg0, arg1, arg2) {
|
|
615
|
-
var ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_28);
|
|
616
|
-
return addHeapObject(ret);
|
|
617
|
-
};
|
|
618
|
-
export const __wbindgen_closure_wrapper683 = function (arg0, arg1, arg2) {
|
|
619
|
-
var ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_31);
|
|
620
|
-
return addHeapObject(ret);
|
|
621
|
-
};
|
|
622
|
-
export const __wbindgen_closure_wrapper2493 = function (arg0, arg1, arg2) {
|
|
623
|
-
var ret = makeMutClosure(arg0, arg1, 1210, __wbg_adapter_34);
|
|
624
|
-
return addHeapObject(ret);
|
|
625
|
-
};
|
|
626
|
-
export const __wbindgen_closure_wrapper4268 = function (arg0, arg1, arg2) {
|
|
627
|
-
var ret = makeMutClosure(arg0, arg1, 1943, __wbg_adapter_37);
|
|
628
|
-
return addHeapObject(ret);
|
|
629
|
-
};
|
|
630
|
-
//# sourceMappingURL=buttplug_rs_ffi_bg.js.map
|
|
1
|
+
// BEGIN_MODULARIZE
|
|
2
|
+
// This file was modified by scripts/modularize.js to create Node ESM-compatible bindings.
|
|
3
|
+
// Do not modify this file directly as your changes will be overwritten.
|
|
4
|
+
// END_MODULARIZE
|
|
5
|
+
|
|
6
|
+
export * from "#buttplug_rs_ffi_bg";
|
|
Binary file
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function
|
|
4
|
+
export function buttplug_create_protobuf_client(a: number, b: number, c: number, d: number): number;
|
|
5
5
|
export function buttplug_free_client(a: number): void;
|
|
6
|
-
export function
|
|
6
|
+
export function buttplug_client_protobuf_message(a: number, b: number, c: number, d: number, e: number): void;
|
|
7
7
|
export function buttplug_create_device(a: number, b: number): number;
|
|
8
|
-
export function
|
|
8
|
+
export function buttplug_device_protobuf_message(a: number, b: number, c: number, d: number, e: number): void;
|
|
9
9
|
export function buttplug_free_device(a: number): void;
|
|
10
10
|
export function buttplug_activate_env_logger(a: number, b: number): void;
|
|
11
11
|
export function __wbindgen_malloc(a: number): number;
|
|
12
12
|
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
|
13
13
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
14
|
-
export function
|
|
15
|
-
export function
|
|
16
|
-
export function
|
|
14
|
+
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0801f0b68538ccb2(a: number, b: number, c: number): void;
|
|
15
|
+
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6d5d487c79cfdf49(a: number, b: number, c: number): void;
|
|
16
|
+
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha721fdbd23ca35f2(a: number, b: number): void;
|
|
17
17
|
export function __wbindgen_free(a: number, b: number): void;
|
|
18
18
|
export function __wbindgen_exn_store(a: number): void;
|