cosmol_viewer_wasm 0.2.7

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.
@@ -0,0 +1,80 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Chroma subsampling format
6
+ */
7
+ export enum ChromaSampling {
8
+ /**
9
+ * Both vertically and horizontally subsampled.
10
+ */
11
+ Cs420 = 0,
12
+ /**
13
+ * Horizontally subsampled.
14
+ */
15
+ Cs422 = 1,
16
+ /**
17
+ * Not subsampled.
18
+ */
19
+ Cs444 = 2,
20
+ /**
21
+ * Monochrome.
22
+ */
23
+ Cs400 = 3,
24
+ }
25
+
26
+ export class WebHandle {
27
+ free(): void;
28
+ [Symbol.dispose](): void;
29
+ initiate_viewer_and_play(_canvas: HTMLCanvasElement, _animation_compressed: string): Promise<void>;
30
+ constructor();
31
+ start_with_scene(_canvas: HTMLCanvasElement, _scene_json: string): Promise<void>;
32
+ take_screenshot(): Promise<string>;
33
+ update_scene(scene_json: string): Promise<void>;
34
+ }
35
+
36
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
37
+
38
+ export interface InitOutput {
39
+ readonly memory: WebAssembly.Memory;
40
+ readonly __wbg_webhandle_free: (a: number, b: number) => void;
41
+ readonly webhandle_initiate_viewer_and_play: (a: number, b: number, c: number, d: number) => number;
42
+ readonly webhandle_new: () => number;
43
+ readonly webhandle_start_with_scene: (a: number, b: number, c: number, d: number) => number;
44
+ readonly webhandle_take_screenshot: (a: number) => number;
45
+ readonly webhandle_update_scene: (a: number, b: number, c: number) => number;
46
+ readonly __wasm_bindgen_func_elem_1370: (a: number, b: number) => void;
47
+ readonly __wasm_bindgen_func_elem_7355: (a: number, b: number) => void;
48
+ readonly __wasm_bindgen_func_elem_9261: (a: number, b: number, c: number, d: number) => void;
49
+ readonly __wasm_bindgen_func_elem_9272: (a: number, b: number, c: number, d: number) => void;
50
+ readonly __wasm_bindgen_func_elem_1549: (a: number, b: number, c: number) => void;
51
+ readonly __wasm_bindgen_func_elem_1549_1: (a: number, b: number, c: number) => void;
52
+ readonly __wasm_bindgen_func_elem_1547: (a: number, b: number, c: number) => void;
53
+ readonly __wbindgen_export: (a: number, b: number) => number;
54
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
55
+ readonly __wbindgen_export3: (a: number) => void;
56
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
57
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
58
+ }
59
+
60
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
61
+
62
+ /**
63
+ * Instantiates the given `module`, which can either be bytes or
64
+ * a precompiled `WebAssembly.Module`.
65
+ *
66
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
67
+ *
68
+ * @returns {InitOutput}
69
+ */
70
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
71
+
72
+ /**
73
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
74
+ * for everything else, calls `WebAssembly.instantiate` directly.
75
+ *
76
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
77
+ *
78
+ * @returns {Promise<InitOutput>}
79
+ */
80
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;