@octoseq/visualiser 0.1.0-main.2975d70 → 0.1.0-main.31a01e5
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/pkg/visualiser.d.ts +105 -29
- package/pkg/visualiser.js +636 -403
- package/pkg/visualiser_bg.wasm +0 -0
- package/pkg/visualiser_bg.wasm.d.ts +37 -29
package/package.json
CHANGED
package/pkg/visualiser.d.ts
CHANGED
|
@@ -158,6 +158,16 @@ export class WasmVisualiser {
|
|
|
158
158
|
* Returns a JSON array of ScriptSignalInfo objects.
|
|
159
159
|
*/
|
|
160
160
|
get_script_signals(): string;
|
|
161
|
+
/**
|
|
162
|
+
* Push a custom signal for use in scripts.
|
|
163
|
+
* The signal will be available as `inputs.customSignals["signal_id"]` in Rhai scripts.
|
|
164
|
+
*
|
|
165
|
+
* - `signal_id`: The unique ID of the custom signal.
|
|
166
|
+
* - `label`: The user-visible label of the signal.
|
|
167
|
+
* - `samples`: Signal data.
|
|
168
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
169
|
+
*/
|
|
170
|
+
push_custom_signal(signal_id: string, label: string, samples: Float32Array, sample_rate: number): void;
|
|
161
171
|
push_rotation_data(samples: Float32Array, sample_rate: number): void;
|
|
162
172
|
/**
|
|
163
173
|
* Render with a frame budget timeout.
|
|
@@ -213,6 +223,10 @@ export class WasmVisualiser {
|
|
|
213
223
|
* - sample_count: Number of samples to take
|
|
214
224
|
*/
|
|
215
225
|
analyze_signal_chain(signal_name: string, center_time: number, window_beats: number, sample_count: number): string;
|
|
226
|
+
/**
|
|
227
|
+
* Clear all custom signals.
|
|
228
|
+
*/
|
|
229
|
+
clear_custom_signals(): void;
|
|
216
230
|
/**
|
|
217
231
|
* Get the number of events for a specific band.
|
|
218
232
|
* Returns 0 if no events are stored for this band.
|
|
@@ -228,15 +242,47 @@ export class WasmVisualiser {
|
|
|
228
242
|
* Returns a JSON array of strings.
|
|
229
243
|
*/
|
|
230
244
|
get_stem_signal_keys(): string;
|
|
245
|
+
/**
|
|
246
|
+
* Check if performance profiling is currently enabled.
|
|
247
|
+
*/
|
|
248
|
+
is_profiling_enabled(): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Push a composed signal for use in scripts.
|
|
251
|
+
* The signal will be available as `inputs.composedSignals["name"]` in Rhai scripts.
|
|
252
|
+
*
|
|
253
|
+
* - `name`: The composed signal name (composed signals are keyed by name only).
|
|
254
|
+
* - `samples`: Signal data.
|
|
255
|
+
* - `sample_rate`: Sample rate of the signal.
|
|
256
|
+
*/
|
|
257
|
+
push_composed_signal(name: string, samples: Float32Array, sample_rate: number): void;
|
|
231
258
|
/**
|
|
232
259
|
* Clear the frequency band structure.
|
|
233
260
|
*/
|
|
234
261
|
clear_frequency_bands(): void;
|
|
262
|
+
/**
|
|
263
|
+
* Get camera state as JSON for inspector.
|
|
264
|
+
* Returns current position, rotation, target, fov, near, far, mode, and signal flags.
|
|
265
|
+
*/
|
|
266
|
+
get_camera_state_json(): string;
|
|
267
|
+
/**
|
|
268
|
+
* Enable or disable performance profiling.
|
|
269
|
+
* When enabled, console timing and collection size logging will be active.
|
|
270
|
+
*/
|
|
271
|
+
set_profiling_enabled(enabled: boolean): void;
|
|
235
272
|
/**
|
|
236
273
|
* Unregister a mesh asset.
|
|
237
274
|
* Returns true if the asset was unregistered, false if it didn't exist.
|
|
238
275
|
*/
|
|
239
276
|
unregister_mesh_asset(asset_id: string): boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Clear all composed signals.
|
|
279
|
+
*/
|
|
280
|
+
clear_composed_signals(): void;
|
|
281
|
+
/**
|
|
282
|
+
* Get list of custom signal keys (IDs and labels).
|
|
283
|
+
* Returns a JSON array of strings.
|
|
284
|
+
*/
|
|
285
|
+
get_custom_signal_keys(): string;
|
|
240
286
|
/**
|
|
241
287
|
* Get the number of events in a named event stream.
|
|
242
288
|
* Returns 0 if no events are stored for this name.
|
|
@@ -281,6 +327,17 @@ export class WasmVisualiser {
|
|
|
281
327
|
* Clear all authored event streams.
|
|
282
328
|
*/
|
|
283
329
|
clear_authored_event_streams(): void;
|
|
330
|
+
/**
|
|
331
|
+
* Set available custom signals for script namespace generation.
|
|
332
|
+
* This registers custom signal IDs and labels so the script engine can generate
|
|
333
|
+
* `inputs.customSignals["signal_id"]` accessors.
|
|
334
|
+
*
|
|
335
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
336
|
+
* `[["signal-abc123", "My Signal"], ["signal-def456", "Another Signal"]]`
|
|
337
|
+
*
|
|
338
|
+
* Returns true if successful, false if parsing failed.
|
|
339
|
+
*/
|
|
340
|
+
set_available_custom_signals(json: string): boolean;
|
|
284
341
|
/**
|
|
285
342
|
* Drain and return any pending structured script diagnostics as JSON.
|
|
286
343
|
*
|
|
@@ -288,6 +345,17 @@ export class WasmVisualiser {
|
|
|
288
345
|
* queue so repeated polling does not duplicate messages.
|
|
289
346
|
*/
|
|
290
347
|
take_script_diagnostics_json(): string;
|
|
348
|
+
/**
|
|
349
|
+
* Set available composed signals for script namespace generation.
|
|
350
|
+
* This registers composed signal IDs and labels so the script engine can generate
|
|
351
|
+
* `inputs.composedSignals["name"]` accessors.
|
|
352
|
+
*
|
|
353
|
+
* The JSON format should be an array of [id, label] pairs:
|
|
354
|
+
* `[["intensity", "intensity"], ["buildup", "buildup"]]`
|
|
355
|
+
*
|
|
356
|
+
* Returns true if successful, false if parsing failed.
|
|
357
|
+
*/
|
|
358
|
+
set_available_composed_signals(json: string): boolean;
|
|
291
359
|
/**
|
|
292
360
|
* Get the number of events in an authored event stream.
|
|
293
361
|
* Returns 0 if no events are stored for this name.
|
|
@@ -318,12 +386,15 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
318
386
|
export interface InitOutput {
|
|
319
387
|
readonly memory: WebAssembly.Memory;
|
|
320
388
|
readonly __wbg_wasmvisualiser_free: (a: number, b: number) => void;
|
|
321
|
-
readonly create_visualiser: (a:
|
|
322
|
-
readonly get_script_api_metadata_json: () =>
|
|
323
|
-
readonly
|
|
389
|
+
readonly create_visualiser: (a: number) => number;
|
|
390
|
+
readonly get_script_api_metadata_json: (a: number) => void;
|
|
391
|
+
readonly init_panic_hook: () => void;
|
|
392
|
+
readonly wasmvisualiser_analyze_signal_chain: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
324
393
|
readonly wasmvisualiser_clear_authored_event_streams: (a: number) => void;
|
|
325
394
|
readonly wasmvisualiser_clear_band_events: (a: number) => void;
|
|
326
395
|
readonly wasmvisualiser_clear_band_signals: (a: number) => void;
|
|
396
|
+
readonly wasmvisualiser_clear_composed_signals: (a: number) => void;
|
|
397
|
+
readonly wasmvisualiser_clear_custom_signals: (a: number) => void;
|
|
327
398
|
readonly wasmvisualiser_clear_event_streams: (a: number) => void;
|
|
328
399
|
readonly wasmvisualiser_clear_frequency_bands: (a: number) => void;
|
|
329
400
|
readonly wasmvisualiser_clear_isolation: (a: number) => void;
|
|
@@ -331,29 +402,35 @@ export interface InitOutput {
|
|
|
331
402
|
readonly wasmvisualiser_clear_signals: (a: number) => void;
|
|
332
403
|
readonly wasmvisualiser_clear_stem_signals: (a: number) => void;
|
|
333
404
|
readonly wasmvisualiser_get_authored_event_stream_count: (a: number, b: number, c: number) => number;
|
|
334
|
-
readonly wasmvisualiser_get_band_bounds_at: (a: number, b: number) =>
|
|
405
|
+
readonly wasmvisualiser_get_band_bounds_at: (a: number, b: number, c: number) => void;
|
|
335
406
|
readonly wasmvisualiser_get_band_event_count: (a: number, b: number, c: number) => number;
|
|
336
|
-
readonly wasmvisualiser_get_band_signal_keys: (a: number) =>
|
|
337
|
-
readonly
|
|
338
|
-
readonly
|
|
407
|
+
readonly wasmvisualiser_get_band_signal_keys: (a: number, b: number) => void;
|
|
408
|
+
readonly wasmvisualiser_get_camera_state_json: (a: number, b: number) => void;
|
|
409
|
+
readonly wasmvisualiser_get_current_vals: (a: number, b: number) => void;
|
|
410
|
+
readonly wasmvisualiser_get_custom_signal_keys: (a: number, b: number) => void;
|
|
411
|
+
readonly wasmvisualiser_get_entity_positions_json: (a: number, b: number) => void;
|
|
339
412
|
readonly wasmvisualiser_get_event_stream_count: (a: number, b: number, c: number) => number;
|
|
340
413
|
readonly wasmvisualiser_get_frequency_band_count: (a: number) => number;
|
|
341
|
-
readonly wasmvisualiser_get_script_error: (a: number) =>
|
|
342
|
-
readonly wasmvisualiser_get_script_signals: (a: number) =>
|
|
343
|
-
readonly wasmvisualiser_get_signal_names: (a: number) =>
|
|
344
|
-
readonly wasmvisualiser_get_stem_signal_keys: (a: number) =>
|
|
414
|
+
readonly wasmvisualiser_get_script_error: (a: number, b: number) => void;
|
|
415
|
+
readonly wasmvisualiser_get_script_signals: (a: number, b: number) => void;
|
|
416
|
+
readonly wasmvisualiser_get_signal_names: (a: number, b: number) => void;
|
|
417
|
+
readonly wasmvisualiser_get_stem_signal_keys: (a: number, b: number) => void;
|
|
345
418
|
readonly wasmvisualiser_has_frequency_bands: (a: number) => number;
|
|
346
419
|
readonly wasmvisualiser_has_script: (a: number) => number;
|
|
347
420
|
readonly wasmvisualiser_has_signal: (a: number, b: number, c: number) => number;
|
|
421
|
+
readonly wasmvisualiser_is_profiling_enabled: (a: number) => number;
|
|
348
422
|
readonly wasmvisualiser_isolate_entity: (a: number, b: bigint) => void;
|
|
349
|
-
readonly wasmvisualiser_list_mesh_assets: (a: number) =>
|
|
423
|
+
readonly wasmvisualiser_list_mesh_assets: (a: number, b: number) => void;
|
|
350
424
|
readonly wasmvisualiser_load_script: (a: number, b: number, c: number) => number;
|
|
351
425
|
readonly wasmvisualiser_new: () => number;
|
|
352
426
|
readonly wasmvisualiser_push_authored_event_stream: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
353
427
|
readonly wasmvisualiser_push_band_events: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
354
428
|
readonly wasmvisualiser_push_band_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
429
|
+
readonly wasmvisualiser_push_composed_signal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
430
|
+
readonly wasmvisualiser_push_custom_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
355
431
|
readonly wasmvisualiser_push_data: (a: number, b: number, c: number, d: number) => void;
|
|
356
432
|
readonly wasmvisualiser_push_event_stream: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
433
|
+
readonly wasmvisualiser_push_rotation_data: (a: number, b: number, c: number, d: number) => void;
|
|
357
434
|
readonly wasmvisualiser_push_signal: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
358
435
|
readonly wasmvisualiser_push_stem_signal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
359
436
|
readonly wasmvisualiser_push_zoom_data: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -361,30 +438,29 @@ export interface InitOutput {
|
|
|
361
438
|
readonly wasmvisualiser_render: (a: number, b: number) => void;
|
|
362
439
|
readonly wasmvisualiser_render_with_budget: (a: number, b: number, c: number) => number;
|
|
363
440
|
readonly wasmvisualiser_resize: (a: number, b: number, c: number) => void;
|
|
364
|
-
readonly wasmvisualiser_run_analysis: (a: number, b: number, c: number, d: number, e: number) =>
|
|
365
|
-
readonly wasmvisualiser_run_analysis_with_events: (a: number, b: number, c: number, d: number, e: number) =>
|
|
441
|
+
readonly wasmvisualiser_run_analysis: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
442
|
+
readonly wasmvisualiser_run_analysis_with_events: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
443
|
+
readonly wasmvisualiser_set_available_composed_signals: (a: number, b: number, c: number) => number;
|
|
444
|
+
readonly wasmvisualiser_set_available_custom_signals: (a: number, b: number, c: number) => number;
|
|
366
445
|
readonly wasmvisualiser_set_available_stems: (a: number, b: number, c: number) => number;
|
|
367
446
|
readonly wasmvisualiser_set_debug_options: (a: number, b: number, c: number) => void;
|
|
368
447
|
readonly wasmvisualiser_set_frequency_bands: (a: number, b: number, c: number) => number;
|
|
369
448
|
readonly wasmvisualiser_set_musical_time: (a: number, b: number, c: number) => number;
|
|
449
|
+
readonly wasmvisualiser_set_profiling_enabled: (a: number, b: number) => void;
|
|
370
450
|
readonly wasmvisualiser_set_sigmoid_k: (a: number, b: number) => void;
|
|
371
451
|
readonly wasmvisualiser_set_time: (a: number, b: number) => void;
|
|
372
|
-
readonly wasmvisualiser_take_script_diagnostics_json: (a: number) =>
|
|
452
|
+
readonly wasmvisualiser_take_script_diagnostics_json: (a: number, b: number) => void;
|
|
373
453
|
readonly wasmvisualiser_unregister_mesh_asset: (a: number, b: number, c: number) => number;
|
|
374
|
-
readonly
|
|
375
|
-
readonly
|
|
376
|
-
readonly
|
|
377
|
-
readonly
|
|
378
|
-
readonly
|
|
379
|
-
readonly
|
|
380
|
-
readonly
|
|
381
|
-
readonly
|
|
382
|
-
readonly
|
|
383
|
-
readonly
|
|
384
|
-
readonly __externref_table_alloc: () => number;
|
|
385
|
-
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
386
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
387
|
-
readonly __wbindgen_start: () => void;
|
|
454
|
+
readonly __wasm_bindgen_func_elem_11338: (a: number, b: number, c: number) => void;
|
|
455
|
+
readonly __wasm_bindgen_func_elem_11323: (a: number, b: number) => void;
|
|
456
|
+
readonly __wasm_bindgen_func_elem_10256: (a: number, b: number, c: number) => void;
|
|
457
|
+
readonly __wasm_bindgen_func_elem_10192: (a: number, b: number) => void;
|
|
458
|
+
readonly __wasm_bindgen_func_elem_11945: (a: number, b: number, c: number, d: number) => void;
|
|
459
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
460
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
461
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
462
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
463
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
388
464
|
}
|
|
389
465
|
|
|
390
466
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|