@sansavision/vidra-player 0.1.7-alpha.0 → 0.1.8-alpha.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 +5 -3
- package/wasm/package.json +20 -0
- package/wasm/vidra_wasm.d.ts +189 -0
- package/wasm/vidra_wasm.js +593 -0
- package/wasm/vidra_wasm_bg.wasm +0 -0
- package/wasm/vidra_wasm_bg.wasm.d.ts +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sansavision/vidra-player",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8-alpha.0",
|
|
4
4
|
"description": "Real-time Vidra video player for the browser — powered by WebAssembly",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"import": "./dist/index.js",
|
|
11
11
|
"types": "./dist/index.d.ts"
|
|
12
12
|
},
|
|
13
|
-
"./wasm": "./wasm/vidra_wasm.js"
|
|
13
|
+
"./wasm": "./wasm/vidra_wasm.js",
|
|
14
|
+
"./wasm/vidra_wasm.js": "./wasm/vidra_wasm.js",
|
|
15
|
+
"./wasm/*": "./wasm/*"
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
16
18
|
"dist",
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
],
|
|
20
22
|
"scripts": {
|
|
21
23
|
"build": "tsc",
|
|
22
|
-
"build:wasm": "cd ../.. && wasm-pack build crates/vidra-wasm --target web --out-dir ../../packages/vidra-player/wasm",
|
|
24
|
+
"build:wasm": "cd ../.. && wasm-pack build crates/vidra-wasm --target web --out-dir ../../packages/vidra-player/wasm && rm -f packages/vidra-player/wasm/.gitignore",
|
|
23
25
|
"build:all": "npm run build:wasm && npm run build",
|
|
24
26
|
"demo": "npm run build && npx -y serve . --cors -l 3456",
|
|
25
27
|
"dev": "npm run demo"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vidra-wasm",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"collaborators": [
|
|
5
|
+
"Vidra Team"
|
|
6
|
+
],
|
|
7
|
+
"description": "Vidra WASM module — browser-side video rendering",
|
|
8
|
+
"version": "0.1.5",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"files": [
|
|
11
|
+
"vidra_wasm_bg.wasm",
|
|
12
|
+
"vidra_wasm.js",
|
|
13
|
+
"vidra_wasm.d.ts"
|
|
14
|
+
],
|
|
15
|
+
"main": "vidra_wasm.js",
|
|
16
|
+
"types": "vidra_wasm.d.ts",
|
|
17
|
+
"sideEffects": [
|
|
18
|
+
"./snippets/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
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
|
+
/**
|
|
27
|
+
* Apply a background-removal patch to an image layer.
|
|
28
|
+
*
|
|
29
|
+
* The JS host is responsible for calling the remote API (remove.bg / Clipdrop / etc) and
|
|
30
|
+
* providing the resulting PNG-with-alpha via `load_image_asset(new_asset_id, bytes)`.
|
|
31
|
+
*
|
|
32
|
+
* This function updates the IR to:
|
|
33
|
+
* - swap `image(asset_id)` to the new asset id
|
|
34
|
+
* - remove `effect(removeBackground)` from the layer
|
|
35
|
+
*
|
|
36
|
+
* Returns updated IR JSON.
|
|
37
|
+
*/
|
|
38
|
+
export function apply_remove_background_patch(ir_json: string, layer_id: string, new_asset_id: string): string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Dispatch a click event at (x, y) for a given frame.
|
|
42
|
+
*
|
|
43
|
+
* Returns a JSON string: { handled: bool, layerId?: string }
|
|
44
|
+
*/
|
|
45
|
+
export function dispatch_click(ir_json: string, frame_index: number, x: number, y: number): string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the last mouse position set via `set_mouse_position`.
|
|
49
|
+
*
|
|
50
|
+
* Returns a JSON string: { x, y }
|
|
51
|
+
*/
|
|
52
|
+
export function get_mouse_position(): string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Get project metadata from IR JSON.
|
|
56
|
+
*
|
|
57
|
+
* Returns a JSON string: { width, height, fps, totalFrames, totalDuration, sceneCount }
|
|
58
|
+
*/
|
|
59
|
+
export function get_project_info(ir_json: string): string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get a numeric runtime state variable.
|
|
63
|
+
*
|
|
64
|
+
* Returns `null` if unset.
|
|
65
|
+
*/
|
|
66
|
+
export function get_state_var(name: string): any;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get the computed transforms and bounds of all web layers at the given frame.
|
|
70
|
+
* Returns a JSON string representing an array of { id, source, x, y, width, height, opacity, scaleX, scaleY }.
|
|
71
|
+
*/
|
|
72
|
+
export function get_web_layers_state(ir_json: string, frame_index: number): string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Initialize the WASM module. Call this once before rendering.
|
|
76
|
+
*/
|
|
77
|
+
export function init(): void;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Load an image asset (as raw bytes) into the renderer cache.
|
|
81
|
+
*
|
|
82
|
+
* Call this before rendering frames that reference the asset.
|
|
83
|
+
*/
|
|
84
|
+
export function load_image_asset(asset_id: string, data: Uint8Array): void;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Materialize an `autocaption(...)` layer using caption segments provided by the JS host.
|
|
88
|
+
*
|
|
89
|
+
* This enables web / React Native runtimes to do the network call for transcription and then
|
|
90
|
+
* feed the result into Vidra as a deterministic IR update.
|
|
91
|
+
*
|
|
92
|
+
* - `ir_json`: the project IR JSON string.
|
|
93
|
+
* - `layer_id`: id of the layer whose content is `AutoCaption`.
|
|
94
|
+
* - `segments_json`: JSON array of objects: { start_s, end_s, text }.
|
|
95
|
+
*
|
|
96
|
+
* Returns an updated IR JSON string.
|
|
97
|
+
*/
|
|
98
|
+
export function materialize_autocaption_layer(ir_json: string, layer_id: string, segments_json: string): string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Parse VidraScript source and compile to IR JSON.
|
|
102
|
+
*
|
|
103
|
+
* Returns a JSON string representing the project IR.
|
|
104
|
+
* Throws a JS error if parsing fails.
|
|
105
|
+
*/
|
|
106
|
+
export function parse_and_compile(source: string): string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Render a single frame and return RGBA pixel data.
|
|
110
|
+
*
|
|
111
|
+
* Returns a `Vec<u8>` of length `width * height * 4`.
|
|
112
|
+
*/
|
|
113
|
+
export function render_frame(ir_json: string, frame_index: number): Uint8Array;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Render a single frame from VidraScript source directly.
|
|
117
|
+
*
|
|
118
|
+
* Convenience method that combines parse + compile + render.
|
|
119
|
+
*/
|
|
120
|
+
export function render_frame_from_source(source: string, frame_index: number): Uint8Array;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Update the current mouse position (in pixel coordinates) for interactive previews.
|
|
124
|
+
*
|
|
125
|
+
* Note: this currently does not affect rendering output yet; it is exposed as
|
|
126
|
+
* plumbing for upcoming interactive expressions and event handling.
|
|
127
|
+
*/
|
|
128
|
+
export function set_mouse_position(x: number, y: number): void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Set a numeric runtime state variable used by interactive expressions and event handlers.
|
|
132
|
+
*/
|
|
133
|
+
export function set_state_var(name: string, value: number): void;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get the version string.
|
|
137
|
+
*/
|
|
138
|
+
export function version(): string;
|
|
139
|
+
|
|
140
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
141
|
+
|
|
142
|
+
export interface InitOutput {
|
|
143
|
+
readonly memory: WebAssembly.Memory;
|
|
144
|
+
readonly apply_remove_background_patch: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
145
|
+
readonly dispatch_click: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
146
|
+
readonly get_mouse_position: () => [number, number];
|
|
147
|
+
readonly get_project_info: (a: number, b: number) => [number, number, number, number];
|
|
148
|
+
readonly get_state_var: (a: number, b: number) => any;
|
|
149
|
+
readonly get_web_layers_state: (a: number, b: number, c: number) => [number, number, number, number];
|
|
150
|
+
readonly load_image_asset: (a: number, b: number, c: number, d: number) => void;
|
|
151
|
+
readonly materialize_autocaption_layer: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
152
|
+
readonly parse_and_compile: (a: number, b: number) => [number, number, number, number];
|
|
153
|
+
readonly render_frame: (a: number, b: number, c: number) => [number, number, number, number];
|
|
154
|
+
readonly render_frame_from_source: (a: number, b: number, c: number) => [number, number, number, number];
|
|
155
|
+
readonly set_state_var: (a: number, b: number, c: number) => void;
|
|
156
|
+
readonly version: () => [number, number];
|
|
157
|
+
readonly init: () => void;
|
|
158
|
+
readonly set_mouse_position: (a: number, b: number) => void;
|
|
159
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
160
|
+
readonly __externref_table_alloc: () => number;
|
|
161
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
162
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
163
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
164
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
165
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
166
|
+
readonly __wbindgen_start: () => void;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
173
|
+
* a precompiled `WebAssembly.Module`.
|
|
174
|
+
*
|
|
175
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
176
|
+
*
|
|
177
|
+
* @returns {InitOutput}
|
|
178
|
+
*/
|
|
179
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
183
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
184
|
+
*
|
|
185
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
186
|
+
*
|
|
187
|
+
* @returns {Promise<InitOutput>}
|
|
188
|
+
*/
|
|
189
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
/* @ts-self-types="./vidra_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Chroma subsampling format
|
|
5
|
+
* @enum {0 | 1 | 2 | 3}
|
|
6
|
+
*/
|
|
7
|
+
export const ChromaSampling = Object.freeze({
|
|
8
|
+
/**
|
|
9
|
+
* Both vertically and horizontally subsampled.
|
|
10
|
+
*/
|
|
11
|
+
Cs420: 0, "0": "Cs420",
|
|
12
|
+
/**
|
|
13
|
+
* Horizontally subsampled.
|
|
14
|
+
*/
|
|
15
|
+
Cs422: 1, "1": "Cs422",
|
|
16
|
+
/**
|
|
17
|
+
* Not subsampled.
|
|
18
|
+
*/
|
|
19
|
+
Cs444: 2, "2": "Cs444",
|
|
20
|
+
/**
|
|
21
|
+
* Monochrome.
|
|
22
|
+
*/
|
|
23
|
+
Cs400: 3, "3": "Cs400",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Apply a background-removal patch to an image layer.
|
|
28
|
+
*
|
|
29
|
+
* The JS host is responsible for calling the remote API (remove.bg / Clipdrop / etc) and
|
|
30
|
+
* providing the resulting PNG-with-alpha via `load_image_asset(new_asset_id, bytes)`.
|
|
31
|
+
*
|
|
32
|
+
* This function updates the IR to:
|
|
33
|
+
* - swap `image(asset_id)` to the new asset id
|
|
34
|
+
* - remove `effect(removeBackground)` from the layer
|
|
35
|
+
*
|
|
36
|
+
* Returns updated IR JSON.
|
|
37
|
+
* @param {string} ir_json
|
|
38
|
+
* @param {string} layer_id
|
|
39
|
+
* @param {string} new_asset_id
|
|
40
|
+
* @returns {string}
|
|
41
|
+
*/
|
|
42
|
+
export function apply_remove_background_patch(ir_json, layer_id, new_asset_id) {
|
|
43
|
+
let deferred5_0;
|
|
44
|
+
let deferred5_1;
|
|
45
|
+
try {
|
|
46
|
+
const ptr0 = passStringToWasm0(ir_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
47
|
+
const len0 = WASM_VECTOR_LEN;
|
|
48
|
+
const ptr1 = passStringToWasm0(layer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
49
|
+
const len1 = WASM_VECTOR_LEN;
|
|
50
|
+
const ptr2 = passStringToWasm0(new_asset_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
51
|
+
const len2 = WASM_VECTOR_LEN;
|
|
52
|
+
const ret = wasm.apply_remove_background_patch(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
53
|
+
var ptr4 = ret[0];
|
|
54
|
+
var len4 = ret[1];
|
|
55
|
+
if (ret[3]) {
|
|
56
|
+
ptr4 = 0; len4 = 0;
|
|
57
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
58
|
+
}
|
|
59
|
+
deferred5_0 = ptr4;
|
|
60
|
+
deferred5_1 = len4;
|
|
61
|
+
return getStringFromWasm0(ptr4, len4);
|
|
62
|
+
} finally {
|
|
63
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Dispatch a click event at (x, y) for a given frame.
|
|
69
|
+
*
|
|
70
|
+
* Returns a JSON string: { handled: bool, layerId?: string }
|
|
71
|
+
* @param {string} ir_json
|
|
72
|
+
* @param {number} frame_index
|
|
73
|
+
* @param {number} x
|
|
74
|
+
* @param {number} y
|
|
75
|
+
* @returns {string}
|
|
76
|
+
*/
|
|
77
|
+
export function dispatch_click(ir_json, frame_index, x, y) {
|
|
78
|
+
let deferred3_0;
|
|
79
|
+
let deferred3_1;
|
|
80
|
+
try {
|
|
81
|
+
const ptr0 = passStringToWasm0(ir_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
82
|
+
const len0 = WASM_VECTOR_LEN;
|
|
83
|
+
const ret = wasm.dispatch_click(ptr0, len0, frame_index, x, y);
|
|
84
|
+
var ptr2 = ret[0];
|
|
85
|
+
var len2 = ret[1];
|
|
86
|
+
if (ret[3]) {
|
|
87
|
+
ptr2 = 0; len2 = 0;
|
|
88
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
89
|
+
}
|
|
90
|
+
deferred3_0 = ptr2;
|
|
91
|
+
deferred3_1 = len2;
|
|
92
|
+
return getStringFromWasm0(ptr2, len2);
|
|
93
|
+
} finally {
|
|
94
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get the last mouse position set via `set_mouse_position`.
|
|
100
|
+
*
|
|
101
|
+
* Returns a JSON string: { x, y }
|
|
102
|
+
* @returns {string}
|
|
103
|
+
*/
|
|
104
|
+
export function get_mouse_position() {
|
|
105
|
+
let deferred1_0;
|
|
106
|
+
let deferred1_1;
|
|
107
|
+
try {
|
|
108
|
+
const ret = wasm.get_mouse_position();
|
|
109
|
+
deferred1_0 = ret[0];
|
|
110
|
+
deferred1_1 = ret[1];
|
|
111
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
112
|
+
} finally {
|
|
113
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Get project metadata from IR JSON.
|
|
119
|
+
*
|
|
120
|
+
* Returns a JSON string: { width, height, fps, totalFrames, totalDuration, sceneCount }
|
|
121
|
+
* @param {string} ir_json
|
|
122
|
+
* @returns {string}
|
|
123
|
+
*/
|
|
124
|
+
export function get_project_info(ir_json) {
|
|
125
|
+
let deferred3_0;
|
|
126
|
+
let deferred3_1;
|
|
127
|
+
try {
|
|
128
|
+
const ptr0 = passStringToWasm0(ir_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
129
|
+
const len0 = WASM_VECTOR_LEN;
|
|
130
|
+
const ret = wasm.get_project_info(ptr0, len0);
|
|
131
|
+
var ptr2 = ret[0];
|
|
132
|
+
var len2 = ret[1];
|
|
133
|
+
if (ret[3]) {
|
|
134
|
+
ptr2 = 0; len2 = 0;
|
|
135
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
136
|
+
}
|
|
137
|
+
deferred3_0 = ptr2;
|
|
138
|
+
deferred3_1 = len2;
|
|
139
|
+
return getStringFromWasm0(ptr2, len2);
|
|
140
|
+
} finally {
|
|
141
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get a numeric runtime state variable.
|
|
147
|
+
*
|
|
148
|
+
* Returns `null` if unset.
|
|
149
|
+
* @param {string} name
|
|
150
|
+
* @returns {any}
|
|
151
|
+
*/
|
|
152
|
+
export function get_state_var(name) {
|
|
153
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
154
|
+
const len0 = WASM_VECTOR_LEN;
|
|
155
|
+
const ret = wasm.get_state_var(ptr0, len0);
|
|
156
|
+
return ret;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Get the computed transforms and bounds of all web layers at the given frame.
|
|
161
|
+
* Returns a JSON string representing an array of { id, source, x, y, width, height, opacity, scaleX, scaleY }.
|
|
162
|
+
* @param {string} ir_json
|
|
163
|
+
* @param {number} frame_index
|
|
164
|
+
* @returns {string}
|
|
165
|
+
*/
|
|
166
|
+
export function get_web_layers_state(ir_json, frame_index) {
|
|
167
|
+
let deferred3_0;
|
|
168
|
+
let deferred3_1;
|
|
169
|
+
try {
|
|
170
|
+
const ptr0 = passStringToWasm0(ir_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
171
|
+
const len0 = WASM_VECTOR_LEN;
|
|
172
|
+
const ret = wasm.get_web_layers_state(ptr0, len0, frame_index);
|
|
173
|
+
var ptr2 = ret[0];
|
|
174
|
+
var len2 = ret[1];
|
|
175
|
+
if (ret[3]) {
|
|
176
|
+
ptr2 = 0; len2 = 0;
|
|
177
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
178
|
+
}
|
|
179
|
+
deferred3_0 = ptr2;
|
|
180
|
+
deferred3_1 = len2;
|
|
181
|
+
return getStringFromWasm0(ptr2, len2);
|
|
182
|
+
} finally {
|
|
183
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Initialize the WASM module. Call this once before rendering.
|
|
189
|
+
*/
|
|
190
|
+
export function init() {
|
|
191
|
+
wasm.init();
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Load an image asset (as raw bytes) into the renderer cache.
|
|
196
|
+
*
|
|
197
|
+
* Call this before rendering frames that reference the asset.
|
|
198
|
+
* @param {string} asset_id
|
|
199
|
+
* @param {Uint8Array} data
|
|
200
|
+
*/
|
|
201
|
+
export function load_image_asset(asset_id, data) {
|
|
202
|
+
const ptr0 = passStringToWasm0(asset_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
203
|
+
const len0 = WASM_VECTOR_LEN;
|
|
204
|
+
const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
205
|
+
const len1 = WASM_VECTOR_LEN;
|
|
206
|
+
wasm.load_image_asset(ptr0, len0, ptr1, len1);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Materialize an `autocaption(...)` layer using caption segments provided by the JS host.
|
|
211
|
+
*
|
|
212
|
+
* This enables web / React Native runtimes to do the network call for transcription and then
|
|
213
|
+
* feed the result into Vidra as a deterministic IR update.
|
|
214
|
+
*
|
|
215
|
+
* - `ir_json`: the project IR JSON string.
|
|
216
|
+
* - `layer_id`: id of the layer whose content is `AutoCaption`.
|
|
217
|
+
* - `segments_json`: JSON array of objects: { start_s, end_s, text }.
|
|
218
|
+
*
|
|
219
|
+
* Returns an updated IR JSON string.
|
|
220
|
+
* @param {string} ir_json
|
|
221
|
+
* @param {string} layer_id
|
|
222
|
+
* @param {string} segments_json
|
|
223
|
+
* @returns {string}
|
|
224
|
+
*/
|
|
225
|
+
export function materialize_autocaption_layer(ir_json, layer_id, segments_json) {
|
|
226
|
+
let deferred5_0;
|
|
227
|
+
let deferred5_1;
|
|
228
|
+
try {
|
|
229
|
+
const ptr0 = passStringToWasm0(ir_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
230
|
+
const len0 = WASM_VECTOR_LEN;
|
|
231
|
+
const ptr1 = passStringToWasm0(layer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
232
|
+
const len1 = WASM_VECTOR_LEN;
|
|
233
|
+
const ptr2 = passStringToWasm0(segments_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
+
const len2 = WASM_VECTOR_LEN;
|
|
235
|
+
const ret = wasm.materialize_autocaption_layer(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
236
|
+
var ptr4 = ret[0];
|
|
237
|
+
var len4 = ret[1];
|
|
238
|
+
if (ret[3]) {
|
|
239
|
+
ptr4 = 0; len4 = 0;
|
|
240
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
241
|
+
}
|
|
242
|
+
deferred5_0 = ptr4;
|
|
243
|
+
deferred5_1 = len4;
|
|
244
|
+
return getStringFromWasm0(ptr4, len4);
|
|
245
|
+
} finally {
|
|
246
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Parse VidraScript source and compile to IR JSON.
|
|
252
|
+
*
|
|
253
|
+
* Returns a JSON string representing the project IR.
|
|
254
|
+
* Throws a JS error if parsing fails.
|
|
255
|
+
* @param {string} source
|
|
256
|
+
* @returns {string}
|
|
257
|
+
*/
|
|
258
|
+
export function parse_and_compile(source) {
|
|
259
|
+
let deferred3_0;
|
|
260
|
+
let deferred3_1;
|
|
261
|
+
try {
|
|
262
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
|
+
const len0 = WASM_VECTOR_LEN;
|
|
264
|
+
const ret = wasm.parse_and_compile(ptr0, len0);
|
|
265
|
+
var ptr2 = ret[0];
|
|
266
|
+
var len2 = ret[1];
|
|
267
|
+
if (ret[3]) {
|
|
268
|
+
ptr2 = 0; len2 = 0;
|
|
269
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
270
|
+
}
|
|
271
|
+
deferred3_0 = ptr2;
|
|
272
|
+
deferred3_1 = len2;
|
|
273
|
+
return getStringFromWasm0(ptr2, len2);
|
|
274
|
+
} finally {
|
|
275
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Render a single frame and return RGBA pixel data.
|
|
281
|
+
*
|
|
282
|
+
* Returns a `Vec<u8>` of length `width * height * 4`.
|
|
283
|
+
* @param {string} ir_json
|
|
284
|
+
* @param {number} frame_index
|
|
285
|
+
* @returns {Uint8Array}
|
|
286
|
+
*/
|
|
287
|
+
export function render_frame(ir_json, frame_index) {
|
|
288
|
+
const ptr0 = passStringToWasm0(ir_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
289
|
+
const len0 = WASM_VECTOR_LEN;
|
|
290
|
+
const ret = wasm.render_frame(ptr0, len0, frame_index);
|
|
291
|
+
if (ret[3]) {
|
|
292
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
293
|
+
}
|
|
294
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
295
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
296
|
+
return v2;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Render a single frame from VidraScript source directly.
|
|
301
|
+
*
|
|
302
|
+
* Convenience method that combines parse + compile + render.
|
|
303
|
+
* @param {string} source
|
|
304
|
+
* @param {number} frame_index
|
|
305
|
+
* @returns {Uint8Array}
|
|
306
|
+
*/
|
|
307
|
+
export function render_frame_from_source(source, frame_index) {
|
|
308
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
|
+
const len0 = WASM_VECTOR_LEN;
|
|
310
|
+
const ret = wasm.render_frame_from_source(ptr0, len0, frame_index);
|
|
311
|
+
if (ret[3]) {
|
|
312
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
313
|
+
}
|
|
314
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
315
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
316
|
+
return v2;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Update the current mouse position (in pixel coordinates) for interactive previews.
|
|
321
|
+
*
|
|
322
|
+
* Note: this currently does not affect rendering output yet; it is exposed as
|
|
323
|
+
* plumbing for upcoming interactive expressions and event handling.
|
|
324
|
+
* @param {number} x
|
|
325
|
+
* @param {number} y
|
|
326
|
+
*/
|
|
327
|
+
export function set_mouse_position(x, y) {
|
|
328
|
+
wasm.set_mouse_position(x, y);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Set a numeric runtime state variable used by interactive expressions and event handlers.
|
|
333
|
+
* @param {string} name
|
|
334
|
+
* @param {number} value
|
|
335
|
+
*/
|
|
336
|
+
export function set_state_var(name, value) {
|
|
337
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
338
|
+
const len0 = WASM_VECTOR_LEN;
|
|
339
|
+
wasm.set_state_var(ptr0, len0, value);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Get the version string.
|
|
344
|
+
* @returns {string}
|
|
345
|
+
*/
|
|
346
|
+
export function version() {
|
|
347
|
+
let deferred1_0;
|
|
348
|
+
let deferred1_1;
|
|
349
|
+
try {
|
|
350
|
+
const ret = wasm.version();
|
|
351
|
+
deferred1_0 = ret[0];
|
|
352
|
+
deferred1_1 = ret[1];
|
|
353
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
354
|
+
} finally {
|
|
355
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function __wbg_get_imports() {
|
|
360
|
+
const import0 = {
|
|
361
|
+
__proto__: null,
|
|
362
|
+
__wbg_getRandomValues_3dda8830c2565714: function() { return handleError(function (arg0, arg1) {
|
|
363
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
364
|
+
}, arguments); },
|
|
365
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
366
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
367
|
+
const ret = arg0;
|
|
368
|
+
return ret;
|
|
369
|
+
},
|
|
370
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
371
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
372
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
373
|
+
return ret;
|
|
374
|
+
},
|
|
375
|
+
__wbindgen_init_externref_table: function() {
|
|
376
|
+
const table = wasm.__wbindgen_externrefs;
|
|
377
|
+
const offset = table.grow(4);
|
|
378
|
+
table.set(0, undefined);
|
|
379
|
+
table.set(offset + 0, undefined);
|
|
380
|
+
table.set(offset + 1, null);
|
|
381
|
+
table.set(offset + 2, true);
|
|
382
|
+
table.set(offset + 3, false);
|
|
383
|
+
},
|
|
384
|
+
};
|
|
385
|
+
return {
|
|
386
|
+
__proto__: null,
|
|
387
|
+
"./vidra_wasm_bg.js": import0,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function addToExternrefTable0(obj) {
|
|
392
|
+
const idx = wasm.__externref_table_alloc();
|
|
393
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
394
|
+
return idx;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
398
|
+
ptr = ptr >>> 0;
|
|
399
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function getStringFromWasm0(ptr, len) {
|
|
403
|
+
ptr = ptr >>> 0;
|
|
404
|
+
return decodeText(ptr, len);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
let cachedUint8ArrayMemory0 = null;
|
|
408
|
+
function getUint8ArrayMemory0() {
|
|
409
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
410
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
411
|
+
}
|
|
412
|
+
return cachedUint8ArrayMemory0;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function handleError(f, args) {
|
|
416
|
+
try {
|
|
417
|
+
return f.apply(this, args);
|
|
418
|
+
} catch (e) {
|
|
419
|
+
const idx = addToExternrefTable0(e);
|
|
420
|
+
wasm.__wbindgen_exn_store(idx);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
425
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
426
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
427
|
+
WASM_VECTOR_LEN = arg.length;
|
|
428
|
+
return ptr;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
432
|
+
if (realloc === undefined) {
|
|
433
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
434
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
435
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
436
|
+
WASM_VECTOR_LEN = buf.length;
|
|
437
|
+
return ptr;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
let len = arg.length;
|
|
441
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
442
|
+
|
|
443
|
+
const mem = getUint8ArrayMemory0();
|
|
444
|
+
|
|
445
|
+
let offset = 0;
|
|
446
|
+
|
|
447
|
+
for (; offset < len; offset++) {
|
|
448
|
+
const code = arg.charCodeAt(offset);
|
|
449
|
+
if (code > 0x7F) break;
|
|
450
|
+
mem[ptr + offset] = code;
|
|
451
|
+
}
|
|
452
|
+
if (offset !== len) {
|
|
453
|
+
if (offset !== 0) {
|
|
454
|
+
arg = arg.slice(offset);
|
|
455
|
+
}
|
|
456
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
457
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
458
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
459
|
+
|
|
460
|
+
offset += ret.written;
|
|
461
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
WASM_VECTOR_LEN = offset;
|
|
465
|
+
return ptr;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function takeFromExternrefTable0(idx) {
|
|
469
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
470
|
+
wasm.__externref_table_dealloc(idx);
|
|
471
|
+
return value;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
475
|
+
cachedTextDecoder.decode();
|
|
476
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
477
|
+
let numBytesDecoded = 0;
|
|
478
|
+
function decodeText(ptr, len) {
|
|
479
|
+
numBytesDecoded += len;
|
|
480
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
481
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
482
|
+
cachedTextDecoder.decode();
|
|
483
|
+
numBytesDecoded = len;
|
|
484
|
+
}
|
|
485
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const cachedTextEncoder = new TextEncoder();
|
|
489
|
+
|
|
490
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
491
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
492
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
493
|
+
view.set(buf);
|
|
494
|
+
return {
|
|
495
|
+
read: arg.length,
|
|
496
|
+
written: buf.length
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
let WASM_VECTOR_LEN = 0;
|
|
502
|
+
|
|
503
|
+
let wasmModule, wasm;
|
|
504
|
+
function __wbg_finalize_init(instance, module) {
|
|
505
|
+
wasm = instance.exports;
|
|
506
|
+
wasmModule = module;
|
|
507
|
+
cachedUint8ArrayMemory0 = null;
|
|
508
|
+
wasm.__wbindgen_start();
|
|
509
|
+
return wasm;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
async function __wbg_load(module, imports) {
|
|
513
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
514
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
515
|
+
try {
|
|
516
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
517
|
+
} catch (e) {
|
|
518
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
519
|
+
|
|
520
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
521
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
522
|
+
|
|
523
|
+
} else { throw e; }
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
const bytes = await module.arrayBuffer();
|
|
528
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
529
|
+
} else {
|
|
530
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
531
|
+
|
|
532
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
533
|
+
return { instance, module };
|
|
534
|
+
} else {
|
|
535
|
+
return instance;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
function expectedResponseType(type) {
|
|
540
|
+
switch (type) {
|
|
541
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
542
|
+
}
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
function initSync(module) {
|
|
548
|
+
if (wasm !== undefined) return wasm;
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
if (module !== undefined) {
|
|
552
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
553
|
+
({module} = module)
|
|
554
|
+
} else {
|
|
555
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
const imports = __wbg_get_imports();
|
|
560
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
561
|
+
module = new WebAssembly.Module(module);
|
|
562
|
+
}
|
|
563
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
564
|
+
return __wbg_finalize_init(instance, module);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
async function __wbg_init(module_or_path) {
|
|
568
|
+
if (wasm !== undefined) return wasm;
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
if (module_or_path !== undefined) {
|
|
572
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
573
|
+
({module_or_path} = module_or_path)
|
|
574
|
+
} else {
|
|
575
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
if (module_or_path === undefined) {
|
|
580
|
+
module_or_path = new URL('vidra_wasm_bg.wasm', import.meta.url);
|
|
581
|
+
}
|
|
582
|
+
const imports = __wbg_get_imports();
|
|
583
|
+
|
|
584
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
585
|
+
module_or_path = fetch(module_or_path);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
589
|
+
|
|
590
|
+
return __wbg_finalize_init(instance, module);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const apply_remove_background_patch: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
5
|
+
export const dispatch_click: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
6
|
+
export const get_mouse_position: () => [number, number];
|
|
7
|
+
export const get_project_info: (a: number, b: number) => [number, number, number, number];
|
|
8
|
+
export const get_state_var: (a: number, b: number) => any;
|
|
9
|
+
export const get_web_layers_state: (a: number, b: number, c: number) => [number, number, number, number];
|
|
10
|
+
export const load_image_asset: (a: number, b: number, c: number, d: number) => void;
|
|
11
|
+
export const materialize_autocaption_layer: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
12
|
+
export const parse_and_compile: (a: number, b: number) => [number, number, number, number];
|
|
13
|
+
export const render_frame: (a: number, b: number, c: number) => [number, number, number, number];
|
|
14
|
+
export const render_frame_from_source: (a: number, b: number, c: number) => [number, number, number, number];
|
|
15
|
+
export const set_state_var: (a: number, b: number, c: number) => void;
|
|
16
|
+
export const version: () => [number, number];
|
|
17
|
+
export const init: () => void;
|
|
18
|
+
export const set_mouse_position: (a: number, b: number) => void;
|
|
19
|
+
export const __wbindgen_exn_store: (a: number) => void;
|
|
20
|
+
export const __externref_table_alloc: () => number;
|
|
21
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
22
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
23
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
24
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
25
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
26
|
+
export const __wbindgen_start: () => void;
|