proteus-sdk 0.0.0-stage → 0.1.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/README.md +69 -2
- package/dist/convert.d.ts +24 -0
- package/dist/convert.js +76 -0
- package/dist/index.d.ts +586 -0
- package/dist/index.js +750 -0
- package/dist/mount.d.ts +57 -0
- package/dist/mount.js +32 -0
- package/dist/types.d.ts +586 -0
- package/dist/types.js +9 -0
- package/package.json +53 -4
- package/pkg/README.md +11 -0
- package/pkg/package.json +34 -0
- package/pkg/proteus_sdk_web.d.ts +309 -0
- package/pkg/proteus_sdk_web.js +9 -0
- package/pkg/proteus_sdk_web_bg.js +1671 -0
- package/pkg/proteus_sdk_web_bg.wasm +0 -0
- package/pkg/proteus_sdk_web_bg.wasm.d.ts +76 -0
- package/pkg-host/README.md +11 -0
- package/pkg-host/package.json +34 -0
- package/pkg-host/proteus_host_web.d.ts +323 -0
- package/pkg-host/proteus_host_web.js +9 -0
- package/pkg-host/proteus_host_web_bg.js +3428 -0
- package/pkg-host/proteus_host_web_bg.wasm +0 -0
- package/pkg-host/proteus_host_web_bg.wasm.d.ts +84 -0
|
@@ -0,0 +1,1671 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A handle to a component.
|
|
3
|
+
*/
|
|
4
|
+
export class Handle {
|
|
5
|
+
static __wrap(ptr) {
|
|
6
|
+
const obj = Object.create(Handle.prototype);
|
|
7
|
+
obj.__wbg_ptr = ptr;
|
|
8
|
+
HandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
9
|
+
return obj;
|
|
10
|
+
}
|
|
11
|
+
__destroy_into_raw() {
|
|
12
|
+
const ptr = this.__wbg_ptr;
|
|
13
|
+
this.__wbg_ptr = 0;
|
|
14
|
+
HandleFinalization.unregister(this);
|
|
15
|
+
return ptr;
|
|
16
|
+
}
|
|
17
|
+
free() {
|
|
18
|
+
const ptr = this.__destroy_into_raw();
|
|
19
|
+
wasm.__wbg_handle_free(ptr, 0);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns a handle for an ID from [`Handle::id`] or
|
|
23
|
+
* `ComponentData.children`. The ID isn't checked: if its component has
|
|
24
|
+
* been destroyed, methods that change it throw and `get` returns
|
|
25
|
+
* `undefined`.
|
|
26
|
+
* @param {number} id
|
|
27
|
+
* @returns {Handle}
|
|
28
|
+
*/
|
|
29
|
+
static fromId(id) {
|
|
30
|
+
const ret = wasm.handle_fromId(id);
|
|
31
|
+
return Handle.__wrap(ret);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The component's ID: its entity's bits as a number, which is exact for
|
|
35
|
+
* any realistic app (see the `dto` module). [`Handle::from_id`] turns it
|
|
36
|
+
* back into a handle.
|
|
37
|
+
* @returns {number}
|
|
38
|
+
*/
|
|
39
|
+
id() {
|
|
40
|
+
const ret = wasm.handle_id(this.__wbg_ptr);
|
|
41
|
+
return ret;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (Symbol.dispose) Handle.prototype[Symbol.dispose] = Handle.prototype.free;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A [`Proteus`](sdk::Proteus) app, as JavaScript sees it. Cloning shares the
|
|
48
|
+
* same app.
|
|
49
|
+
*/
|
|
50
|
+
export class ProteusApp {
|
|
51
|
+
__destroy_into_raw() {
|
|
52
|
+
const ptr = this.__wbg_ptr;
|
|
53
|
+
this.__wbg_ptr = 0;
|
|
54
|
+
ProteusAppFinalization.unregister(this);
|
|
55
|
+
return ptr;
|
|
56
|
+
}
|
|
57
|
+
free() {
|
|
58
|
+
const ptr = this.__destroy_into_raw();
|
|
59
|
+
wasm.__wbg_proteusapp_free(ptr, 0);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Calls [`Handle::add_child`](sdk::Handle::add_child).
|
|
63
|
+
* @param {Handle} parent
|
|
64
|
+
* @param {Handle} child
|
|
65
|
+
*/
|
|
66
|
+
addChild(parent, child) {
|
|
67
|
+
_assertClass(parent, Handle);
|
|
68
|
+
_assertClass(child, Handle);
|
|
69
|
+
const ret = wasm.proteusapp_addChild(this.__wbg_ptr, parent.__wbg_ptr, child.__wbg_ptr);
|
|
70
|
+
if (ret[1]) {
|
|
71
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Calls [`Handle::animate_to`](sdk::Handle::animate_to).
|
|
76
|
+
* @param {Handle} handle
|
|
77
|
+
* @param {any} to
|
|
78
|
+
* @param {any} config
|
|
79
|
+
*/
|
|
80
|
+
animateTo(handle, to, config) {
|
|
81
|
+
_assertClass(handle, Handle);
|
|
82
|
+
const ret = wasm.proteusapp_animateTo(this.__wbg_ptr, handle.__wbg_ptr, to, config);
|
|
83
|
+
if (ret[1]) {
|
|
84
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Calls [`Proteus::bake_texture`](sdk::Proteus::bake_texture).
|
|
89
|
+
* @param {number} width
|
|
90
|
+
* @param {number} height
|
|
91
|
+
* @param {Uint8Array} rgba
|
|
92
|
+
* @param {any} request
|
|
93
|
+
* @returns {TextureHandle}
|
|
94
|
+
*/
|
|
95
|
+
bakeTexture(width, height, rgba, request) {
|
|
96
|
+
const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
97
|
+
const len0 = WASM_VECTOR_LEN;
|
|
98
|
+
const ret = wasm.proteusapp_bakeTexture(this.__wbg_ptr, width, height, ptr0, len0, request);
|
|
99
|
+
return TextureHandle.__wrap(ret);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Calls [`Handle::baked_image_size`](sdk::Handle::baked_image_size).
|
|
103
|
+
* Returns `undefined` if there is no baked image.
|
|
104
|
+
* @param {Handle} handle
|
|
105
|
+
* @returns {any}
|
|
106
|
+
*/
|
|
107
|
+
bakedImageSize(handle) {
|
|
108
|
+
_assertClass(handle, Handle);
|
|
109
|
+
const ret = wasm.proteusapp_bakedImageSize(this.__wbg_ptr, handle.__wbg_ptr);
|
|
110
|
+
return ret;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Calls [`Handle::baked_text_size`](sdk::Handle::baked_text_size).
|
|
114
|
+
* Returns `undefined` if there is no baked text.
|
|
115
|
+
* @param {Handle} handle
|
|
116
|
+
* @returns {any}
|
|
117
|
+
*/
|
|
118
|
+
bakedTextSize(handle) {
|
|
119
|
+
_assertClass(handle, Handle);
|
|
120
|
+
const ret = wasm.proteusapp_bakedTextSize(this.__wbg_ptr, handle.__wbg_ptr);
|
|
121
|
+
return ret;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Calls [`TransitionChannel::destroy`](sdk::TransitionChannel::destroy). Consumes
|
|
125
|
+
* `channel`: the JavaScript object can't be used afterwards.
|
|
126
|
+
* @param {TransitionChannel} channel
|
|
127
|
+
*/
|
|
128
|
+
channelDestroy(channel) {
|
|
129
|
+
_assertClass(channel, TransitionChannel);
|
|
130
|
+
var ptr0 = channel.__destroy_into_raw();
|
|
131
|
+
wasm.proteusapp_channelDestroy(this.__wbg_ptr, ptr0);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Calls [`TransitionChannel::set`](sdk::TransitionChannel::set).
|
|
135
|
+
* @param {TransitionChannel} channel
|
|
136
|
+
* @param {Handle} to
|
|
137
|
+
* @param {Handle} from
|
|
138
|
+
* @param {any} config
|
|
139
|
+
* @param {boolean} interruptible
|
|
140
|
+
*/
|
|
141
|
+
channelSet(channel, to, from, config, interruptible) {
|
|
142
|
+
_assertClass(channel, TransitionChannel);
|
|
143
|
+
_assertClass(to, Handle);
|
|
144
|
+
_assertClass(from, Handle);
|
|
145
|
+
const ret = wasm.proteusapp_channelSet(this.__wbg_ptr, channel.__wbg_ptr, to.__wbg_ptr, from.__wbg_ptr, config, interruptible);
|
|
146
|
+
if (ret[1]) {
|
|
147
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Calls [`Proteus::component`](sdk::Proteus::component). `spec` is a
|
|
152
|
+
* `ComponentSpec` object; its `children` are handle IDs.
|
|
153
|
+
* @param {any} spec
|
|
154
|
+
* @returns {Handle}
|
|
155
|
+
*/
|
|
156
|
+
component(spec) {
|
|
157
|
+
const ret = wasm.proteusapp_component(this.__wbg_ptr, spec);
|
|
158
|
+
if (ret[2]) {
|
|
159
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
160
|
+
}
|
|
161
|
+
return Handle.__wrap(ret[0]);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Calls [`Handle::copy_baked_image_from`](sdk::Handle::copy_baked_image_from).
|
|
165
|
+
* @param {Handle} handle
|
|
166
|
+
* @param {Handle} source
|
|
167
|
+
* @returns {boolean}
|
|
168
|
+
*/
|
|
169
|
+
copyBakedImageFrom(handle, source) {
|
|
170
|
+
_assertClass(handle, Handle);
|
|
171
|
+
_assertClass(source, Handle);
|
|
172
|
+
const ret = wasm.proteusapp_copyBakedImageFrom(this.__wbg_ptr, handle.__wbg_ptr, source.__wbg_ptr);
|
|
173
|
+
if (ret[2]) {
|
|
174
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
175
|
+
}
|
|
176
|
+
return ret[0] !== 0;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Calls [`Proteus::create_video`](sdk::Proteus::create_video).
|
|
180
|
+
* @returns {VideoHandle}
|
|
181
|
+
*/
|
|
182
|
+
createVideo() {
|
|
183
|
+
const ret = wasm.proteusapp_createVideo(this.__wbg_ptr);
|
|
184
|
+
return VideoHandle.__wrap(ret);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Calls [`Handle::crop_image`](sdk::Handle::crop_image). Throws if
|
|
188
|
+
* `crop` isn't a valid `ImageCrop`.
|
|
189
|
+
* @param {Handle} handle
|
|
190
|
+
* @param {any} crop
|
|
191
|
+
* @returns {boolean}
|
|
192
|
+
*/
|
|
193
|
+
cropImage(handle, crop) {
|
|
194
|
+
_assertClass(handle, Handle);
|
|
195
|
+
const ret = wasm.proteusapp_cropImage(this.__wbg_ptr, handle.__wbg_ptr, crop);
|
|
196
|
+
if (ret[2]) {
|
|
197
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
198
|
+
}
|
|
199
|
+
return ret[0] !== 0;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Calls [`Handle::destroy`](sdk::Handle::destroy). Consumes `handle`: the
|
|
203
|
+
* JavaScript object can't be used afterwards.
|
|
204
|
+
* @param {Handle} handle
|
|
205
|
+
*/
|
|
206
|
+
destroy(handle) {
|
|
207
|
+
_assertClass(handle, Handle);
|
|
208
|
+
var ptr0 = handle.__destroy_into_raw();
|
|
209
|
+
const ret = wasm.proteusapp_destroy(this.__wbg_ptr, ptr0);
|
|
210
|
+
if (ret[1]) {
|
|
211
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Calls [`Handle::free_resources`](sdk::Handle::free_resources).
|
|
216
|
+
* @param {Handle} handle
|
|
217
|
+
*/
|
|
218
|
+
freeResources(handle) {
|
|
219
|
+
_assertClass(handle, Handle);
|
|
220
|
+
const ret = wasm.proteusapp_freeResources(this.__wbg_ptr, handle.__wbg_ptr);
|
|
221
|
+
if (ret[1]) {
|
|
222
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Calls [`Proteus::get`](sdk::Proteus::get). Returns `undefined` if the
|
|
227
|
+
* component has been destroyed.
|
|
228
|
+
* @param {Handle} handle
|
|
229
|
+
* @returns {any}
|
|
230
|
+
*/
|
|
231
|
+
get(handle) {
|
|
232
|
+
_assertClass(handle, Handle);
|
|
233
|
+
const ret = wasm.proteusapp_get(this.__wbg_ptr, handle.__wbg_ptr);
|
|
234
|
+
return ret;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Calls [`Handle::hide_video`](sdk::Handle::hide_video).
|
|
238
|
+
* @param {Handle} handle
|
|
239
|
+
*/
|
|
240
|
+
hideVideo(handle) {
|
|
241
|
+
_assertClass(handle, Handle);
|
|
242
|
+
const ret = wasm.proteusapp_hideVideo(this.__wbg_ptr, handle.__wbg_ptr);
|
|
243
|
+
if (ret[1]) {
|
|
244
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Calls [`Proteus::load_texture`](sdk::Proteus::load_texture). Returns
|
|
249
|
+
* `undefined` if the bytes can't be decoded.
|
|
250
|
+
* @param {Uint8Array} bytes
|
|
251
|
+
* @param {any} request
|
|
252
|
+
* @returns {TextureHandle | undefined}
|
|
253
|
+
*/
|
|
254
|
+
loadTexture(bytes, request) {
|
|
255
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
256
|
+
const len0 = WASM_VECTOR_LEN;
|
|
257
|
+
const ret = wasm.proteusapp_loadTexture(this.__wbg_ptr, ptr0, len0, request);
|
|
258
|
+
return ret === 0 ? undefined : TextureHandle.__wrap(ret);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Calls [`Handle::merge_from`](sdk::Handle::merge_from). The sources
|
|
262
|
+
* cross as handle IDs.
|
|
263
|
+
* @param {Handle} handle
|
|
264
|
+
* @param {Float64Array} source_ids
|
|
265
|
+
* @param {any} config
|
|
266
|
+
* @param {any} layout
|
|
267
|
+
*/
|
|
268
|
+
mergeFrom(handle, source_ids, config, layout) {
|
|
269
|
+
_assertClass(handle, Handle);
|
|
270
|
+
const ptr0 = passArrayF64ToWasm0(source_ids, wasm.__wbindgen_malloc);
|
|
271
|
+
const len0 = WASM_VECTOR_LEN;
|
|
272
|
+
const ret = wasm.proteusapp_mergeFrom(this.__wbg_ptr, handle.__wbg_ptr, ptr0, len0, config, layout);
|
|
273
|
+
if (ret[1]) {
|
|
274
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Calls [`Handle::merge_from_with_behavior`](sdk::Handle::merge_from_with_behavior).
|
|
279
|
+
* `child_behavior` is called once per source, before the merge starts.
|
|
280
|
+
* @param {Handle} handle
|
|
281
|
+
* @param {Float64Array} source_ids
|
|
282
|
+
* @param {any} config
|
|
283
|
+
* @param {any} layout
|
|
284
|
+
* @param {Function} child_behavior
|
|
285
|
+
*/
|
|
286
|
+
mergeFromWithBehavior(handle, source_ids, config, layout, child_behavior) {
|
|
287
|
+
_assertClass(handle, Handle);
|
|
288
|
+
const ptr0 = passArrayF64ToWasm0(source_ids, wasm.__wbindgen_malloc);
|
|
289
|
+
const len0 = WASM_VECTOR_LEN;
|
|
290
|
+
const ret = wasm.proteusapp_mergeFromWithBehavior(this.__wbg_ptr, handle.__wbg_ptr, ptr0, len0, config, layout, child_behavior);
|
|
291
|
+
if (ret[1]) {
|
|
292
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Creates a standalone app, with no host, that draws nothing.
|
|
297
|
+
*/
|
|
298
|
+
constructor() {
|
|
299
|
+
const ret = wasm.proteusapp_new();
|
|
300
|
+
this.__wbg_ptr = ret;
|
|
301
|
+
ProteusAppFinalization.register(this, this.__wbg_ptr, this);
|
|
302
|
+
return this;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Calls [`Handle::on_blur`](sdk::Handle::on_blur).
|
|
306
|
+
* @param {Handle} handle
|
|
307
|
+
* @param {Function} cb
|
|
308
|
+
*/
|
|
309
|
+
onBlur(handle, cb) {
|
|
310
|
+
_assertClass(handle, Handle);
|
|
311
|
+
wasm.proteusapp_onBlur(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Calls [`Handle::on_click`](sdk::Handle::on_click).
|
|
315
|
+
* @param {Handle} handle
|
|
316
|
+
* @param {Function} cb
|
|
317
|
+
*/
|
|
318
|
+
onClick(handle, cb) {
|
|
319
|
+
_assertClass(handle, Handle);
|
|
320
|
+
wasm.proteusapp_onClick(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Calls [`Handle::on_drag`](sdk::Handle::on_drag). `cb` receives the
|
|
324
|
+
* movement as two numbers, `x` and `y`.
|
|
325
|
+
* @param {Handle} handle
|
|
326
|
+
* @param {Function} cb
|
|
327
|
+
*/
|
|
328
|
+
onDrag(handle, cb) {
|
|
329
|
+
_assertClass(handle, Handle);
|
|
330
|
+
wasm.proteusapp_onDrag(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Calls [`TransitionChannel::on_dropped`](sdk::TransitionChannel::on_dropped).
|
|
334
|
+
* @param {TransitionChannel} channel
|
|
335
|
+
* @param {Function} cb
|
|
336
|
+
*/
|
|
337
|
+
onDropped(channel, cb) {
|
|
338
|
+
_assertClass(channel, TransitionChannel);
|
|
339
|
+
wasm.proteusapp_onDropped(this.__wbg_ptr, channel.__wbg_ptr, cb);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Calls [`Handle::on_focus`](sdk::Handle::on_focus).
|
|
343
|
+
* @param {Handle} handle
|
|
344
|
+
* @param {Function} cb
|
|
345
|
+
*/
|
|
346
|
+
onFocus(handle, cb) {
|
|
347
|
+
_assertClass(handle, Handle);
|
|
348
|
+
wasm.proteusapp_onFocus(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Calls [`Handle::on_hover_enter`](sdk::Handle::on_hover_enter).
|
|
352
|
+
* @param {Handle} handle
|
|
353
|
+
* @param {Function} cb
|
|
354
|
+
*/
|
|
355
|
+
onHoverEnter(handle, cb) {
|
|
356
|
+
_assertClass(handle, Handle);
|
|
357
|
+
wasm.proteusapp_onHoverEnter(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Calls [`Handle::on_hover_exit`](sdk::Handle::on_hover_exit).
|
|
361
|
+
* @param {Handle} handle
|
|
362
|
+
* @param {Function} cb
|
|
363
|
+
*/
|
|
364
|
+
onHoverExit(handle, cb) {
|
|
365
|
+
_assertClass(handle, Handle);
|
|
366
|
+
wasm.proteusapp_onHoverExit(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Calls [`Handle::on_press`](sdk::Handle::on_press).
|
|
370
|
+
* @param {Handle} handle
|
|
371
|
+
* @param {Function} cb
|
|
372
|
+
*/
|
|
373
|
+
onPress(handle, cb) {
|
|
374
|
+
_assertClass(handle, Handle);
|
|
375
|
+
wasm.proteusapp_onPress(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Calls [`Handle::on_release`](sdk::Handle::on_release).
|
|
379
|
+
* @param {Handle} handle
|
|
380
|
+
* @param {Function} cb
|
|
381
|
+
*/
|
|
382
|
+
onRelease(handle, cb) {
|
|
383
|
+
_assertClass(handle, Handle);
|
|
384
|
+
wasm.proteusapp_onRelease(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Calls [`Handle::on_transition_complete`](sdk::Handle::on_transition_complete).
|
|
388
|
+
* @param {Handle} handle
|
|
389
|
+
* @param {Function} cb
|
|
390
|
+
*/
|
|
391
|
+
onTransitionComplete(handle, cb) {
|
|
392
|
+
_assertClass(handle, Handle);
|
|
393
|
+
wasm.proteusapp_onTransitionComplete(this.__wbg_ptr, handle.__wbg_ptr, cb);
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Records that the pointer left the viewport: `pointer_moved(None)`.
|
|
397
|
+
*/
|
|
398
|
+
pointerLeft() {
|
|
399
|
+
wasm.proteusapp_pointerLeft(this.__wbg_ptr);
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Calls [`Proteus::pointer_moved`](sdk::Proteus::pointer_moved). `x` and
|
|
403
|
+
* `y` are world units: origin at the viewport center, y up.
|
|
404
|
+
* @param {number} x
|
|
405
|
+
* @param {number} y
|
|
406
|
+
*/
|
|
407
|
+
pointerMoved(x, y) {
|
|
408
|
+
wasm.proteusapp_pointerMoved(this.__wbg_ptr, x, y);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Calls [`Proteus::pointer_pressed`](sdk::Proteus::pointer_pressed).
|
|
412
|
+
*/
|
|
413
|
+
pointerPressed() {
|
|
414
|
+
wasm.proteusapp_pointerPressed(this.__wbg_ptr);
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Calls [`Proteus::pointer_released`](sdk::Proteus::pointer_released).
|
|
418
|
+
*/
|
|
419
|
+
pointerReleased() {
|
|
420
|
+
wasm.proteusapp_pointerReleased(this.__wbg_ptr);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Calls [`VideoHandle::release`](sdk::VideoHandle::release).
|
|
424
|
+
* @param {VideoHandle} video
|
|
425
|
+
*/
|
|
426
|
+
releaseVideo(video) {
|
|
427
|
+
_assertClass(video, VideoHandle);
|
|
428
|
+
wasm.proteusapp_releaseVideo(this.__wbg_ptr, video.__wbg_ptr);
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Calls [`Handle::remove_child`](sdk::Handle::remove_child).
|
|
432
|
+
* @param {Handle} parent
|
|
433
|
+
* @param {Handle} child
|
|
434
|
+
*/
|
|
435
|
+
removeChild(parent, child) {
|
|
436
|
+
_assertClass(parent, Handle);
|
|
437
|
+
_assertClass(child, Handle);
|
|
438
|
+
const ret = wasm.proteusapp_removeChild(this.__wbg_ptr, parent.__wbg_ptr, child.__wbg_ptr);
|
|
439
|
+
if (ret[1]) {
|
|
440
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Calls [`Handle::set_declared_geometry`](sdk::Handle::set_declared_geometry).
|
|
445
|
+
* @param {Handle} handle
|
|
446
|
+
* @param {any} state
|
|
447
|
+
*/
|
|
448
|
+
setDeclaredGeometry(handle, state) {
|
|
449
|
+
_assertClass(handle, Handle);
|
|
450
|
+
const ret = wasm.proteusapp_setDeclaredGeometry(this.__wbg_ptr, handle.__wbg_ptr, state);
|
|
451
|
+
if (ret[1]) {
|
|
452
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Calls [`Handle::set_disabled`](sdk::Handle::set_disabled).
|
|
457
|
+
* @param {Handle} handle
|
|
458
|
+
* @param {boolean} disabled
|
|
459
|
+
*/
|
|
460
|
+
setDisabled(handle, disabled) {
|
|
461
|
+
_assertClass(handle, Handle);
|
|
462
|
+
const ret = wasm.proteusapp_setDisabled(this.__wbg_ptr, handle.__wbg_ptr, disabled);
|
|
463
|
+
if (ret[1]) {
|
|
464
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Calls [`Handle::set_image`](sdk::Handle::set_image).
|
|
469
|
+
* @param {Handle} handle
|
|
470
|
+
* @param {any} image
|
|
471
|
+
*/
|
|
472
|
+
setImage(handle, image) {
|
|
473
|
+
_assertClass(handle, Handle);
|
|
474
|
+
const ret = wasm.proteusapp_setImage(this.__wbg_ptr, handle.__wbg_ptr, image);
|
|
475
|
+
if (ret[1]) {
|
|
476
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Calls [`Handle::set_interactive`](sdk::Handle::set_interactive).
|
|
481
|
+
* @param {Handle} handle
|
|
482
|
+
* @param {boolean} interactive
|
|
483
|
+
*/
|
|
484
|
+
setInteractive(handle, interactive) {
|
|
485
|
+
_assertClass(handle, Handle);
|
|
486
|
+
const ret = wasm.proteusapp_setInteractive(this.__wbg_ptr, handle.__wbg_ptr, interactive);
|
|
487
|
+
if (ret[1]) {
|
|
488
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Calls [`Handle::set_opacity`](sdk::Handle::set_opacity).
|
|
493
|
+
* @param {Handle} handle
|
|
494
|
+
* @param {number} opacity
|
|
495
|
+
*/
|
|
496
|
+
setOpacity(handle, opacity) {
|
|
497
|
+
_assertClass(handle, Handle);
|
|
498
|
+
const ret = wasm.proteusapp_setOpacity(this.__wbg_ptr, handle.__wbg_ptr, opacity);
|
|
499
|
+
if (ret[1]) {
|
|
500
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Calls [`Handle::set_text`](sdk::Handle::set_text).
|
|
505
|
+
* @param {Handle} handle
|
|
506
|
+
* @param {any} text
|
|
507
|
+
*/
|
|
508
|
+
setText(handle, text) {
|
|
509
|
+
_assertClass(handle, Handle);
|
|
510
|
+
const ret = wasm.proteusapp_setText(this.__wbg_ptr, handle.__wbg_ptr, text);
|
|
511
|
+
if (ret[1]) {
|
|
512
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Calls [`Handle::set_texture`](sdk::Handle::set_texture).
|
|
517
|
+
* @param {Handle} handle
|
|
518
|
+
* @param {TextureHandle} texture
|
|
519
|
+
* @returns {boolean}
|
|
520
|
+
*/
|
|
521
|
+
setTexture(handle, texture) {
|
|
522
|
+
_assertClass(handle, Handle);
|
|
523
|
+
_assertClass(texture, TextureHandle);
|
|
524
|
+
const ret = wasm.proteusapp_setTexture(this.__wbg_ptr, handle.__wbg_ptr, texture.__wbg_ptr);
|
|
525
|
+
if (ret[2]) {
|
|
526
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
527
|
+
}
|
|
528
|
+
return ret[0] !== 0;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Calls [`Handle::set_transition_interaction`](sdk::Handle::set_transition_interaction).
|
|
532
|
+
* `null` or `undefined` restores the default.
|
|
533
|
+
* @param {Handle} handle
|
|
534
|
+
* @param {any} config
|
|
535
|
+
*/
|
|
536
|
+
setTransitionInteraction(handle, config) {
|
|
537
|
+
_assertClass(handle, Handle);
|
|
538
|
+
const ret = wasm.proteusapp_setTransitionInteraction(this.__wbg_ptr, handle.__wbg_ptr, config);
|
|
539
|
+
if (ret[1]) {
|
|
540
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Calls [`Handle::set_video_crossfade`](sdk::Handle::set_video_crossfade).
|
|
545
|
+
* @param {Handle} handle
|
|
546
|
+
* @param {number} video_t
|
|
547
|
+
* @returns {boolean}
|
|
548
|
+
*/
|
|
549
|
+
setVideoCrossfade(handle, video_t) {
|
|
550
|
+
_assertClass(handle, Handle);
|
|
551
|
+
const ret = wasm.proteusapp_setVideoCrossfade(this.__wbg_ptr, handle.__wbg_ptr, video_t);
|
|
552
|
+
if (ret[2]) {
|
|
553
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
554
|
+
}
|
|
555
|
+
return ret[0] !== 0;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Calls [`Handle::set_visible`](sdk::Handle::set_visible).
|
|
559
|
+
* @param {Handle} handle
|
|
560
|
+
* @param {boolean} visible
|
|
561
|
+
*/
|
|
562
|
+
setVisible(handle, visible) {
|
|
563
|
+
_assertClass(handle, Handle);
|
|
564
|
+
const ret = wasm.proteusapp_setVisible(this.__wbg_ptr, handle.__wbg_ptr, visible);
|
|
565
|
+
if (ret[1]) {
|
|
566
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Calls [`Handle::show_video`](sdk::Handle::show_video).
|
|
571
|
+
* @param {Handle} handle
|
|
572
|
+
* @param {VideoHandle} video
|
|
573
|
+
* @returns {boolean}
|
|
574
|
+
*/
|
|
575
|
+
showVideo(handle, video) {
|
|
576
|
+
_assertClass(handle, Handle);
|
|
577
|
+
_assertClass(video, VideoHandle);
|
|
578
|
+
const ret = wasm.proteusapp_showVideo(this.__wbg_ptr, handle.__wbg_ptr, video.__wbg_ptr);
|
|
579
|
+
if (ret[2]) {
|
|
580
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
581
|
+
}
|
|
582
|
+
return ret[0] !== 0;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Calls [`Handle::split_to`](sdk::Handle::split_to). The targets cross
|
|
586
|
+
* as handle IDs.
|
|
587
|
+
* @param {Handle} handle
|
|
588
|
+
* @param {Float64Array} target_ids
|
|
589
|
+
* @param {any} config
|
|
590
|
+
* @param {any} strategy
|
|
591
|
+
*/
|
|
592
|
+
splitTo(handle, target_ids, config, strategy) {
|
|
593
|
+
_assertClass(handle, Handle);
|
|
594
|
+
const ptr0 = passArrayF64ToWasm0(target_ids, wasm.__wbindgen_malloc);
|
|
595
|
+
const len0 = WASM_VECTOR_LEN;
|
|
596
|
+
const ret = wasm.proteusapp_splitTo(this.__wbg_ptr, handle.__wbg_ptr, ptr0, len0, config, strategy);
|
|
597
|
+
if (ret[1]) {
|
|
598
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Calls [`Handle::split_to_with_behavior`](sdk::Handle::split_to_with_behavior).
|
|
603
|
+
* `child_behavior` is called once per target, before the split starts.
|
|
604
|
+
* @param {Handle} handle
|
|
605
|
+
* @param {Float64Array} target_ids
|
|
606
|
+
* @param {any} config
|
|
607
|
+
* @param {any} strategy
|
|
608
|
+
* @param {Function} child_behavior
|
|
609
|
+
*/
|
|
610
|
+
splitToWithBehavior(handle, target_ids, config, strategy, child_behavior) {
|
|
611
|
+
_assertClass(handle, Handle);
|
|
612
|
+
const ptr0 = passArrayF64ToWasm0(target_ids, wasm.__wbindgen_malloc);
|
|
613
|
+
const len0 = WASM_VECTOR_LEN;
|
|
614
|
+
const ret = wasm.proteusapp_splitToWithBehavior(this.__wbg_ptr, handle.__wbg_ptr, ptr0, len0, config, strategy, child_behavior);
|
|
615
|
+
if (ret[1]) {
|
|
616
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Calls [`Handle::split_to_with_states`](sdk::Handle::split_to_with_states).
|
|
621
|
+
* `targets` is an array of `{ id, state }` objects.
|
|
622
|
+
* @param {Handle} handle
|
|
623
|
+
* @param {any} targets
|
|
624
|
+
* @param {any} config
|
|
625
|
+
* @param {any} strategy
|
|
626
|
+
*/
|
|
627
|
+
splitToWithStates(handle, targets, config, strategy) {
|
|
628
|
+
_assertClass(handle, Handle);
|
|
629
|
+
const ret = wasm.proteusapp_splitToWithStates(this.__wbg_ptr, handle.__wbg_ptr, targets, config, strategy);
|
|
630
|
+
if (ret[1]) {
|
|
631
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Returns a texture handle for a texture ID.
|
|
636
|
+
* @param {number} id
|
|
637
|
+
* @returns {TextureHandle}
|
|
638
|
+
*/
|
|
639
|
+
texture(id) {
|
|
640
|
+
const ret = wasm.proteusapp_texture(this.__wbg_ptr, id);
|
|
641
|
+
return TextureHandle.__wrap(ret);
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Calls [`TextureHandle::state`](sdk::TextureHandle::state). Returns
|
|
645
|
+
* `undefined` if the texture has been evicted or never existed.
|
|
646
|
+
* @param {TextureHandle} handle
|
|
647
|
+
* @returns {any}
|
|
648
|
+
*/
|
|
649
|
+
textureState(handle) {
|
|
650
|
+
_assertClass(handle, TextureHandle);
|
|
651
|
+
const ret = wasm.proteusapp_textureState(this.__wbg_ptr, handle.__wbg_ptr);
|
|
652
|
+
return ret;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Calls [`Proteus::tick`](sdk::Proteus::tick). For a standalone app only:
|
|
656
|
+
* a host ticks the shared `Proteus` itself.
|
|
657
|
+
* @param {number} dt
|
|
658
|
+
*/
|
|
659
|
+
tick(dt) {
|
|
660
|
+
wasm.proteusapp_tick(this.__wbg_ptr, dt);
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Calls [`Proteus::transition_channel`](sdk::Proteus::transition_channel).
|
|
664
|
+
* `owner` is a handle ID, since `wasm-bindgen` can't take an optional
|
|
665
|
+
* reference.
|
|
666
|
+
* @param {number | null} [owner]
|
|
667
|
+
* @returns {TransitionChannel}
|
|
668
|
+
*/
|
|
669
|
+
transitionChannel(owner) {
|
|
670
|
+
const ret = wasm.proteusapp_transitionChannel(this.__wbg_ptr, !isLikeNone(owner), isLikeNone(owner) ? 0 : owner);
|
|
671
|
+
return TransitionChannel.__wrap(ret);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Calls [`VideoHandle::upload_frame`](sdk::VideoHandle::upload_frame).
|
|
675
|
+
* @param {VideoHandle} video
|
|
676
|
+
* @param {number} width
|
|
677
|
+
* @param {number} height
|
|
678
|
+
* @param {Uint8Array} rgba
|
|
679
|
+
* @returns {boolean}
|
|
680
|
+
*/
|
|
681
|
+
uploadVideoFrame(video, width, height, rgba) {
|
|
682
|
+
_assertClass(video, VideoHandle);
|
|
683
|
+
const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
684
|
+
const len0 = WASM_VECTOR_LEN;
|
|
685
|
+
const ret = wasm.proteusapp_uploadVideoFrame(this.__wbg_ptr, video.__wbg_ptr, width, height, ptr0, len0);
|
|
686
|
+
return ret !== 0;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
if (Symbol.dispose) ProteusApp.prototype[Symbol.dispose] = ProteusApp.prototype.free;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* A handle to a texture in the atlas.
|
|
693
|
+
*/
|
|
694
|
+
export class TextureHandle {
|
|
695
|
+
static __wrap(ptr) {
|
|
696
|
+
const obj = Object.create(TextureHandle.prototype);
|
|
697
|
+
obj.__wbg_ptr = ptr;
|
|
698
|
+
TextureHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
699
|
+
return obj;
|
|
700
|
+
}
|
|
701
|
+
__destroy_into_raw() {
|
|
702
|
+
const ptr = this.__wbg_ptr;
|
|
703
|
+
this.__wbg_ptr = 0;
|
|
704
|
+
TextureHandleFinalization.unregister(this);
|
|
705
|
+
return ptr;
|
|
706
|
+
}
|
|
707
|
+
free() {
|
|
708
|
+
const ptr = this.__destroy_into_raw();
|
|
709
|
+
wasm.__wbg_texturehandle_free(ptr, 0);
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Returns a handle for an ID from [`JsTextureHandle::id`]. To add a
|
|
713
|
+
* texture, use `loadTexture` or `bakeTexture`.
|
|
714
|
+
* @param {number} id
|
|
715
|
+
* @returns {TextureHandle}
|
|
716
|
+
*/
|
|
717
|
+
static fromId(id) {
|
|
718
|
+
const ret = wasm.texturehandle_fromId(id);
|
|
719
|
+
return TextureHandle.__wrap(ret);
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* The texture's ID, as a number. [`JsTextureHandle::from_id`] turns it
|
|
723
|
+
* back into a handle.
|
|
724
|
+
* @returns {number}
|
|
725
|
+
*/
|
|
726
|
+
id() {
|
|
727
|
+
const ret = wasm.texturehandle_id(this.__wbg_ptr);
|
|
728
|
+
return ret;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (Symbol.dispose) TextureHandle.prototype[Symbol.dispose] = TextureHandle.prototype.free;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* A handle to a transition channel. It has no methods of its own; it is
|
|
735
|
+
* passed to `channelSet`, `channelDestroy` and `onDropped`.
|
|
736
|
+
*/
|
|
737
|
+
export class TransitionChannel {
|
|
738
|
+
static __wrap(ptr) {
|
|
739
|
+
const obj = Object.create(TransitionChannel.prototype);
|
|
740
|
+
obj.__wbg_ptr = ptr;
|
|
741
|
+
TransitionChannelFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
742
|
+
return obj;
|
|
743
|
+
}
|
|
744
|
+
__destroy_into_raw() {
|
|
745
|
+
const ptr = this.__wbg_ptr;
|
|
746
|
+
this.__wbg_ptr = 0;
|
|
747
|
+
TransitionChannelFinalization.unregister(this);
|
|
748
|
+
return ptr;
|
|
749
|
+
}
|
|
750
|
+
free() {
|
|
751
|
+
const ptr = this.__destroy_into_raw();
|
|
752
|
+
wasm.__wbg_transitionchannel_free(ptr, 0);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
if (Symbol.dispose) TransitionChannel.prototype[Symbol.dispose] = TransitionChannel.prototype.free;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* A handle to a video whose frames the app supplies. It has no methods of
|
|
759
|
+
* its own; it is passed to `uploadVideoFrame`, `releaseVideo` and
|
|
760
|
+
* `showVideo`.
|
|
761
|
+
*/
|
|
762
|
+
export class VideoHandle {
|
|
763
|
+
static __wrap(ptr) {
|
|
764
|
+
const obj = Object.create(VideoHandle.prototype);
|
|
765
|
+
obj.__wbg_ptr = ptr;
|
|
766
|
+
VideoHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
767
|
+
return obj;
|
|
768
|
+
}
|
|
769
|
+
__destroy_into_raw() {
|
|
770
|
+
const ptr = this.__wbg_ptr;
|
|
771
|
+
this.__wbg_ptr = 0;
|
|
772
|
+
VideoHandleFinalization.unregister(this);
|
|
773
|
+
return ptr;
|
|
774
|
+
}
|
|
775
|
+
free() {
|
|
776
|
+
const ptr = this.__destroy_into_raw();
|
|
777
|
+
wasm.__wbg_videohandle_free(ptr, 0);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if (Symbol.dispose) VideoHandle.prototype[Symbol.dispose] = VideoHandle.prototype.free;
|
|
781
|
+
export function __wbg_Error_fdd633d4bb5dd76a(arg0, arg1) {
|
|
782
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
783
|
+
return ret;
|
|
784
|
+
}
|
|
785
|
+
export function __wbg_Number_c4bdf66bb78f7977(arg0) {
|
|
786
|
+
const ret = Number(arg0);
|
|
787
|
+
return ret;
|
|
788
|
+
}
|
|
789
|
+
export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
790
|
+
const ret = String(arg1);
|
|
791
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
792
|
+
const len1 = WASM_VECTOR_LEN;
|
|
793
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
794
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
795
|
+
}
|
|
796
|
+
export function __wbg___wbindgen_bigint_get_as_i64_d9e915702856f831(arg0, arg1) {
|
|
797
|
+
const v = arg1;
|
|
798
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
799
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
800
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
801
|
+
}
|
|
802
|
+
export function __wbg___wbindgen_boolean_get_edaed31a367ce1bd(arg0) {
|
|
803
|
+
const v = arg0;
|
|
804
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
805
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
806
|
+
}
|
|
807
|
+
export function __wbg___wbindgen_debug_string_8a447059637473e2(arg0, arg1) {
|
|
808
|
+
const ret = debugString(arg1);
|
|
809
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
810
|
+
const len1 = WASM_VECTOR_LEN;
|
|
811
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
812
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
813
|
+
}
|
|
814
|
+
export function __wbg___wbindgen_in_4990f46af709e33c(arg0, arg1) {
|
|
815
|
+
const ret = arg0 in arg1;
|
|
816
|
+
return ret;
|
|
817
|
+
}
|
|
818
|
+
export function __wbg___wbindgen_is_bigint_90b5ccfe67c78460(arg0) {
|
|
819
|
+
const ret = typeof(arg0) === 'bigint';
|
|
820
|
+
return ret;
|
|
821
|
+
}
|
|
822
|
+
export function __wbg___wbindgen_is_function_acc5528be2b923f2(arg0) {
|
|
823
|
+
const ret = typeof(arg0) === 'function';
|
|
824
|
+
return ret;
|
|
825
|
+
}
|
|
826
|
+
export function __wbg___wbindgen_is_null_6d937fbfb6478470(arg0) {
|
|
827
|
+
const ret = arg0 === null;
|
|
828
|
+
return ret;
|
|
829
|
+
}
|
|
830
|
+
export function __wbg___wbindgen_is_object_0beba4a1980d3eea(arg0) {
|
|
831
|
+
const val = arg0;
|
|
832
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
833
|
+
return ret;
|
|
834
|
+
}
|
|
835
|
+
export function __wbg___wbindgen_is_undefined_721f8decd50c87a3(arg0) {
|
|
836
|
+
const ret = arg0 === undefined;
|
|
837
|
+
return ret;
|
|
838
|
+
}
|
|
839
|
+
export function __wbg___wbindgen_jsval_eq_4e8c38722cb8ff51(arg0, arg1) {
|
|
840
|
+
const ret = arg0 === arg1;
|
|
841
|
+
return ret;
|
|
842
|
+
}
|
|
843
|
+
export function __wbg___wbindgen_jsval_loose_eq_4b9aba9e5b3c4582(arg0, arg1) {
|
|
844
|
+
const ret = arg0 == arg1;
|
|
845
|
+
return ret;
|
|
846
|
+
}
|
|
847
|
+
export function __wbg___wbindgen_number_get_1cc01dd708740256(arg0, arg1) {
|
|
848
|
+
const obj = arg1;
|
|
849
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
850
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
851
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
852
|
+
}
|
|
853
|
+
export function __wbg___wbindgen_string_get_71bb4348194e31f0(arg0, arg1) {
|
|
854
|
+
const obj = arg1;
|
|
855
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
856
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
857
|
+
var len1 = WASM_VECTOR_LEN;
|
|
858
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
859
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
860
|
+
}
|
|
861
|
+
export function __wbg___wbindgen_throw_ea4887a5f8f9a9db(arg0, arg1) {
|
|
862
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
863
|
+
}
|
|
864
|
+
export function __wbg__wbg_cb_unref_33c39e13d73b25f6(arg0) {
|
|
865
|
+
arg0._wbg_cb_unref();
|
|
866
|
+
}
|
|
867
|
+
export function __wbg_beginRenderPass_10e1d8bb36f2f74e() { return handleError(function (arg0, arg1) {
|
|
868
|
+
const ret = arg0.beginRenderPass(arg1);
|
|
869
|
+
return ret;
|
|
870
|
+
}, arguments); }
|
|
871
|
+
export function __wbg_call_0e855b388e315e17() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
872
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
873
|
+
return ret;
|
|
874
|
+
}, arguments); }
|
|
875
|
+
export function __wbg_call_5575218572ead796() { return handleError(function (arg0, arg1, arg2) {
|
|
876
|
+
const ret = arg0.call(arg1, arg2);
|
|
877
|
+
return ret;
|
|
878
|
+
}, arguments); }
|
|
879
|
+
export function __wbg_call_8e98ed2f3c86c4b5() { return handleError(function (arg0, arg1) {
|
|
880
|
+
const ret = arg0.call(arg1);
|
|
881
|
+
return ret;
|
|
882
|
+
}, arguments); }
|
|
883
|
+
export function __wbg_copyTextureToTexture_1be188df1e535c0a() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
884
|
+
arg0.copyTextureToTexture(arg1, arg2, arg3);
|
|
885
|
+
}, arguments); }
|
|
886
|
+
export function __wbg_createBindGroup_2320df4db188406c(arg0, arg1) {
|
|
887
|
+
const ret = arg0.createBindGroup(arg1);
|
|
888
|
+
return ret;
|
|
889
|
+
}
|
|
890
|
+
export function __wbg_createCommandEncoder_cd88faca35d9ed68(arg0, arg1) {
|
|
891
|
+
const ret = arg0.createCommandEncoder(arg1);
|
|
892
|
+
return ret;
|
|
893
|
+
}
|
|
894
|
+
export function __wbg_createTexture_9e76b80a2dc0d12e() { return handleError(function (arg0, arg1) {
|
|
895
|
+
const ret = arg0.createTexture(arg1);
|
|
896
|
+
return ret;
|
|
897
|
+
}, arguments); }
|
|
898
|
+
export function __wbg_createView_cc96b5bdd3d5bf5e() { return handleError(function (arg0, arg1) {
|
|
899
|
+
const ret = arg0.createView(arg1);
|
|
900
|
+
return ret;
|
|
901
|
+
}, arguments); }
|
|
902
|
+
export function __wbg_destroy_b5b39f25f0799295(arg0) {
|
|
903
|
+
arg0.destroy();
|
|
904
|
+
}
|
|
905
|
+
export function __wbg_done_b62d4a7d2286852a(arg0) {
|
|
906
|
+
const ret = arg0.done;
|
|
907
|
+
return ret;
|
|
908
|
+
}
|
|
909
|
+
export function __wbg_drawIndexed_68637ebab6dd8d6e(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
910
|
+
arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
|
|
911
|
+
}
|
|
912
|
+
export function __wbg_end_414453a89205612c(arg0) {
|
|
913
|
+
arg0.end();
|
|
914
|
+
}
|
|
915
|
+
export function __wbg_entries_c261c3fa1f281256(arg0) {
|
|
916
|
+
const ret = Object.entries(arg0);
|
|
917
|
+
return ret;
|
|
918
|
+
}
|
|
919
|
+
export function __wbg_finish_087cb89c65c06eb1(arg0) {
|
|
920
|
+
const ret = arg0.finish();
|
|
921
|
+
return ret;
|
|
922
|
+
}
|
|
923
|
+
export function __wbg_finish_cfaeede3baf55be1(arg0, arg1) {
|
|
924
|
+
const ret = arg0.finish(arg1);
|
|
925
|
+
return ret;
|
|
926
|
+
}
|
|
927
|
+
export function __wbg_getMappedRange_5ed22727c9679168() { return handleError(function (arg0, arg1, arg2) {
|
|
928
|
+
const ret = arg0.getMappedRange(arg1, arg2);
|
|
929
|
+
return ret;
|
|
930
|
+
}, arguments); }
|
|
931
|
+
export function __wbg_get_197a3fe98f169e38(arg0, arg1) {
|
|
932
|
+
const ret = arg0[arg1 >>> 0];
|
|
933
|
+
return ret;
|
|
934
|
+
}
|
|
935
|
+
export function __wbg_get_9a29be2cb383ed9a() { return handleError(function (arg0, arg1) {
|
|
936
|
+
const ret = Reflect.get(arg0, arg1);
|
|
937
|
+
return ret;
|
|
938
|
+
}, arguments); }
|
|
939
|
+
export function __wbg_get_unchecked_54a4374c38e08460(arg0, arg1) {
|
|
940
|
+
const ret = arg0[arg1 >>> 0];
|
|
941
|
+
return ret;
|
|
942
|
+
}
|
|
943
|
+
export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
944
|
+
const ret = arg0[arg1];
|
|
945
|
+
return ret;
|
|
946
|
+
}
|
|
947
|
+
export function __wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da(arg0) {
|
|
948
|
+
let result;
|
|
949
|
+
try {
|
|
950
|
+
result = arg0 instanceof ArrayBuffer;
|
|
951
|
+
} catch (_) {
|
|
952
|
+
result = false;
|
|
953
|
+
}
|
|
954
|
+
const ret = result;
|
|
955
|
+
return ret;
|
|
956
|
+
}
|
|
957
|
+
export function __wbg_instanceof_Map_afa18d5840c04c15(arg0) {
|
|
958
|
+
let result;
|
|
959
|
+
try {
|
|
960
|
+
result = arg0 instanceof Map;
|
|
961
|
+
} catch (_) {
|
|
962
|
+
result = false;
|
|
963
|
+
}
|
|
964
|
+
const ret = result;
|
|
965
|
+
return ret;
|
|
966
|
+
}
|
|
967
|
+
export function __wbg_instanceof_Uint8Array_f080092dc70f5d58(arg0) {
|
|
968
|
+
let result;
|
|
969
|
+
try {
|
|
970
|
+
result = arg0 instanceof Uint8Array;
|
|
971
|
+
} catch (_) {
|
|
972
|
+
result = false;
|
|
973
|
+
}
|
|
974
|
+
const ret = result;
|
|
975
|
+
return ret;
|
|
976
|
+
}
|
|
977
|
+
export function __wbg_isArray_145a34fd0a38d37b(arg0) {
|
|
978
|
+
const ret = Array.isArray(arg0);
|
|
979
|
+
return ret;
|
|
980
|
+
}
|
|
981
|
+
export function __wbg_isSafeInteger_a3389a198582f5f6(arg0) {
|
|
982
|
+
const ret = Number.isSafeInteger(arg0);
|
|
983
|
+
return ret;
|
|
984
|
+
}
|
|
985
|
+
export function __wbg_iterator_cc47ba25a2be735a() {
|
|
986
|
+
const ret = Symbol.iterator;
|
|
987
|
+
return ret;
|
|
988
|
+
}
|
|
989
|
+
export function __wbg_label_47480289cc2bce71(arg0, arg1) {
|
|
990
|
+
const ret = arg1.label;
|
|
991
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
992
|
+
const len1 = WASM_VECTOR_LEN;
|
|
993
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
994
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
995
|
+
}
|
|
996
|
+
export function __wbg_length_589238bdcf171f0e(arg0) {
|
|
997
|
+
const ret = arg0.length;
|
|
998
|
+
return ret;
|
|
999
|
+
}
|
|
1000
|
+
export function __wbg_length_c6054974c0a6cdb9(arg0) {
|
|
1001
|
+
const ret = arg0.length;
|
|
1002
|
+
return ret;
|
|
1003
|
+
}
|
|
1004
|
+
export function __wbg_mapAsync_bb0029907dd91181(arg0, arg1, arg2, arg3) {
|
|
1005
|
+
const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3);
|
|
1006
|
+
return ret;
|
|
1007
|
+
}
|
|
1008
|
+
export function __wbg_new_2e117a478906f062() {
|
|
1009
|
+
const ret = new Object();
|
|
1010
|
+
return ret;
|
|
1011
|
+
}
|
|
1012
|
+
export function __wbg_new_36e147a8ced3c6e0() {
|
|
1013
|
+
const ret = new Array();
|
|
1014
|
+
return ret;
|
|
1015
|
+
}
|
|
1016
|
+
export function __wbg_new_81880fb5002cb255(arg0) {
|
|
1017
|
+
const ret = new Uint8Array(arg0);
|
|
1018
|
+
return ret;
|
|
1019
|
+
}
|
|
1020
|
+
export function __wbg_new_e66a4b7758dd2e5c(arg0, arg1) {
|
|
1021
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1022
|
+
return ret;
|
|
1023
|
+
}
|
|
1024
|
+
export function __wbg_new_with_byte_offset_and_length_f2b65504a914f37a(arg0, arg1, arg2) {
|
|
1025
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1026
|
+
return ret;
|
|
1027
|
+
}
|
|
1028
|
+
export function __wbg_next_0c4066e251d2eff9() { return handleError(function (arg0) {
|
|
1029
|
+
const ret = arg0.next();
|
|
1030
|
+
return ret;
|
|
1031
|
+
}, arguments); }
|
|
1032
|
+
export function __wbg_next_402fa10b59ab20c3(arg0) {
|
|
1033
|
+
const ret = arg0.next;
|
|
1034
|
+
return ret;
|
|
1035
|
+
}
|
|
1036
|
+
export function __wbg_onSubmittedWorkDone_1460145eecea40ef(arg0) {
|
|
1037
|
+
const ret = arg0.onSubmittedWorkDone();
|
|
1038
|
+
return ret;
|
|
1039
|
+
}
|
|
1040
|
+
export function __wbg_prototypesetcall_d721637c7ca66eb8(arg0, arg1, arg2) {
|
|
1041
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1042
|
+
}
|
|
1043
|
+
export function __wbg_push_f724b5db8acf89d2(arg0, arg1) {
|
|
1044
|
+
const ret = arg0.push(arg1);
|
|
1045
|
+
return ret;
|
|
1046
|
+
}
|
|
1047
|
+
export function __wbg_queueMicrotask_1c9b3800e321a967(arg0) {
|
|
1048
|
+
const ret = arg0.queueMicrotask;
|
|
1049
|
+
return ret;
|
|
1050
|
+
}
|
|
1051
|
+
export function __wbg_queueMicrotask_311744e534a929a3(arg0) {
|
|
1052
|
+
queueMicrotask(arg0);
|
|
1053
|
+
}
|
|
1054
|
+
export function __wbg_resolve_d82363d90af6928a(arg0) {
|
|
1055
|
+
const ret = Promise.resolve(arg0);
|
|
1056
|
+
return ret;
|
|
1057
|
+
}
|
|
1058
|
+
export function __wbg_setBindGroup_4ba56e1e0d26f244() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1059
|
+
arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
|
|
1060
|
+
}, arguments); }
|
|
1061
|
+
export function __wbg_setBindGroup_6124849cc8547086(arg0, arg1, arg2) {
|
|
1062
|
+
arg0.setBindGroup(arg1 >>> 0, arg2);
|
|
1063
|
+
}
|
|
1064
|
+
export function __wbg_setIndexBuffer_17431786d06c1b7c(arg0, arg1, arg2, arg3, arg4) {
|
|
1065
|
+
arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4);
|
|
1066
|
+
}
|
|
1067
|
+
export function __wbg_setIndexBuffer_a16ed5b869c87507(arg0, arg1, arg2, arg3) {
|
|
1068
|
+
arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3);
|
|
1069
|
+
}
|
|
1070
|
+
export function __wbg_setPipeline_bab24dbce96903b9(arg0, arg1) {
|
|
1071
|
+
arg0.setPipeline(arg1);
|
|
1072
|
+
}
|
|
1073
|
+
export function __wbg_setVertexBuffer_91c4b602d0289943(arg0, arg1, arg2, arg3) {
|
|
1074
|
+
arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3);
|
|
1075
|
+
}
|
|
1076
|
+
export function __wbg_setVertexBuffer_b508baf8d0ffe331(arg0, arg1, arg2, arg3, arg4) {
|
|
1077
|
+
arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4);
|
|
1078
|
+
}
|
|
1079
|
+
export function __wbg_setViewport_f9d423db4f4b4b58(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1080
|
+
arg0.setViewport(arg1, arg2, arg3, arg4, arg5, arg6);
|
|
1081
|
+
}
|
|
1082
|
+
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1083
|
+
arg0[arg1] = arg2;
|
|
1084
|
+
}
|
|
1085
|
+
export function __wbg_set_a_5f6e488475272136(arg0, arg1) {
|
|
1086
|
+
arg0.a = arg1;
|
|
1087
|
+
}
|
|
1088
|
+
export function __wbg_set_array_layer_count_daec613068108a9d(arg0, arg1) {
|
|
1089
|
+
arg0.arrayLayerCount = arg1 >>> 0;
|
|
1090
|
+
}
|
|
1091
|
+
export function __wbg_set_aspect_77332ac136ee94eb(arg0, arg1) {
|
|
1092
|
+
arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
1093
|
+
}
|
|
1094
|
+
export function __wbg_set_aspect_a823a14d00d42d37(arg0, arg1) {
|
|
1095
|
+
arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
1096
|
+
}
|
|
1097
|
+
export function __wbg_set_b_688365d692bba214(arg0, arg1) {
|
|
1098
|
+
arg0.b = arg1;
|
|
1099
|
+
}
|
|
1100
|
+
export function __wbg_set_base_array_layer_cc6c68d233489c4b(arg0, arg1) {
|
|
1101
|
+
arg0.baseArrayLayer = arg1 >>> 0;
|
|
1102
|
+
}
|
|
1103
|
+
export function __wbg_set_base_mip_level_e07a3efe9006d5ea(arg0, arg1) {
|
|
1104
|
+
arg0.baseMipLevel = arg1 >>> 0;
|
|
1105
|
+
}
|
|
1106
|
+
export function __wbg_set_beginning_of_pass_write_index_27be5b0b35ec3de0(arg0, arg1) {
|
|
1107
|
+
arg0.beginningOfPassWriteIndex = arg1 >>> 0;
|
|
1108
|
+
}
|
|
1109
|
+
export function __wbg_set_binding_f3c188a8cd21455b(arg0, arg1) {
|
|
1110
|
+
arg0.binding = arg1 >>> 0;
|
|
1111
|
+
}
|
|
1112
|
+
export function __wbg_set_buffer_55f096330c8912b4(arg0, arg1) {
|
|
1113
|
+
arg0.buffer = arg1;
|
|
1114
|
+
}
|
|
1115
|
+
export function __wbg_set_bytes_per_row_91681ca78d744888(arg0, arg1) {
|
|
1116
|
+
arg0.bytesPerRow = arg1 >>> 0;
|
|
1117
|
+
}
|
|
1118
|
+
export function __wbg_set_clear_value_642701f928a5ccb3(arg0, arg1) {
|
|
1119
|
+
arg0.clearValue = arg1;
|
|
1120
|
+
}
|
|
1121
|
+
export function __wbg_set_color_attachments_abe67f6631926e28(arg0, arg1) {
|
|
1122
|
+
arg0.colorAttachments = arg1;
|
|
1123
|
+
}
|
|
1124
|
+
export function __wbg_set_dc601f4a69da0bc2(arg0, arg1, arg2) {
|
|
1125
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1126
|
+
}
|
|
1127
|
+
export function __wbg_set_depth_clear_value_442bf492734f63b6(arg0, arg1) {
|
|
1128
|
+
arg0.depthClearValue = arg1;
|
|
1129
|
+
}
|
|
1130
|
+
export function __wbg_set_depth_load_op_34d430b74bb36d91(arg0, arg1) {
|
|
1131
|
+
arg0.depthLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
|
|
1132
|
+
}
|
|
1133
|
+
export function __wbg_set_depth_or_array_layers_4bbbeadacb393f02(arg0, arg1) {
|
|
1134
|
+
arg0.depthOrArrayLayers = arg1 >>> 0;
|
|
1135
|
+
}
|
|
1136
|
+
export function __wbg_set_depth_read_only_138a11b10c731094(arg0, arg1) {
|
|
1137
|
+
arg0.depthReadOnly = arg1 !== 0;
|
|
1138
|
+
}
|
|
1139
|
+
export function __wbg_set_depth_stencil_attachment_1ee0d93bc3273369(arg0, arg1) {
|
|
1140
|
+
arg0.depthStencilAttachment = arg1;
|
|
1141
|
+
}
|
|
1142
|
+
export function __wbg_set_depth_store_op_0ea0a215313dbda7(arg0, arg1) {
|
|
1143
|
+
arg0.depthStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
|
|
1144
|
+
}
|
|
1145
|
+
export function __wbg_set_dimension_174ad7e2fb67fb4e(arg0, arg1) {
|
|
1146
|
+
arg0.dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
1147
|
+
}
|
|
1148
|
+
export function __wbg_set_dimension_36e13ccecae5af4b(arg0, arg1) {
|
|
1149
|
+
arg0.dimension = __wbindgen_enum_GpuTextureDimension[arg1];
|
|
1150
|
+
}
|
|
1151
|
+
export function __wbg_set_end_of_pass_write_index_e8f52fc08bc0603e(arg0, arg1) {
|
|
1152
|
+
arg0.endOfPassWriteIndex = arg1 >>> 0;
|
|
1153
|
+
}
|
|
1154
|
+
export function __wbg_set_entries_fc76ca4d7da6a709(arg0, arg1) {
|
|
1155
|
+
arg0.entries = arg1;
|
|
1156
|
+
}
|
|
1157
|
+
export function __wbg_set_format_90860b0321868db4(arg0, arg1) {
|
|
1158
|
+
arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
1159
|
+
}
|
|
1160
|
+
export function __wbg_set_format_e9d4b1475bb3bd3b(arg0, arg1) {
|
|
1161
|
+
arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
1162
|
+
}
|
|
1163
|
+
export function __wbg_set_g_d4d1d77cf8fdd362(arg0, arg1) {
|
|
1164
|
+
arg0.g = arg1;
|
|
1165
|
+
}
|
|
1166
|
+
export function __wbg_set_height_e8b5483b8c117d5e(arg0, arg1) {
|
|
1167
|
+
arg0.height = arg1 >>> 0;
|
|
1168
|
+
}
|
|
1169
|
+
export function __wbg_set_label_03d2396d4655a3e1(arg0, arg1, arg2) {
|
|
1170
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
1171
|
+
}
|
|
1172
|
+
export function __wbg_set_label_0c1bd0e976cf0a9a(arg0, arg1, arg2) {
|
|
1173
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
1174
|
+
}
|
|
1175
|
+
export function __wbg_set_label_2d2227f4d5991e50(arg0, arg1, arg2) {
|
|
1176
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
1177
|
+
}
|
|
1178
|
+
export function __wbg_set_label_8fd860a36d2c7b74(arg0, arg1, arg2) {
|
|
1179
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
1180
|
+
}
|
|
1181
|
+
export function __wbg_set_label_d1c24b5a7a3ac31d(arg0, arg1, arg2) {
|
|
1182
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
1183
|
+
}
|
|
1184
|
+
export function __wbg_set_label_f92ae11c77d74198(arg0, arg1, arg2) {
|
|
1185
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
1186
|
+
}
|
|
1187
|
+
export function __wbg_set_layout_eeef59714f5bf48b(arg0, arg1) {
|
|
1188
|
+
arg0.layout = arg1;
|
|
1189
|
+
}
|
|
1190
|
+
export function __wbg_set_load_op_56844f51434037bf(arg0, arg1) {
|
|
1191
|
+
arg0.loadOp = __wbindgen_enum_GpuLoadOp[arg1];
|
|
1192
|
+
}
|
|
1193
|
+
export function __wbg_set_mip_level_246db61be15bdd69(arg0, arg1) {
|
|
1194
|
+
arg0.mipLevel = arg1 >>> 0;
|
|
1195
|
+
}
|
|
1196
|
+
export function __wbg_set_mip_level_count_72f8bc1f80f7539b(arg0, arg1) {
|
|
1197
|
+
arg0.mipLevelCount = arg1 >>> 0;
|
|
1198
|
+
}
|
|
1199
|
+
export function __wbg_set_mip_level_count_b19a0d9192e62d5d(arg0, arg1) {
|
|
1200
|
+
arg0.mipLevelCount = arg1 >>> 0;
|
|
1201
|
+
}
|
|
1202
|
+
export function __wbg_set_offset_73156b0e0b41d79a(arg0, arg1) {
|
|
1203
|
+
arg0.offset = arg1;
|
|
1204
|
+
}
|
|
1205
|
+
export function __wbg_set_offset_a097a8050a3a9a33(arg0, arg1) {
|
|
1206
|
+
arg0.offset = arg1;
|
|
1207
|
+
}
|
|
1208
|
+
export function __wbg_set_origin_9b3b0fbe0a5dc469(arg0, arg1) {
|
|
1209
|
+
arg0.origin = arg1;
|
|
1210
|
+
}
|
|
1211
|
+
export function __wbg_set_query_set_18679a8580267d5a(arg0, arg1) {
|
|
1212
|
+
arg0.querySet = arg1;
|
|
1213
|
+
}
|
|
1214
|
+
export function __wbg_set_r_527e5a41c4b1a846(arg0, arg1) {
|
|
1215
|
+
arg0.r = arg1;
|
|
1216
|
+
}
|
|
1217
|
+
export function __wbg_set_resolve_target_fe76b3f99cf72078(arg0, arg1) {
|
|
1218
|
+
arg0.resolveTarget = arg1;
|
|
1219
|
+
}
|
|
1220
|
+
export function __wbg_set_resource_fe385d2e3dadaf63(arg0, arg1) {
|
|
1221
|
+
arg0.resource = arg1;
|
|
1222
|
+
}
|
|
1223
|
+
export function __wbg_set_rows_per_image_d198b7e73a38978b(arg0, arg1) {
|
|
1224
|
+
arg0.rowsPerImage = arg1 >>> 0;
|
|
1225
|
+
}
|
|
1226
|
+
export function __wbg_set_sample_count_865e1d19b84e27e6(arg0, arg1) {
|
|
1227
|
+
arg0.sampleCount = arg1 >>> 0;
|
|
1228
|
+
}
|
|
1229
|
+
export function __wbg_set_size_1e6281b07cd39177(arg0, arg1) {
|
|
1230
|
+
arg0.size = arg1;
|
|
1231
|
+
}
|
|
1232
|
+
export function __wbg_set_size_a61ff22205255d61(arg0, arg1) {
|
|
1233
|
+
arg0.size = arg1;
|
|
1234
|
+
}
|
|
1235
|
+
export function __wbg_set_stencil_clear_value_10b58f674d0177c2(arg0, arg1) {
|
|
1236
|
+
arg0.stencilClearValue = arg1 >>> 0;
|
|
1237
|
+
}
|
|
1238
|
+
export function __wbg_set_stencil_load_op_f20a90a66acd3d8c(arg0, arg1) {
|
|
1239
|
+
arg0.stencilLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
|
|
1240
|
+
}
|
|
1241
|
+
export function __wbg_set_stencil_read_only_fb489d191b6d969b(arg0, arg1) {
|
|
1242
|
+
arg0.stencilReadOnly = arg1 !== 0;
|
|
1243
|
+
}
|
|
1244
|
+
export function __wbg_set_stencil_store_op_477c4cf6422dfa3f(arg0, arg1) {
|
|
1245
|
+
arg0.stencilStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
|
|
1246
|
+
}
|
|
1247
|
+
export function __wbg_set_store_op_caeede4654b3d847(arg0, arg1) {
|
|
1248
|
+
arg0.storeOp = __wbindgen_enum_GpuStoreOp[arg1];
|
|
1249
|
+
}
|
|
1250
|
+
export function __wbg_set_texture_16d2be474ce6ad0c(arg0, arg1) {
|
|
1251
|
+
arg0.texture = arg1;
|
|
1252
|
+
}
|
|
1253
|
+
export function __wbg_set_timestamp_writes_c552d52fbb417005(arg0, arg1) {
|
|
1254
|
+
arg0.timestampWrites = arg1;
|
|
1255
|
+
}
|
|
1256
|
+
export function __wbg_set_usage_7f0dda8309469b1c(arg0, arg1) {
|
|
1257
|
+
arg0.usage = arg1 >>> 0;
|
|
1258
|
+
}
|
|
1259
|
+
export function __wbg_set_usage_7fa9cd18d1104aca(arg0, arg1) {
|
|
1260
|
+
arg0.usage = arg1 >>> 0;
|
|
1261
|
+
}
|
|
1262
|
+
export function __wbg_set_view_bdeab150b5f0768c(arg0, arg1) {
|
|
1263
|
+
arg0.view = arg1;
|
|
1264
|
+
}
|
|
1265
|
+
export function __wbg_set_view_dbd0294573f64d05(arg0, arg1) {
|
|
1266
|
+
arg0.view = arg1;
|
|
1267
|
+
}
|
|
1268
|
+
export function __wbg_set_view_formats_bab284fc81b40e70(arg0, arg1) {
|
|
1269
|
+
arg0.viewFormats = arg1;
|
|
1270
|
+
}
|
|
1271
|
+
export function __wbg_set_width_1a5e2e86fa5bdcd8(arg0, arg1) {
|
|
1272
|
+
arg0.width = arg1 >>> 0;
|
|
1273
|
+
}
|
|
1274
|
+
export function __wbg_set_x_56f0c2c08a62725c(arg0, arg1) {
|
|
1275
|
+
arg0.x = arg1 >>> 0;
|
|
1276
|
+
}
|
|
1277
|
+
export function __wbg_set_y_04fb8ce84735b4e1(arg0, arg1) {
|
|
1278
|
+
arg0.y = arg1 >>> 0;
|
|
1279
|
+
}
|
|
1280
|
+
export function __wbg_set_z_a51316db27a4941e(arg0, arg1) {
|
|
1281
|
+
arg0.z = arg1 >>> 0;
|
|
1282
|
+
}
|
|
1283
|
+
export function __wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938() {
|
|
1284
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1285
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1286
|
+
}
|
|
1287
|
+
export function __wbg_static_accessor_GLOBAL_ce44e66a4935da8c() {
|
|
1288
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1289
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1290
|
+
}
|
|
1291
|
+
export function __wbg_static_accessor_SELF_44f6e0cb5e67cdad() {
|
|
1292
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1293
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1294
|
+
}
|
|
1295
|
+
export function __wbg_static_accessor_WINDOW_168f178805d978fe() {
|
|
1296
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1297
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1298
|
+
}
|
|
1299
|
+
export function __wbg_submit_1290d44bb76ecef4(arg0, arg1) {
|
|
1300
|
+
arg0.submit(arg1);
|
|
1301
|
+
}
|
|
1302
|
+
export function __wbg_then_05edfc8a4fea5106(arg0, arg1, arg2) {
|
|
1303
|
+
const ret = arg0.then(arg1, arg2);
|
|
1304
|
+
return ret;
|
|
1305
|
+
}
|
|
1306
|
+
export function __wbg_then_2a84678a50976959(arg0, arg1, arg2) {
|
|
1307
|
+
const ret = arg0.then(arg1, arg2);
|
|
1308
|
+
return ret;
|
|
1309
|
+
}
|
|
1310
|
+
export function __wbg_then_591b6b3a75ee817a(arg0, arg1) {
|
|
1311
|
+
const ret = arg0.then(arg1);
|
|
1312
|
+
return ret;
|
|
1313
|
+
}
|
|
1314
|
+
export function __wbg_unmap_8f06698a75b8331a(arg0) {
|
|
1315
|
+
arg0.unmap();
|
|
1316
|
+
}
|
|
1317
|
+
export function __wbg_value_49f783bb59765962(arg0) {
|
|
1318
|
+
const ret = arg0.value;
|
|
1319
|
+
return ret;
|
|
1320
|
+
}
|
|
1321
|
+
export function __wbg_writeBuffer_b4bdd36178348ca5() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1322
|
+
arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
|
|
1323
|
+
}, arguments); }
|
|
1324
|
+
export function __wbg_writeTexture_b45b69132e46a227() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1325
|
+
arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
|
|
1326
|
+
}, arguments); }
|
|
1327
|
+
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1328
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1274, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1329
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_63f5332d1d9a4f22___convert__closures_____invoke___wasm_bindgen_63f5332d1d9a4f22___JsValue______true_);
|
|
1330
|
+
return ret;
|
|
1331
|
+
}
|
|
1332
|
+
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1333
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1723, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1334
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_63f5332d1d9a4f22___convert__closures_____invoke___wasm_bindgen_63f5332d1d9a4f22___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_63f5332d1d9a4f22___JsError___true_);
|
|
1335
|
+
return ret;
|
|
1336
|
+
}
|
|
1337
|
+
export function __wbindgen_cast_0000000000000003(arg0) {
|
|
1338
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1339
|
+
const ret = arg0;
|
|
1340
|
+
return ret;
|
|
1341
|
+
}
|
|
1342
|
+
export function __wbindgen_cast_0000000000000004(arg0) {
|
|
1343
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1344
|
+
const ret = arg0;
|
|
1345
|
+
return ret;
|
|
1346
|
+
}
|
|
1347
|
+
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
1348
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1349
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1350
|
+
return ret;
|
|
1351
|
+
}
|
|
1352
|
+
export function __wbindgen_cast_0000000000000006(arg0) {
|
|
1353
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1354
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1355
|
+
return ret;
|
|
1356
|
+
}
|
|
1357
|
+
export function __wbindgen_init_externref_table() {
|
|
1358
|
+
const table = wasm.__wbindgen_externrefs;
|
|
1359
|
+
const offset = table.grow(4);
|
|
1360
|
+
table.set(0, undefined);
|
|
1361
|
+
table.set(offset + 0, undefined);
|
|
1362
|
+
table.set(offset + 1, null);
|
|
1363
|
+
table.set(offset + 2, true);
|
|
1364
|
+
table.set(offset + 3, false);
|
|
1365
|
+
}
|
|
1366
|
+
function wasm_bindgen_63f5332d1d9a4f22___convert__closures_____invoke___wasm_bindgen_63f5332d1d9a4f22___JsValue______true_(arg0, arg1, arg2) {
|
|
1367
|
+
wasm.wasm_bindgen_63f5332d1d9a4f22___convert__closures_____invoke___wasm_bindgen_63f5332d1d9a4f22___JsValue______true_(arg0, arg1, arg2);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
function wasm_bindgen_63f5332d1d9a4f22___convert__closures_____invoke___wasm_bindgen_63f5332d1d9a4f22___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_63f5332d1d9a4f22___JsError___true_(arg0, arg1, arg2) {
|
|
1371
|
+
const ret = wasm.wasm_bindgen_63f5332d1d9a4f22___convert__closures_____invoke___wasm_bindgen_63f5332d1d9a4f22___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_63f5332d1d9a4f22___JsError___true_(arg0, arg1, arg2);
|
|
1372
|
+
if (ret[1]) {
|
|
1373
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
const __wbindgen_enum_GpuLoadOp = ["load", "clear"];
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
const __wbindgen_enum_GpuStoreOp = ["store", "discard"];
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
const __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
const __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
const __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
1397
|
+
const HandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1398
|
+
? { register: () => {}, unregister: () => {} }
|
|
1399
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_handle_free(ptr, 1));
|
|
1400
|
+
const ProteusAppFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1401
|
+
? { register: () => {}, unregister: () => {} }
|
|
1402
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_proteusapp_free(ptr, 1));
|
|
1403
|
+
const TextureHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1404
|
+
? { register: () => {}, unregister: () => {} }
|
|
1405
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_texturehandle_free(ptr, 1));
|
|
1406
|
+
const TransitionChannelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1407
|
+
? { register: () => {}, unregister: () => {} }
|
|
1408
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_transitionchannel_free(ptr, 1));
|
|
1409
|
+
const VideoHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1410
|
+
? { register: () => {}, unregister: () => {} }
|
|
1411
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_videohandle_free(ptr, 1));
|
|
1412
|
+
|
|
1413
|
+
function addToExternrefTable0(obj) {
|
|
1414
|
+
const idx = wasm.__externref_table_alloc();
|
|
1415
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
1416
|
+
return idx;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
function _assertClass(instance, klass) {
|
|
1420
|
+
if (!(instance instanceof klass)) {
|
|
1421
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1426
|
+
? { register: () => {}, unregister: () => {} }
|
|
1427
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
1428
|
+
|
|
1429
|
+
function debugString(val) {
|
|
1430
|
+
// primitive types
|
|
1431
|
+
const type = typeof val;
|
|
1432
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1433
|
+
return `${val}`;
|
|
1434
|
+
}
|
|
1435
|
+
if (type == 'string') {
|
|
1436
|
+
return `"${val}"`;
|
|
1437
|
+
}
|
|
1438
|
+
if (type == 'symbol') {
|
|
1439
|
+
const description = val.description;
|
|
1440
|
+
if (description == null) {
|
|
1441
|
+
return 'Symbol';
|
|
1442
|
+
} else {
|
|
1443
|
+
return `Symbol(${description})`;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
if (type == 'function') {
|
|
1447
|
+
const name = val.name;
|
|
1448
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1449
|
+
return `Function(${name})`;
|
|
1450
|
+
} else {
|
|
1451
|
+
return 'Function';
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
// objects
|
|
1455
|
+
if (Array.isArray(val)) {
|
|
1456
|
+
const length = val.length;
|
|
1457
|
+
let debug = '[';
|
|
1458
|
+
if (length > 0) {
|
|
1459
|
+
debug += debugString(val[0]);
|
|
1460
|
+
}
|
|
1461
|
+
for(let i = 1; i < length; i++) {
|
|
1462
|
+
debug += ', ' + debugString(val[i]);
|
|
1463
|
+
}
|
|
1464
|
+
debug += ']';
|
|
1465
|
+
return debug;
|
|
1466
|
+
}
|
|
1467
|
+
// Test for built-in
|
|
1468
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1469
|
+
let className;
|
|
1470
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1471
|
+
className = builtInMatches[1];
|
|
1472
|
+
} else {
|
|
1473
|
+
// Failed to match the standard '[object ClassName]'
|
|
1474
|
+
return toString.call(val);
|
|
1475
|
+
}
|
|
1476
|
+
if (className == 'Object') {
|
|
1477
|
+
// we're a user defined class or Object
|
|
1478
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1479
|
+
// easier than looping through ownProperties of `val`.
|
|
1480
|
+
try {
|
|
1481
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1482
|
+
} catch (_) {
|
|
1483
|
+
return 'Object';
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
// errors
|
|
1487
|
+
if (val instanceof Error) {
|
|
1488
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1489
|
+
}
|
|
1490
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1491
|
+
return className;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
1495
|
+
ptr = ptr >>> 0;
|
|
1496
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1500
|
+
ptr = ptr >>> 0;
|
|
1501
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
let cachedDataViewMemory0 = null;
|
|
1505
|
+
function getDataViewMemory0() {
|
|
1506
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1507
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1508
|
+
}
|
|
1509
|
+
return cachedDataViewMemory0;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
1513
|
+
function getFloat64ArrayMemory0() {
|
|
1514
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
1515
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
1516
|
+
}
|
|
1517
|
+
return cachedFloat64ArrayMemory0;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
function getStringFromWasm0(ptr, len) {
|
|
1521
|
+
return decodeText(ptr >>> 0, len);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1525
|
+
function getUint32ArrayMemory0() {
|
|
1526
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1527
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1528
|
+
}
|
|
1529
|
+
return cachedUint32ArrayMemory0;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1533
|
+
function getUint8ArrayMemory0() {
|
|
1534
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1535
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1536
|
+
}
|
|
1537
|
+
return cachedUint8ArrayMemory0;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
function handleError(f, args) {
|
|
1541
|
+
try {
|
|
1542
|
+
return f.apply(this, args);
|
|
1543
|
+
} catch (e) {
|
|
1544
|
+
const idx = addToExternrefTable0(e);
|
|
1545
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
function isLikeNone(x) {
|
|
1550
|
+
return x === undefined || x === null;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
1554
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1555
|
+
const real = (...args) => {
|
|
1556
|
+
|
|
1557
|
+
// First up with a closure we increment the internal reference
|
|
1558
|
+
// count. This ensures that the Rust closure environment won't
|
|
1559
|
+
// be deallocated while we're invoking it.
|
|
1560
|
+
state.cnt++;
|
|
1561
|
+
const a = state.a;
|
|
1562
|
+
state.a = 0;
|
|
1563
|
+
try {
|
|
1564
|
+
return f(a, state.b, ...args);
|
|
1565
|
+
} finally {
|
|
1566
|
+
state.a = a;
|
|
1567
|
+
real._wbg_cb_unref();
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
real._wbg_cb_unref = () => {
|
|
1571
|
+
if (--state.cnt === 0) {
|
|
1572
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1573
|
+
state.a = 0;
|
|
1574
|
+
CLOSURE_DTORS.unregister(state);
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1578
|
+
return real;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1582
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1583
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1584
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1585
|
+
return ptr;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
1589
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
1590
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
1591
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1592
|
+
return ptr;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1596
|
+
if (realloc === undefined) {
|
|
1597
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1598
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1599
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1600
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1601
|
+
return ptr;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
let len = arg.length;
|
|
1605
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1606
|
+
|
|
1607
|
+
const mem = getUint8ArrayMemory0();
|
|
1608
|
+
|
|
1609
|
+
let offset = 0;
|
|
1610
|
+
|
|
1611
|
+
for (; offset < len; offset++) {
|
|
1612
|
+
const code = arg.charCodeAt(offset);
|
|
1613
|
+
if (code > 0x7F) break;
|
|
1614
|
+
mem[ptr + offset] = code;
|
|
1615
|
+
}
|
|
1616
|
+
if (offset !== len) {
|
|
1617
|
+
if (offset !== 0) {
|
|
1618
|
+
arg = arg.slice(offset);
|
|
1619
|
+
}
|
|
1620
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1621
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1622
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1623
|
+
|
|
1624
|
+
offset += ret.written;
|
|
1625
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
WASM_VECTOR_LEN = offset;
|
|
1629
|
+
return ptr;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
function takeFromExternrefTable0(idx) {
|
|
1633
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1634
|
+
wasm.__externref_table_dealloc(idx);
|
|
1635
|
+
return value;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1639
|
+
cachedTextDecoder.decode();
|
|
1640
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1641
|
+
let numBytesDecoded = 0;
|
|
1642
|
+
function decodeText(ptr, len) {
|
|
1643
|
+
numBytesDecoded += len;
|
|
1644
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1645
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1646
|
+
cachedTextDecoder.decode();
|
|
1647
|
+
numBytesDecoded = len;
|
|
1648
|
+
}
|
|
1649
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1653
|
+
|
|
1654
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1655
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1656
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1657
|
+
view.set(buf);
|
|
1658
|
+
return {
|
|
1659
|
+
read: arg.length,
|
|
1660
|
+
written: buf.length
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
let WASM_VECTOR_LEN = 0;
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
let wasm;
|
|
1669
|
+
export function __wbg_set_wasm(val) {
|
|
1670
|
+
wasm = val;
|
|
1671
|
+
}
|