kordweb 0.5.14 → 0.5.16
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/README.md +2 -0
- package/klib.d.ts +10 -0
- package/klib.js +55 -18
- package/klib_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
[](https://crates.io/crates/kord)
|
|
4
4
|
[](https://crates.io/crates/kord)
|
|
5
5
|
[](https://github.com/twitchax/kord/releases)
|
|
6
|
+
[](https://crates.io/crates/kord)
|
|
7
|
+
[](https://www.npmjs.com/package/kordweb)
|
|
6
8
|
[](https://docs.rs/kord)
|
|
7
9
|
[](https://github.com/twitchax/kord)
|
|
8
10
|
[](https://opensource.org/licenses/MIT)
|
package/klib.d.ts
CHANGED
|
@@ -645,6 +645,14 @@ export class KordNote {
|
|
|
645
645
|
*/
|
|
646
646
|
copy(): KordNote;
|
|
647
647
|
}
|
|
648
|
+
/**
|
|
649
|
+
* A handle to a [`Chord`] playback.
|
|
650
|
+
*
|
|
651
|
+
* Should be dropped to stop the playback, or after playback is finished.
|
|
652
|
+
*/
|
|
653
|
+
export class KordPlaybackHandle {
|
|
654
|
+
free(): void;
|
|
655
|
+
}
|
|
648
656
|
|
|
649
657
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
650
658
|
|
|
@@ -688,6 +696,7 @@ export interface InitOutput {
|
|
|
688
696
|
readonly kordchord_withCrunchy: (a: number, b: number) => number;
|
|
689
697
|
readonly kordchord_play: (a: number, b: number, c: number, d: number) => number;
|
|
690
698
|
readonly kordchord_copy: (a: number) => number;
|
|
699
|
+
readonly __wbg_kordplaybackhandle_free: (a: number) => void;
|
|
691
700
|
readonly kordchord_minor: (a: number) => number;
|
|
692
701
|
readonly kordchord_flat5: (a: number) => number;
|
|
693
702
|
readonly kordchord_aug: (a: number) => number;
|
|
@@ -718,6 +727,7 @@ export interface InitOutput {
|
|
|
718
727
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
719
728
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
720
729
|
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4bf4f1a270d9cb63: (a: number, b: number, c: number) => void;
|
|
730
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__haff74cc1bdcde5c1: (a: number, b: number) => void;
|
|
721
731
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb32af8e4ede5824: (a: number, b: number) => void;
|
|
722
732
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
723
733
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
package/klib.js
CHANGED
|
@@ -222,6 +222,10 @@ function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
function __wbg_adapter_27(arg0, arg1) {
|
|
225
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__haff74cc1bdcde5c1(arg0, arg1);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function __wbg_adapter_30(arg0, arg1) {
|
|
225
229
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb32af8e4ede5824(arg0, arg1);
|
|
226
230
|
}
|
|
227
231
|
|
|
@@ -266,7 +270,7 @@ function handleError(f, args) {
|
|
|
266
270
|
function getArrayF32FromWasm0(ptr, len) {
|
|
267
271
|
return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
268
272
|
}
|
|
269
|
-
function
|
|
273
|
+
function __wbg_adapter_159(arg0, arg1, arg2, arg3) {
|
|
270
274
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2d4abc1ddedd8c19(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
271
275
|
}
|
|
272
276
|
|
|
@@ -1318,6 +1322,27 @@ export class KordNote {
|
|
|
1318
1322
|
}
|
|
1319
1323
|
}
|
|
1320
1324
|
|
|
1325
|
+
const KordPlaybackHandleFinalization = new FinalizationRegistry(ptr => wasm.__wbg_kordplaybackhandle_free(ptr));
|
|
1326
|
+
/**
|
|
1327
|
+
* A handle to a [`Chord`] playback.
|
|
1328
|
+
*
|
|
1329
|
+
* Should be dropped to stop the playback, or after playback is finished.
|
|
1330
|
+
*/
|
|
1331
|
+
export class KordPlaybackHandle {
|
|
1332
|
+
|
|
1333
|
+
__destroy_into_raw() {
|
|
1334
|
+
const ptr = this.ptr;
|
|
1335
|
+
this.ptr = 0;
|
|
1336
|
+
KordPlaybackHandleFinalization.unregister(this);
|
|
1337
|
+
return ptr;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
free() {
|
|
1341
|
+
const ptr = this.__destroy_into_raw();
|
|
1342
|
+
wasm.__wbg_kordplaybackhandle_free(ptr);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1321
1346
|
async function load(module, imports) {
|
|
1322
1347
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
1323
1348
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -1355,18 +1380,6 @@ function getImports() {
|
|
|
1355
1380
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1356
1381
|
takeObject(arg0);
|
|
1357
1382
|
};
|
|
1358
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1359
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1360
|
-
return addHeapObject(ret);
|
|
1361
|
-
};
|
|
1362
|
-
imports.wbg.__wbg_kordnote_new = function(arg0) {
|
|
1363
|
-
const ret = KordNote.__wrap(arg0);
|
|
1364
|
-
return addHeapObject(ret);
|
|
1365
|
-
};
|
|
1366
|
-
imports.wbg.__wbg_kordchord_new = function(arg0) {
|
|
1367
|
-
const ret = KordChord.__wrap(arg0);
|
|
1368
|
-
return addHeapObject(ret);
|
|
1369
|
-
};
|
|
1370
1383
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1371
1384
|
const obj = takeObject(arg0).original;
|
|
1372
1385
|
if (obj.cnt-- == 1) {
|
|
@@ -1376,6 +1389,18 @@ function getImports() {
|
|
|
1376
1389
|
const ret = false;
|
|
1377
1390
|
return ret;
|
|
1378
1391
|
};
|
|
1392
|
+
imports.wbg.__wbg_kordnote_new = function(arg0) {
|
|
1393
|
+
const ret = KordNote.__wrap(arg0);
|
|
1394
|
+
return addHeapObject(ret);
|
|
1395
|
+
};
|
|
1396
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1397
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1398
|
+
return addHeapObject(ret);
|
|
1399
|
+
};
|
|
1400
|
+
imports.wbg.__wbg_kordchord_new = function(arg0) {
|
|
1401
|
+
const ret = KordChord.__wrap(arg0);
|
|
1402
|
+
return addHeapObject(ret);
|
|
1403
|
+
};
|
|
1379
1404
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1380
1405
|
const obj = getObject(arg1);
|
|
1381
1406
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
@@ -1400,6 +1425,14 @@ function getImports() {
|
|
|
1400
1425
|
wasm.__wbindgen_free(arg0, arg1);
|
|
1401
1426
|
}
|
|
1402
1427
|
};
|
|
1428
|
+
imports.wbg.__wbg_clearTimeout_76877dbc010e786d = function(arg0) {
|
|
1429
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
1430
|
+
return addHeapObject(ret);
|
|
1431
|
+
};
|
|
1432
|
+
imports.wbg.__wbg_setTimeout_75cb9b6991a4031d = function() { return handleError(function (arg0, arg1) {
|
|
1433
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
1434
|
+
return addHeapObject(ret);
|
|
1435
|
+
}, arguments) };
|
|
1403
1436
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1404
1437
|
const v = getObject(arg0);
|
|
1405
1438
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
@@ -1564,7 +1597,7 @@ function getImports() {
|
|
|
1564
1597
|
const a = state0.a;
|
|
1565
1598
|
state0.a = 0;
|
|
1566
1599
|
try {
|
|
1567
|
-
return
|
|
1600
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
1568
1601
|
} finally {
|
|
1569
1602
|
state0.a = a;
|
|
1570
1603
|
}
|
|
@@ -1597,12 +1630,16 @@ function getImports() {
|
|
|
1597
1630
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1598
1631
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1599
1632
|
};
|
|
1600
|
-
imports.wbg.
|
|
1601
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1633
|
+
imports.wbg.__wbindgen_closure_wrapper1099 = function(arg0, arg1, arg2) {
|
|
1634
|
+
const ret = makeMutClosure(arg0, arg1, 479, __wbg_adapter_24);
|
|
1635
|
+
return addHeapObject(ret);
|
|
1636
|
+
};
|
|
1637
|
+
imports.wbg.__wbindgen_closure_wrapper1156 = function(arg0, arg1, arg2) {
|
|
1638
|
+
const ret = makeMutClosure(arg0, arg1, 516, __wbg_adapter_27);
|
|
1602
1639
|
return addHeapObject(ret);
|
|
1603
1640
|
};
|
|
1604
|
-
imports.wbg.
|
|
1605
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1641
|
+
imports.wbg.__wbindgen_closure_wrapper1445 = function(arg0, arg1, arg2) {
|
|
1642
|
+
const ret = makeMutClosure(arg0, arg1, 666, __wbg_adapter_30);
|
|
1606
1643
|
return addHeapObject(ret);
|
|
1607
1644
|
};
|
|
1608
1645
|
|
package/klib_bg.wasm
CHANGED
|
Binary file
|