@vulfram/transport-wasm 0.5.5-alpha
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/lib/vulfram_core.d.ts +94 -0
- package/lib/vulfram_core.js +1752 -0
- package/lib/vulfram_core_bg.wasm +0 -0
- package/lib/vulfram_core_bg.wasm.d.ts +21 -0
- package/package.json +18 -0
- package/src/index.ts +85 -0
- package/tsconfig.json +29 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class BufferResult {
|
|
5
|
+
private constructor();
|
|
6
|
+
free(): void;
|
|
7
|
+
[Symbol.dispose](): void;
|
|
8
|
+
readonly buffer: Uint8Array;
|
|
9
|
+
readonly result: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Chroma subsampling format
|
|
14
|
+
*/
|
|
15
|
+
export enum ChromaSampling {
|
|
16
|
+
/**
|
|
17
|
+
* Both vertically and horizontally subsampled.
|
|
18
|
+
*/
|
|
19
|
+
Cs420 = 0,
|
|
20
|
+
/**
|
|
21
|
+
* Horizontally subsampled.
|
|
22
|
+
*/
|
|
23
|
+
Cs422 = 1,
|
|
24
|
+
/**
|
|
25
|
+
* Not subsampled.
|
|
26
|
+
*/
|
|
27
|
+
Cs444 = 2,
|
|
28
|
+
/**
|
|
29
|
+
* Monochrome.
|
|
30
|
+
*/
|
|
31
|
+
Cs400 = 3,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function vulfram_dispose(): number;
|
|
35
|
+
|
|
36
|
+
export function vulfram_get_profiling(): BufferResult;
|
|
37
|
+
|
|
38
|
+
export function vulfram_init(): number;
|
|
39
|
+
|
|
40
|
+
export function vulfram_receive_events(): BufferResult;
|
|
41
|
+
|
|
42
|
+
export function vulfram_receive_queue(): BufferResult;
|
|
43
|
+
|
|
44
|
+
export function vulfram_send_queue(data: Uint8Array): number;
|
|
45
|
+
|
|
46
|
+
export function vulfram_tick(time_ms: number, delta_ms: number): number;
|
|
47
|
+
|
|
48
|
+
export function vulfram_upload_buffer(id: bigint, upload_type: number, data: Uint8Array): number;
|
|
49
|
+
|
|
50
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
51
|
+
|
|
52
|
+
export interface InitOutput {
|
|
53
|
+
readonly memory: WebAssembly.Memory;
|
|
54
|
+
readonly __wbg_bufferresult_free: (a: number, b: number) => void;
|
|
55
|
+
readonly bufferresult_buffer: (a: number, b: number) => void;
|
|
56
|
+
readonly bufferresult_result: (a: number) => number;
|
|
57
|
+
readonly vulfram_dispose: () => number;
|
|
58
|
+
readonly vulfram_get_profiling: () => number;
|
|
59
|
+
readonly vulfram_init: () => number;
|
|
60
|
+
readonly vulfram_receive_events: () => number;
|
|
61
|
+
readonly vulfram_receive_queue: () => number;
|
|
62
|
+
readonly vulfram_send_queue: (a: number, b: number) => number;
|
|
63
|
+
readonly vulfram_tick: (a: number, b: number) => number;
|
|
64
|
+
readonly vulfram_upload_buffer: (a: bigint, b: number, c: number, d: number) => number;
|
|
65
|
+
readonly __wasm_bindgen_func_elem_842: (a: number, b: number, c: number) => void;
|
|
66
|
+
readonly __wasm_bindgen_func_elem_841: (a: number, b: number) => void;
|
|
67
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
68
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
69
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
70
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
71
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
78
|
+
* a precompiled `WebAssembly.Module`.
|
|
79
|
+
*
|
|
80
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
81
|
+
*
|
|
82
|
+
* @returns {InitOutput}
|
|
83
|
+
*/
|
|
84
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
88
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
89
|
+
*
|
|
90
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
91
|
+
*
|
|
92
|
+
* @returns {Promise<InitOutput>}
|
|
93
|
+
*/
|
|
94
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|