@scalable-vector-audio/sva-wasm 0.4.0 → 0.5.0
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/package.json +1 -1
- package/sva_wasm.d.ts +55 -4
- package/sva_wasm.js +224 -12
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
export class Checkpoint {
|
|
5
|
+
private constructor();
|
|
6
|
+
free(): void;
|
|
7
|
+
[Symbol.dispose](): void;
|
|
8
|
+
readonly position: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
export class Composition {
|
|
5
12
|
free(): void;
|
|
6
13
|
[Symbol.dispose](): void;
|
|
@@ -18,10 +25,18 @@ export class Composition {
|
|
|
18
25
|
*/
|
|
19
26
|
static persistent(name: string | null | undefined, cache: string, max_bytes?: number | null): Promise<Composition>;
|
|
20
27
|
/**
|
|
21
|
-
* Unset, `target` is `master`; `
|
|
22
|
-
*
|
|
28
|
+
* Unset, `target` is `master`; `until` is the horizon in seconds, or `"silent"` to end
|
|
29
|
+
* where every later sample is provably under `2^-bits` (default the profile's own), by
|
|
30
|
+
* `max_secs` at the latest. `rate` is the observation rate. What reads a `volatile`
|
|
31
|
+
* parameter is kept in a slot, never in either store.
|
|
23
32
|
*/
|
|
24
|
-
render(target
|
|
33
|
+
render(target: string | null | undefined, rate: number | null | undefined, until: any, volatile?: string[] | null, bits?: number | null, max_secs?: number | null): Rendering;
|
|
34
|
+
/**
|
|
35
|
+
* A stream of `target` (`master` unset) at `rate`, `block` samples a block, each key of
|
|
36
|
+
* `bindings` a named argument on the target. `until: "silent"` ends it at the first block
|
|
37
|
+
* whose end proves every later sample under `2^-bits`, throwing past `max_secs`.
|
|
38
|
+
*/
|
|
39
|
+
stream(target: string | null | undefined, rate: number | null | undefined, block: number, bindings: any, until: any, bits?: number | null, max_secs?: number | null): Stream;
|
|
25
40
|
/**
|
|
26
41
|
* The memory tier's, as `cache_max_bytes` is; `persistent_bytes` is the pack's.
|
|
27
42
|
*/
|
|
@@ -56,6 +71,30 @@ export class Rendering {
|
|
|
56
71
|
readonly target: string;
|
|
57
72
|
}
|
|
58
73
|
|
|
74
|
+
/**
|
|
75
|
+
* A target block by block, for a player that cannot know how long a note is held.
|
|
76
|
+
*/
|
|
77
|
+
export class Stream {
|
|
78
|
+
private constructor();
|
|
79
|
+
free(): void;
|
|
80
|
+
[Symbol.dispose](): void;
|
|
81
|
+
checkpoint(): Checkpoint;
|
|
82
|
+
/**
|
|
83
|
+
* Writes the next block into `out`, component `c` from `c * block`, and returns the
|
|
84
|
+
* samples each component took: `block`, fewer where silence ends inside it, `0` after.
|
|
85
|
+
*/
|
|
86
|
+
next(out: Float32Array): number;
|
|
87
|
+
/**
|
|
88
|
+
* `until` as `stream` takes it, `max_secs` counted from the checkpoint.
|
|
89
|
+
*/
|
|
90
|
+
resume(checkpoint: Checkpoint, bindings: any, until: any, bits?: number | null, max_secs?: number | null): Stream;
|
|
91
|
+
readonly block: number;
|
|
92
|
+
readonly channels: number;
|
|
93
|
+
readonly end: number | undefined;
|
|
94
|
+
readonly position: number;
|
|
95
|
+
readonly sample_rate: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
59
98
|
export function builtins(): any;
|
|
60
99
|
|
|
61
100
|
/**
|
|
@@ -67,9 +106,12 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
67
106
|
|
|
68
107
|
export interface InitOutput {
|
|
69
108
|
readonly memory: WebAssembly.Memory;
|
|
109
|
+
readonly __wbg_checkpoint_free: (a: number, b: number) => void;
|
|
70
110
|
readonly __wbg_composition_free: (a: number, b: number) => void;
|
|
71
111
|
readonly __wbg_rendering_free: (a: number, b: number) => void;
|
|
112
|
+
readonly __wbg_stream_free: (a: number, b: number) => void;
|
|
72
113
|
readonly builtins: () => [number, number, number];
|
|
114
|
+
readonly checkpoint_position: (a: number) => number;
|
|
73
115
|
readonly composition_bound_cache: (a: number, b: number) => void;
|
|
74
116
|
readonly composition_cache_bytes: (a: number) => number;
|
|
75
117
|
readonly composition_cache_max_bytes: (a: number) => number;
|
|
@@ -81,8 +123,9 @@ export interface InitOutput {
|
|
|
81
123
|
readonly composition_persistent: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
82
124
|
readonly composition_persistent_bytes: (a: number) => number;
|
|
83
125
|
readonly composition_persistent_max_bytes: (a: number) => number;
|
|
84
|
-
readonly composition_render: (a: number, b: number, c: number, d: number, e:
|
|
126
|
+
readonly composition_render: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
85
127
|
readonly composition_set_volatile_max_bytes: (a: number, b: number) => void;
|
|
128
|
+
readonly composition_stream: (a: number, b: number, c: number, d: number, e: number, f: any, g: any, h: number, i: number, j: number) => [number, number, number];
|
|
86
129
|
readonly composition_volatile_bytes: (a: number) => number;
|
|
87
130
|
readonly composition_volatile_max_bytes: (a: number) => number;
|
|
88
131
|
readonly outline: (a: number, b: number) => [number, number, number];
|
|
@@ -93,6 +136,14 @@ export interface InitOutput {
|
|
|
93
136
|
readonly rendering_samples: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
94
137
|
readonly rendering_stats: (a: number) => [number, number, number];
|
|
95
138
|
readonly rendering_target: (a: number) => [number, number];
|
|
139
|
+
readonly stream_block: (a: number) => number;
|
|
140
|
+
readonly stream_channels: (a: number) => number;
|
|
141
|
+
readonly stream_checkpoint: (a: number) => number;
|
|
142
|
+
readonly stream_end: (a: number) => [number, number];
|
|
143
|
+
readonly stream_next: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
144
|
+
readonly stream_position: (a: number) => number;
|
|
145
|
+
readonly stream_resume: (a: number, b: number, c: any, d: any, e: number, f: number, g: number) => [number, number, number];
|
|
146
|
+
readonly stream_sample_rate: (a: number) => number;
|
|
96
147
|
readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
|
|
97
148
|
readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
|
|
98
149
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
package/sva_wasm.js
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
/* @ts-self-types="./sva_wasm.d.ts" */
|
|
2
2
|
|
|
3
|
+
export class Checkpoint {
|
|
4
|
+
static __wrap(ptr) {
|
|
5
|
+
const obj = Object.create(Checkpoint.prototype);
|
|
6
|
+
obj.__wbg_ptr = ptr;
|
|
7
|
+
CheckpointFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
8
|
+
return obj;
|
|
9
|
+
}
|
|
10
|
+
__destroy_into_raw() {
|
|
11
|
+
const ptr = this.__wbg_ptr;
|
|
12
|
+
this.__wbg_ptr = 0;
|
|
13
|
+
CheckpointFinalization.unregister(this);
|
|
14
|
+
return ptr;
|
|
15
|
+
}
|
|
16
|
+
free() {
|
|
17
|
+
const ptr = this.__destroy_into_raw();
|
|
18
|
+
wasm.__wbg_checkpoint_free(ptr, 0);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @returns {number}
|
|
22
|
+
*/
|
|
23
|
+
get position() {
|
|
24
|
+
const ret = wasm.checkpoint_position(this.__wbg_ptr);
|
|
25
|
+
return ret;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (Symbol.dispose) Checkpoint.prototype[Symbol.dispose] = Checkpoint.prototype.free;
|
|
29
|
+
|
|
3
30
|
export class Composition {
|
|
4
31
|
static __wrap(ptr) {
|
|
5
32
|
const obj = Object.create(Composition.prototype);
|
|
@@ -108,20 +135,24 @@ export class Composition {
|
|
|
108
135
|
return ret;
|
|
109
136
|
}
|
|
110
137
|
/**
|
|
111
|
-
* Unset, `target` is `master`; `
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* @param {
|
|
138
|
+
* Unset, `target` is `master`; `until` is the horizon in seconds, or `"silent"` to end
|
|
139
|
+
* where every later sample is provably under `2^-bits` (default the profile's own), by
|
|
140
|
+
* `max_secs` at the latest. `rate` is the observation rate. What reads a `volatile`
|
|
141
|
+
* parameter is kept in a slot, never in either store.
|
|
142
|
+
* @param {string | null | undefined} target
|
|
143
|
+
* @param {number | null | undefined} rate
|
|
144
|
+
* @param {any} until
|
|
116
145
|
* @param {string[] | null} [volatile]
|
|
146
|
+
* @param {number | null} [bits]
|
|
147
|
+
* @param {number | null} [max_secs]
|
|
117
148
|
* @returns {Rendering}
|
|
118
149
|
*/
|
|
119
|
-
render(target, rate,
|
|
150
|
+
render(target, rate, until, volatile, bits, max_secs) {
|
|
120
151
|
var ptr0 = isLikeNone(target) ? 0 : passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
121
152
|
var len0 = WASM_VECTOR_LEN;
|
|
122
153
|
var ptr1 = isLikeNone(volatile) ? 0 : passArrayJsValueToWasm0(volatile, wasm.__wbindgen_malloc);
|
|
123
154
|
var len1 = WASM_VECTOR_LEN;
|
|
124
|
-
const ret = wasm.composition_render(this.__wbg_ptr, ptr0, len0, isLikeNone(rate) ? Number.MAX_SAFE_INTEGER : (rate) >>> 0, !isLikeNone(
|
|
155
|
+
const ret = wasm.composition_render(this.__wbg_ptr, ptr0, len0, isLikeNone(rate) ? Number.MAX_SAFE_INTEGER : (rate) >>> 0, until, ptr1, len1, isLikeNone(bits) ? Number.MAX_SAFE_INTEGER : (bits) >>> 0, !isLikeNone(max_secs), isLikeNone(max_secs) ? 0 : max_secs);
|
|
125
156
|
if (ret[2]) {
|
|
126
157
|
throw takeFromExternrefTable0(ret[1]);
|
|
127
158
|
}
|
|
@@ -133,6 +164,28 @@ export class Composition {
|
|
|
133
164
|
set volatile_max_bytes(max_bytes) {
|
|
134
165
|
wasm.composition_set_volatile_max_bytes(this.__wbg_ptr, max_bytes);
|
|
135
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* A stream of `target` (`master` unset) at `rate`, `block` samples a block, each key of
|
|
169
|
+
* `bindings` a named argument on the target. `until: "silent"` ends it at the first block
|
|
170
|
+
* whose end proves every later sample under `2^-bits`, throwing past `max_secs`.
|
|
171
|
+
* @param {string | null | undefined} target
|
|
172
|
+
* @param {number | null | undefined} rate
|
|
173
|
+
* @param {number} block
|
|
174
|
+
* @param {any} bindings
|
|
175
|
+
* @param {any} until
|
|
176
|
+
* @param {number | null} [bits]
|
|
177
|
+
* @param {number | null} [max_secs]
|
|
178
|
+
* @returns {Stream}
|
|
179
|
+
*/
|
|
180
|
+
stream(target, rate, block, bindings, until, bits, max_secs) {
|
|
181
|
+
var ptr0 = isLikeNone(target) ? 0 : passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
182
|
+
var len0 = WASM_VECTOR_LEN;
|
|
183
|
+
const ret = wasm.composition_stream(this.__wbg_ptr, ptr0, len0, isLikeNone(rate) ? Number.MAX_SAFE_INTEGER : (rate) >>> 0, block, bindings, until, isLikeNone(bits) ? Number.MAX_SAFE_INTEGER : (bits) >>> 0, !isLikeNone(max_secs), isLikeNone(max_secs) ? 0 : max_secs);
|
|
184
|
+
if (ret[2]) {
|
|
185
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
186
|
+
}
|
|
187
|
+
return Stream.__wrap(ret[0]);
|
|
188
|
+
}
|
|
136
189
|
/**
|
|
137
190
|
* @returns {number}
|
|
138
191
|
*/
|
|
@@ -248,6 +301,103 @@ export class Rendering {
|
|
|
248
301
|
}
|
|
249
302
|
if (Symbol.dispose) Rendering.prototype[Symbol.dispose] = Rendering.prototype.free;
|
|
250
303
|
|
|
304
|
+
/**
|
|
305
|
+
* A target block by block, for a player that cannot know how long a note is held.
|
|
306
|
+
*/
|
|
307
|
+
export class Stream {
|
|
308
|
+
static __wrap(ptr) {
|
|
309
|
+
const obj = Object.create(Stream.prototype);
|
|
310
|
+
obj.__wbg_ptr = ptr;
|
|
311
|
+
StreamFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
312
|
+
return obj;
|
|
313
|
+
}
|
|
314
|
+
__destroy_into_raw() {
|
|
315
|
+
const ptr = this.__wbg_ptr;
|
|
316
|
+
this.__wbg_ptr = 0;
|
|
317
|
+
StreamFinalization.unregister(this);
|
|
318
|
+
return ptr;
|
|
319
|
+
}
|
|
320
|
+
free() {
|
|
321
|
+
const ptr = this.__destroy_into_raw();
|
|
322
|
+
wasm.__wbg_stream_free(ptr, 0);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @returns {number}
|
|
326
|
+
*/
|
|
327
|
+
get block() {
|
|
328
|
+
const ret = wasm.stream_block(this.__wbg_ptr);
|
|
329
|
+
return ret >>> 0;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @returns {number}
|
|
333
|
+
*/
|
|
334
|
+
get channels() {
|
|
335
|
+
const ret = wasm.stream_channels(this.__wbg_ptr);
|
|
336
|
+
return ret >>> 0;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* @returns {Checkpoint}
|
|
340
|
+
*/
|
|
341
|
+
checkpoint() {
|
|
342
|
+
const ret = wasm.stream_checkpoint(this.__wbg_ptr);
|
|
343
|
+
return Checkpoint.__wrap(ret);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @returns {number | undefined}
|
|
347
|
+
*/
|
|
348
|
+
get end() {
|
|
349
|
+
const ret = wasm.stream_end(this.__wbg_ptr);
|
|
350
|
+
return ret[0] === 0 ? undefined : ret[1];
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Writes the next block into `out`, component `c` from `c * block`, and returns the
|
|
354
|
+
* samples each component took: `block`, fewer where silence ends inside it, `0` after.
|
|
355
|
+
* @param {Float32Array} out
|
|
356
|
+
* @returns {number}
|
|
357
|
+
*/
|
|
358
|
+
next(out) {
|
|
359
|
+
var ptr0 = passArrayF32ToWasm0(out, wasm.__wbindgen_malloc);
|
|
360
|
+
var len0 = WASM_VECTOR_LEN;
|
|
361
|
+
const ret = wasm.stream_next(this.__wbg_ptr, ptr0, len0, out);
|
|
362
|
+
if (ret[2]) {
|
|
363
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
364
|
+
}
|
|
365
|
+
return ret[0] >>> 0;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* @returns {number}
|
|
369
|
+
*/
|
|
370
|
+
get position() {
|
|
371
|
+
const ret = wasm.stream_position(this.__wbg_ptr);
|
|
372
|
+
return ret;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* `until` as `stream` takes it, `max_secs` counted from the checkpoint.
|
|
376
|
+
* @param {Checkpoint} checkpoint
|
|
377
|
+
* @param {any} bindings
|
|
378
|
+
* @param {any} until
|
|
379
|
+
* @param {number | null} [bits]
|
|
380
|
+
* @param {number | null} [max_secs]
|
|
381
|
+
* @returns {Stream}
|
|
382
|
+
*/
|
|
383
|
+
resume(checkpoint, bindings, until, bits, max_secs) {
|
|
384
|
+
_assertClass(checkpoint, Checkpoint);
|
|
385
|
+
const ret = wasm.stream_resume(this.__wbg_ptr, checkpoint.__wbg_ptr, bindings, until, isLikeNone(bits) ? Number.MAX_SAFE_INTEGER : (bits) >>> 0, !isLikeNone(max_secs), isLikeNone(max_secs) ? 0 : max_secs);
|
|
386
|
+
if (ret[2]) {
|
|
387
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
388
|
+
}
|
|
389
|
+
return Stream.__wrap(ret[0]);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @returns {number}
|
|
393
|
+
*/
|
|
394
|
+
get sample_rate() {
|
|
395
|
+
const ret = wasm.stream_sample_rate(this.__wbg_ptr);
|
|
396
|
+
return ret >>> 0;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (Symbol.dispose) Stream.prototype[Symbol.dispose] = Stream.prototype.free;
|
|
400
|
+
|
|
251
401
|
/**
|
|
252
402
|
* @returns {any}
|
|
253
403
|
*/
|
|
@@ -276,6 +426,9 @@ export function outline(text) {
|
|
|
276
426
|
function __wbg_get_imports() {
|
|
277
427
|
const import0 = {
|
|
278
428
|
__proto__: null,
|
|
429
|
+
__wbg___wbindgen_copy_to_typed_array_cccd104be8cf0b8d: function(arg0, arg1, arg2) {
|
|
430
|
+
new Uint8Array(arg2.buffer, arg2.byteOffset, arg2.byteLength).set(getArrayU8FromWasm0(arg0, arg1));
|
|
431
|
+
},
|
|
279
432
|
__wbg___wbindgen_is_falsy_4502df4d571fca70: function(arg0) {
|
|
280
433
|
const ret = !arg0;
|
|
281
434
|
return ret;
|
|
@@ -284,10 +437,20 @@ function __wbg_get_imports() {
|
|
|
284
437
|
const ret = typeof(arg0) === 'function';
|
|
285
438
|
return ret;
|
|
286
439
|
},
|
|
440
|
+
__wbg___wbindgen_is_null_5160b3e381865372: function(arg0) {
|
|
441
|
+
const ret = arg0 === null;
|
|
442
|
+
return ret;
|
|
443
|
+
},
|
|
287
444
|
__wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
|
|
288
445
|
const ret = arg0 === undefined;
|
|
289
446
|
return ret;
|
|
290
447
|
},
|
|
448
|
+
__wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
|
|
449
|
+
const obj = arg1;
|
|
450
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
451
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
452
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
453
|
+
},
|
|
291
454
|
__wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
|
|
292
455
|
const obj = arg1;
|
|
293
456
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -317,9 +480,17 @@ function __wbg_get_imports() {
|
|
|
317
480
|
const ret = arg0.createSyncAccessHandle();
|
|
318
481
|
return ret;
|
|
319
482
|
},
|
|
483
|
+
__wbg_entries_972a87586902cf87: function(arg0) {
|
|
484
|
+
const ret = Object.entries(arg0);
|
|
485
|
+
return ret;
|
|
486
|
+
},
|
|
320
487
|
__wbg_flush_91458c8278aae724: function() { return handleError(function (arg0) {
|
|
321
488
|
arg0.flush();
|
|
322
489
|
}, arguments); },
|
|
490
|
+
__wbg_from_a39669ce566077da: function(arg0) {
|
|
491
|
+
const ret = Array.from(arg0);
|
|
492
|
+
return ret;
|
|
493
|
+
},
|
|
323
494
|
__wbg_getDirectoryHandle_df6fb6f1fc6240ed: function(arg0, arg1, arg2, arg3) {
|
|
324
495
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
325
496
|
return ret;
|
|
@@ -340,6 +511,14 @@ function __wbg_get_imports() {
|
|
|
340
511
|
const ret = Reflect.get(arg0, arg1);
|
|
341
512
|
return ret;
|
|
342
513
|
}, arguments); },
|
|
514
|
+
__wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
|
|
515
|
+
const ret = arg0[arg1 >>> 0];
|
|
516
|
+
return ret;
|
|
517
|
+
},
|
|
518
|
+
__wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
|
|
519
|
+
const ret = arg0[arg1 >>> 0];
|
|
520
|
+
return ret;
|
|
521
|
+
},
|
|
343
522
|
__wbg_instanceof_FileSystemDirectoryHandle_a5c1bdaafba684ca: function(arg0) {
|
|
344
523
|
let result;
|
|
345
524
|
try {
|
|
@@ -360,6 +539,16 @@ function __wbg_get_imports() {
|
|
|
360
539
|
const ret = result;
|
|
361
540
|
return ret;
|
|
362
541
|
},
|
|
542
|
+
__wbg_instanceof_Object_87732cb922ac2e2c: function(arg0) {
|
|
543
|
+
let result;
|
|
544
|
+
try {
|
|
545
|
+
result = arg0 instanceof Object;
|
|
546
|
+
} catch (_) {
|
|
547
|
+
result = false;
|
|
548
|
+
}
|
|
549
|
+
const ret = result;
|
|
550
|
+
return ret;
|
|
551
|
+
},
|
|
363
552
|
__wbg_instanceof_WorkerGlobalScope_0c1a6411473b843f: function(arg0) {
|
|
364
553
|
let result;
|
|
365
554
|
try {
|
|
@@ -374,11 +563,15 @@ function __wbg_get_imports() {
|
|
|
374
563
|
const ret = arg0.keys();
|
|
375
564
|
return ret;
|
|
376
565
|
},
|
|
566
|
+
__wbg_length_4e1adc0d42e23620: function(arg0) {
|
|
567
|
+
const ret = arg0.length;
|
|
568
|
+
return ret;
|
|
569
|
+
},
|
|
377
570
|
__wbg_navigator_d25c0f071226f233: function(arg0) {
|
|
378
571
|
const ret = arg0.navigator;
|
|
379
572
|
return ret;
|
|
380
573
|
},
|
|
381
|
-
|
|
574
|
+
__wbg_new_60a94df323701352: function(arg0, arg1) {
|
|
382
575
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
383
576
|
return ret;
|
|
384
577
|
},
|
|
@@ -426,7 +619,7 @@ function __wbg_get_imports() {
|
|
|
426
619
|
const ret = arg0.next();
|
|
427
620
|
return ret;
|
|
428
621
|
}, arguments); },
|
|
429
|
-
|
|
622
|
+
__wbg_parse_673c654d2b233b97: function() { return handleError(function (arg0, arg1) {
|
|
430
623
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
431
624
|
return ret;
|
|
432
625
|
}, arguments); },
|
|
@@ -462,10 +655,10 @@ function __wbg_get_imports() {
|
|
|
462
655
|
__wbg_set_create_8c556c6febf6436c: function(arg0, arg1) {
|
|
463
656
|
arg0.create = arg1 !== 0;
|
|
464
657
|
},
|
|
465
|
-
|
|
658
|
+
__wbg_set_name_f2e0b4f6b6b3d728: function(arg0, arg1, arg2) {
|
|
466
659
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
467
660
|
},
|
|
468
|
-
|
|
661
|
+
__wbg_set_refusal_0a35a4ef06d51ed7: function(arg0, arg1) {
|
|
469
662
|
arg0.refusal = arg1;
|
|
470
663
|
},
|
|
471
664
|
__wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
|
|
@@ -500,7 +693,7 @@ function __wbg_get_imports() {
|
|
|
500
693
|
return ret;
|
|
501
694
|
}, arguments); },
|
|
502
695
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
503
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
696
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 99, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
504
697
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
|
|
505
698
|
return ret;
|
|
506
699
|
},
|
|
@@ -536,12 +729,18 @@ function wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95(arg0, arg
|
|
|
536
729
|
wasm.wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95(arg0, arg1, arg2, arg3);
|
|
537
730
|
}
|
|
538
731
|
|
|
732
|
+
const CheckpointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
733
|
+
? { register: () => {}, unregister: () => {} }
|
|
734
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_checkpoint_free(ptr, 1));
|
|
539
735
|
const CompositionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
540
736
|
? { register: () => {}, unregister: () => {} }
|
|
541
737
|
: new FinalizationRegistry(ptr => wasm.__wbg_composition_free(ptr, 1));
|
|
542
738
|
const RenderingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
543
739
|
? { register: () => {}, unregister: () => {} }
|
|
544
740
|
: new FinalizationRegistry(ptr => wasm.__wbg_rendering_free(ptr, 1));
|
|
741
|
+
const StreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
742
|
+
? { register: () => {}, unregister: () => {} }
|
|
743
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_stream_free(ptr, 1));
|
|
545
744
|
|
|
546
745
|
function addToExternrefTable0(obj) {
|
|
547
746
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -549,6 +748,12 @@ function addToExternrefTable0(obj) {
|
|
|
549
748
|
return idx;
|
|
550
749
|
}
|
|
551
750
|
|
|
751
|
+
function _assertClass(instance, klass) {
|
|
752
|
+
if (!(instance instanceof klass)) {
|
|
753
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
552
757
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
553
758
|
? { register: () => {}, unregister: () => {} }
|
|
554
759
|
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
@@ -632,6 +837,13 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
632
837
|
return real;
|
|
633
838
|
}
|
|
634
839
|
|
|
840
|
+
function passArrayF32ToWasm0(arg, malloc) {
|
|
841
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
842
|
+
getFloat32ArrayMemory0().set(arg, ptr / 4);
|
|
843
|
+
WASM_VECTOR_LEN = arg.length;
|
|
844
|
+
return ptr;
|
|
845
|
+
}
|
|
846
|
+
|
|
635
847
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
636
848
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
637
849
|
for (let i = 0; i < array.length; i++) {
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|