isard 0.0.0-stage → 0.2.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/LICENSE +21 -0
  3. package/README.md +150 -2
  4. package/dist/basemap.worker.d.ts +66 -0
  5. package/dist/basemap.worker.js +4 -0
  6. package/dist/basemap.worker.js.map +13 -0
  7. package/dist/basemaps.d.ts +46 -0
  8. package/dist/basemaps.js +95 -0
  9. package/dist/basemaps.js.map +1 -0
  10. package/dist/color.d.ts +8 -0
  11. package/dist/color.js +98 -0
  12. package/dist/color.js.map +1 -0
  13. package/dist/controls.d.ts +43 -0
  14. package/dist/controls.js +115 -0
  15. package/dist/controls.js.map +1 -0
  16. package/dist/decoder.worker.js +6 -0
  17. package/dist/decoder.worker.js.map +12 -0
  18. package/dist/decoders.d.ts +27 -0
  19. package/dist/decoders.js +109 -0
  20. package/dist/decoders.js.map +1 -0
  21. package/dist/equirectangular.d.ts +35 -0
  22. package/dist/equirectangular.js +113 -0
  23. package/dist/equirectangular.js.map +1 -0
  24. package/dist/extrusions.d.ts +79 -0
  25. package/dist/extrusions.js +215 -0
  26. package/dist/extrusions.js.map +1 -0
  27. package/dist/features.d.ts +159 -0
  28. package/dist/features.js +387 -0
  29. package/dist/features.js.map +1 -0
  30. package/dist/geoplateforme.d.ts +35 -0
  31. package/dist/geoplateforme.js +56 -0
  32. package/dist/geoplateforme.js.map +1 -0
  33. package/dist/glyphs.d.ts +104 -0
  34. package/dist/glyphs.js +383 -0
  35. package/dist/glyphs.js.map +1 -0
  36. package/dist/index.d.ts +34 -0
  37. package/dist/index.js +25 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/interaction.d.ts +50 -0
  40. package/dist/interaction.js +243 -0
  41. package/dist/interaction.js.map +1 -0
  42. package/dist/isard_bg.wasm +0 -0
  43. package/dist/isard_core_bg.wasm +0 -0
  44. package/dist/layers.d.ts +100 -0
  45. package/dist/layers.js +281 -0
  46. package/dist/layers.js.map +1 -0
  47. package/dist/loader.d.ts +30 -0
  48. package/dist/loader.js +102 -0
  49. package/dist/loader.js.map +1 -0
  50. package/dist/map.d.ts +203 -0
  51. package/dist/map.js +1083 -0
  52. package/dist/map.js.map +1 -0
  53. package/dist/mvt.d.ts +19 -0
  54. package/dist/mvt.js +231 -0
  55. package/dist/mvt.js.map +1 -0
  56. package/dist/overlay.d.ts +118 -0
  57. package/dist/overlay.js +334 -0
  58. package/dist/overlay.js.map +1 -0
  59. package/dist/protocol.d.ts +30 -0
  60. package/dist/protocol.js +2 -0
  61. package/dist/protocol.js.map +1 -0
  62. package/dist/style.d.ts +7 -0
  63. package/dist/style.js +130 -0
  64. package/dist/style.js.map +1 -0
  65. package/dist/symbols.d.ts +61 -0
  66. package/dist/symbols.js +238 -0
  67. package/dist/symbols.js.map +1 -0
  68. package/dist/terrain.d.ts +14 -0
  69. package/dist/terrain.js +44 -0
  70. package/dist/terrain.js.map +1 -0
  71. package/dist/types.d.ts +304 -0
  72. package/dist/types.js +2 -0
  73. package/dist/types.js.map +1 -0
  74. package/dist/vectorstyle.d.ts +83 -0
  75. package/dist/vectorstyle.js +518 -0
  76. package/dist/vectorstyle.js.map +1 -0
  77. package/dist/vectortiles.d.ts +121 -0
  78. package/dist/vectortiles.js +507 -0
  79. package/dist/vectortiles.js.map +1 -0
  80. package/dist/wasm/isard.d.ts +611 -0
  81. package/dist/wasm/isard.js +2606 -0
  82. package/dist/wasm/isard_core.d.ts +468 -0
  83. package/dist/wasm/isard_core.js +2360 -0
  84. package/package.json +49 -4
@@ -0,0 +1,2606 @@
1
+ /* @ts-self-types="./isard.d.ts" */
2
+
3
+ export class Engine {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ EngineFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_engine_free(ptr, 0);
13
+ }
14
+ /**
15
+ * Circle layer of `feature_count` features: points (Mercator [0, 1], interleaved) and the feature of each
16
+ * @param {Float64Array} points
17
+ * @param {Uint32Array} feature
18
+ * @param {number} feature_count
19
+ * @returns {number}
20
+ */
21
+ addCircles(points, feature, feature_count) {
22
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
23
+ const len0 = WASM_VECTOR_LEN;
24
+ const ptr1 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
25
+ const len1 = WASM_VECTOR_LEN;
26
+ const ret = wasm.engine_addCircles(this.__wbg_ptr, ptr0, len0, ptr1, len1, feature_count);
27
+ if (ret[2]) {
28
+ throw takeFromExternrefTable0(ret[1]);
29
+ }
30
+ return ret[0] >>> 0;
31
+ }
32
+ /**
33
+ * An empty extrusion layer: its blocks come in batches (`setExtrusionBatch`)
34
+ * @returns {number}
35
+ */
36
+ addExtrusions() {
37
+ const ret = wasm.engine_addExtrusions(this.__wbg_ptr);
38
+ if (ret[2]) {
39
+ throw takeFromExternrefTable0(ret[1]);
40
+ }
41
+ return ret[0] >>> 0;
42
+ }
43
+ /**
44
+ * Fill layer of `feature_count` features: polygons given by their points (Mercator [0, 1], interleaved), the first
45
+ * point of each ring (`ring_start`, one more entry than rings), the first ring of each polygon (`polygon_start`,
46
+ * one more entry than polygons; the first ring is the outer one, the others holes) and the feature of each polygon
47
+ * @param {Float64Array} points
48
+ * @param {Uint32Array} ring_start
49
+ * @param {Uint32Array} polygon_start
50
+ * @param {Uint32Array} feature
51
+ * @param {number} feature_count
52
+ * @returns {number}
53
+ */
54
+ addFills(points, ring_start, polygon_start, feature, feature_count) {
55
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
56
+ const len0 = WASM_VECTOR_LEN;
57
+ const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
58
+ const len1 = WASM_VECTOR_LEN;
59
+ const ptr2 = passArray32ToWasm0(polygon_start, wasm.__wbindgen_malloc);
60
+ const len2 = WASM_VECTOR_LEN;
61
+ const ptr3 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
62
+ const len3 = WASM_VECTOR_LEN;
63
+ const ret = wasm.engine_addFills(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, feature_count);
64
+ if (ret[2]) {
65
+ throw takeFromExternrefTable0(ret[1]);
66
+ }
67
+ return ret[0] >>> 0;
68
+ }
69
+ /**
70
+ * Ground layer running `code` (GLSL ES 3.0 defining `vec4 ground(vec2 offset)`, see `render::ground`) over the
71
+ * ground; `anchor`: Mercator point the offsets are taken from; bounds: Mercator box it shows in. Compilation errors
72
+ * come back with the shader's info log (line numbers of `code`)
73
+ * @param {string} code
74
+ * @param {number} anchor_x
75
+ * @param {number} anchor_y
76
+ * @param {number} min_x
77
+ * @param {number} min_y
78
+ * @param {number} max_x
79
+ * @param {number} max_y
80
+ * @returns {number}
81
+ */
82
+ addGround(code, anchor_x, anchor_y, min_x, min_y, max_x, max_y) {
83
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
84
+ const len0 = WASM_VECTOR_LEN;
85
+ const ret = wasm.engine_addGround(this.__wbg_ptr, ptr0, len0, anchor_x, anchor_y, min_x, min_y, max_x, max_y);
86
+ if (ret[2]) {
87
+ throw takeFromExternrefTable0(ret[1]);
88
+ }
89
+ return ret[0] >>> 0;
90
+ }
91
+ /**
92
+ * Line layer of `feature_count` features: polylines given by their points (Mercator [0, 1], interleaved), the
93
+ * first point of each (`start`, one more entry than lines) and the feature each one belongs to
94
+ * @param {Float64Array} points
95
+ * @param {Uint32Array} start
96
+ * @param {Uint32Array} feature
97
+ * @param {number} feature_count
98
+ * @returns {number}
99
+ */
100
+ addLines(points, start, feature, feature_count) {
101
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
102
+ const len0 = WASM_VECTOR_LEN;
103
+ const ptr1 = passArray32ToWasm0(start, wasm.__wbindgen_malloc);
104
+ const len1 = WASM_VECTOR_LEN;
105
+ const ptr2 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
106
+ const len2 = WASM_VECTOR_LEN;
107
+ const ret = wasm.engine_addLines(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, feature_count);
108
+ if (ret[2]) {
109
+ throw takeFromExternrefTable0(ret[1]);
110
+ }
111
+ return ret[0] >>> 0;
112
+ }
113
+ /**
114
+ * Network of `mercator.length / 2` nodes (Mercator [0, 1], y towards the south, interleaved: converted by the
115
+ * JavaScript side, where `Math.tan` and `Math.log` are much faster than in WebAssembly) and `edges.length / 2`
116
+ * edges (node index pairs, interleaved). `line_start` and `line_points`: the line of each edge from A to B, points
117
+ * `line_start[e] .. line_start[e + 1]` of `line_points` (Mercator, interleaved; straight if fewer than two). `costs`: per edge, the
118
+ * cost of travelling it from A to B then from B to A; without, values are interpolated along the edges.
119
+ * @param {Float64Array} mercator
120
+ * @param {Uint32Array} edges
121
+ * @param {Uint32Array | null | undefined} line_start
122
+ * @param {Float64Array | null | undefined} line_points
123
+ * @param {Float32Array | null | undefined} costs
124
+ * @param {Float32Array} style
125
+ * @returns {number}
126
+ */
127
+ addNetwork(mercator, edges, line_start, line_points, costs, style) {
128
+ const ptr0 = passArrayF64ToWasm0(mercator, wasm.__wbindgen_malloc);
129
+ const len0 = WASM_VECTOR_LEN;
130
+ const ptr1 = passArray32ToWasm0(edges, wasm.__wbindgen_malloc);
131
+ const len1 = WASM_VECTOR_LEN;
132
+ var ptr2 = isLikeNone(line_start) ? 0 : passArray32ToWasm0(line_start, wasm.__wbindgen_malloc);
133
+ var len2 = WASM_VECTOR_LEN;
134
+ var ptr3 = isLikeNone(line_points) ? 0 : passArrayF64ToWasm0(line_points, wasm.__wbindgen_malloc);
135
+ var len3 = WASM_VECTOR_LEN;
136
+ var ptr4 = isLikeNone(costs) ? 0 : passArrayF32ToWasm0(costs, wasm.__wbindgen_malloc);
137
+ var len4 = WASM_VECTOR_LEN;
138
+ const ptr5 = passArrayF32ToWasm0(style, wasm.__wbindgen_malloc);
139
+ const len5 = WASM_VECTOR_LEN;
140
+ const ret = wasm.engine_addNetwork(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
141
+ if (ret[2]) {
142
+ throw takeFromExternrefTable0(ret[1]);
143
+ }
144
+ return ret[0] >>> 0;
145
+ }
146
+ /**
147
+ * Raster tiles in Web Mercator; `url` holds {z}, {x} and {y}. `size`: side of the tiles' textures (256 by
148
+ * default); `loader`: draws each tile instead of fetching `url`, `(z, x, y, signal) => Promise<ImageBitmap |
149
+ * null>`, an image of `size` × `size` (null: nothing there)
150
+ * @param {string} url
151
+ * @param {number} min_z
152
+ * @param {number} max_z
153
+ * @param {number} opacity
154
+ * @param {number} saturation
155
+ * @param {number | null | undefined} size
156
+ * @param {((z: number, x: number, y: number, signal: AbortSignal) => Promise<ImageBitmap | null>) | undefined} loader
157
+ * @returns {number}
158
+ */
159
+ addRaster(url, min_z, max_z, opacity, saturation, size, loader) {
160
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
161
+ const len0 = WASM_VECTOR_LEN;
162
+ const ret = wasm.engine_addRaster(this.__wbg_ptr, ptr0, len0, min_z, max_z, opacity, saturation, isLikeNone(size) ? Number.MAX_SAFE_INTEGER : (size) >> 0, isLikeNone(loader) ? 0 : addToExternrefTable0(loader));
163
+ if (ret[2]) {
164
+ throw takeFromExternrefTable0(ret[1]);
165
+ }
166
+ return ret[0] >>> 0;
167
+ }
168
+ /**
169
+ * An empty symbol layer
170
+ * @returns {number}
171
+ */
172
+ addSymbols() {
173
+ const ret = wasm.engine_addSymbols(this.__wbg_ptr);
174
+ if (ret[2]) {
175
+ throw takeFromExternrefTable0(ret[1]);
176
+ }
177
+ return ret[0] >>> 0;
178
+ }
179
+ /**
180
+ * 3D Tiles (b3dm / glb textured meshes, external tilesets) from the URL of a `tileset.json`. `max_error`:
181
+ * screen-space error (CSS pixels) above which a tile is refined; 16 is the usual value, lower is finer.
182
+ * @param {string} url
183
+ * @param {number} max_error
184
+ * @returns {number}
185
+ */
186
+ addTiles3d(url, max_error) {
187
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
188
+ const len0 = WASM_VECTOR_LEN;
189
+ const ret = wasm.engine_addTiles3d(this.__wbg_ptr, ptr0, len0, max_error);
190
+ if (ret[2]) {
191
+ throw takeFromExternrefTable0(ret[1]);
192
+ }
193
+ return ret[0] >>> 0;
194
+ }
195
+ /**
196
+ * Longitudes and latitudes the view covers on the ground, `[west, south, east, north]` (degrees): the screen's
197
+ * border cast on the ground, or on the far plane where it passes the horizon
198
+ * @returns {Float64Array}
199
+ */
200
+ bounds() {
201
+ const ret = wasm.engine_bounds(this.__wbg_ptr);
202
+ var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
203
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
204
+ return v1;
205
+ }
206
+ /**
207
+ * @returns {Camera}
208
+ */
209
+ camera() {
210
+ const ret = wasm.engine_camera(this.__wbg_ptr);
211
+ return ret;
212
+ }
213
+ clearPreload() {
214
+ wasm.engine_clearPreload(this.__wbg_ptr);
215
+ }
216
+ /**
217
+ * Position under a screen point (CSS pixels), undefined above the horizon; on the relief itself
218
+ * @param {number} x
219
+ * @param {number} y
220
+ * @returns {[lon: number, lat: number] | undefined}
221
+ */
222
+ ground(x, y) {
223
+ const ret = wasm.engine_ground(this.__wbg_ptr, x, y);
224
+ return ret;
225
+ }
226
+ /**
227
+ * Colors an extrusion layer by the node values of network layer `network` (undefined: by its own values):
228
+ * each block takes min(value(A) + cost from A, value(B) + cost from B) from its anchors (`setExtrusionAnchors`),
229
+ * through the layer's ramp, up to `max` (above: its own color)
230
+ * @param {number} id
231
+ * @param {number | null | undefined} network
232
+ * @param {number} max
233
+ */
234
+ linkExtrusionNetwork(id, network, max) {
235
+ wasm.engine_linkExtrusionNetwork(this.__wbg_ptr, id, isLikeNone(network) ? Number.MAX_SAFE_INTEGER : (network) >>> 0, max);
236
+ }
237
+ /**
238
+ * Moves a layer to a drawing position (0 = bottom)
239
+ * @param {number} id
240
+ * @param {number} index
241
+ */
242
+ moveLayer(id, index) {
243
+ wasm.engine_moveLayer(this.__wbg_ptr, id, index);
244
+ }
245
+ /**
246
+ * Pieces of a network in all and drawn in the last frame (only the squares in view are)
247
+ * @param {number} id
248
+ * @returns {NetworkStats | undefined}
249
+ */
250
+ networkStats(id) {
251
+ const ret = wasm.engine_networkStats(this.__wbg_ptr, id);
252
+ return ret;
253
+ }
254
+ /**
255
+ * `redraw` is called when the engine needs a new frame (a tile arrived)
256
+ * @param {HTMLCanvasElement} canvas
257
+ * @param {() => void} redraw
258
+ */
259
+ constructor(canvas, redraw) {
260
+ const ret = wasm.engine_new(canvas, redraw);
261
+ if (ret[2]) {
262
+ throw takeFromExternrefTable0(ret[1]);
263
+ }
264
+ this.__wbg_ptr = ret[0];
265
+ EngineFinalization.register(this, this.__wbg_ptr, this);
266
+ return this;
267
+ }
268
+ /**
269
+ * Drags the ground from one screen point to another (CSS pixels); in relief, the ground point grabbed stays
270
+ * under the cursor
271
+ * @param {number} x0
272
+ * @param {number} y0
273
+ * @param {number} x1
274
+ * @param {number} y1
275
+ */
276
+ pan(x0, y0, x1, y1) {
277
+ wasm.engine_pan(this.__wbg_ptr, x0, y0, x1, y1);
278
+ }
279
+ /**
280
+ * Feature under a screen point (CSS pixels), or the nearest one within `radius` CSS pixels: its layer and its
281
+ * index there (the edge of a network, the feature of a line, circle or fill layer), undefined if none. The
282
+ * pickable layers are drawn with each feature colored by its number; then the fills are tested on the ground.
283
+ * `only`: the ids of the layers to look in (all if undefined): the others are not drawn and hide nothing.
284
+ * Reads the pixels back at once (the GPU finishes its work first): for clicks; `requestPick` for the hover
285
+ * @param {number} x
286
+ * @param {number} y
287
+ * @param {number | null} [radius]
288
+ * @param {Uint32Array | null} [only]
289
+ * @returns {PickHit | undefined}
290
+ */
291
+ pick(x, y, radius, only) {
292
+ var ptr0 = isLikeNone(only) ? 0 : passArray32ToWasm0(only, wasm.__wbindgen_malloc);
293
+ var len0 = WASM_VECTOR_LEN;
294
+ const ret = wasm.engine_pick(this.__wbg_ptr, x, y, !isLikeNone(radius), isLikeNone(radius) ? 0 : radius, ptr0, len0);
295
+ return ret;
296
+ }
297
+ /**
298
+ * The answer to the last `requestPick` once the GPU has delivered it (then forgotten), undefined while it is not
299
+ * there yet (or nothing was asked, or the context was lost)
300
+ * @returns {PickResult | undefined}
301
+ */
302
+ pollPick() {
303
+ const ret = wasm.engine_pollPick(this.__wbg_ptr);
304
+ return ret;
305
+ }
306
+ /**
307
+ * Loads in advance the tiles of a camera flight's destination; `clearPreload` when the flight ends
308
+ * @param {number} lon
309
+ * @param {number} lat
310
+ * @param {number} zoom
311
+ * @param {number} pitch
312
+ * @param {number} bearing
313
+ */
314
+ preload(lon, lat, zoom, pitch, bearing) {
315
+ wasm.engine_preload(this.__wbg_ptr, lon, lat, zoom, pitch, bearing);
316
+ }
317
+ /**
318
+ * Screen point (CSS pixels) of a ground position, undefined behind the camera
319
+ * @param {number} lon
320
+ * @param {number} lat
321
+ * @returns {[x: number, y: number] | undefined}
322
+ */
323
+ project(lon, lat) {
324
+ const ret = wasm.engine_project(this.__wbg_ptr, lon, lat);
325
+ return ret;
326
+ }
327
+ /**
328
+ * @param {number} id
329
+ * @param {number} key
330
+ */
331
+ removeExtrusionBatch(id, key) {
332
+ wasm.engine_removeExtrusionBatch(this.__wbg_ptr, id, key);
333
+ }
334
+ /**
335
+ * @param {number} id
336
+ */
337
+ removeLayer(id) {
338
+ wasm.engine_removeLayer(this.__wbg_ptr, id);
339
+ }
340
+ /**
341
+ * Draws a frame; returns true while tiles are still loading (a new frame will be asked through `redraw`)
342
+ * @returns {boolean}
343
+ */
344
+ render() {
345
+ const ret = wasm.engine_render(this.__wbg_ptr);
346
+ return ret !== 0;
347
+ }
348
+ /**
349
+ * Asks what is under a screen point without waiting for the GPU (as `pick`, with the position there): the
350
+ * picking pass is drawn now and read back into a buffer; `pollPick` gives the answer on a later frame. A new
351
+ * request replaces the one in flight. Returns false if nothing could be asked (no WebGL2 fence)
352
+ * @param {number} x
353
+ * @param {number} y
354
+ * @param {number | null} [radius]
355
+ * @param {Uint32Array | null} [only]
356
+ * @returns {boolean}
357
+ */
358
+ requestPick(x, y, radius, only) {
359
+ var ptr0 = isLikeNone(only) ? 0 : passArray32ToWasm0(only, wasm.__wbindgen_malloc);
360
+ var len0 = WASM_VECTOR_LEN;
361
+ const ret = wasm.engine_requestPick(this.__wbg_ptr, x, y, !isLikeNone(radius), isLikeNone(radius) ? 0 : radius, ptr0, len0);
362
+ return ret !== 0;
363
+ }
364
+ /**
365
+ * Viewport in CSS pixels and device pixel ratio
366
+ * @param {number} width
367
+ * @param {number} height
368
+ * @param {number} pixel_ratio
369
+ */
370
+ resize(width, height, pixel_ratio) {
371
+ wasm.engine_resize(this.__wbg_ptr, width, height, pixel_ratio);
372
+ }
373
+ /**
374
+ * Turns and tilts around the screen center, in degrees
375
+ * @param {number} bearing
376
+ * @param {number} pitch
377
+ */
378
+ rotate(bearing, pitch) {
379
+ wasm.engine_rotate(this.__wbg_ptr, bearing, pitch);
380
+ }
381
+ /**
382
+ * Sky over the plane (`MapLibre`'s `setSky`): colors of the sky, the horizon and the fog (RGB 0-1, 9 numbers),
383
+ * then the sky-horizon, horizon-fog and fog-ground blends; `undefined` for none (the background color shows)
384
+ * @param {Float32Array | null} [settings]
385
+ */
386
+ setAtmosphere(settings) {
387
+ var ptr0 = isLikeNone(settings) ? 0 : passArrayF32ToWasm0(settings, wasm.__wbindgen_malloc);
388
+ var len0 = WASM_VECTOR_LEN;
389
+ wasm.engine_setAtmosphere(this.__wbg_ptr, ptr0, len0);
390
+ }
391
+ /**
392
+ * @param {number} r
393
+ * @param {number} g
394
+ * @param {number} b
395
+ */
396
+ setBackground(r, g, b) {
397
+ wasm.engine_setBackground(this.__wbg_ptr, r, g, b);
398
+ }
399
+ /**
400
+ * The body the map is drawn on: its equatorial radius (metres) and flattening (0 for a sphere), the halo of its
401
+ * atmosphere around the globe (RGB 0-1 and its strength, 4 numbers; `undefined` for an airless body), and the
402
+ * lowest and highest altitudes of its ground (metres: what its relief may raise into view). WGS 84, the Earth's
403
+ * blue halo and the relief of France by default; set before the layers and the relief, whose shaders may take its
404
+ * size (`ISARD_EARTH` of the ground layers)
405
+ * @param {number} radius
406
+ * @param {number} flattening
407
+ * @param {Float32Array | null | undefined} halo
408
+ * @param {number} lowest
409
+ * @param {number} highest
410
+ */
411
+ setBody(radius, flattening, halo, lowest, highest) {
412
+ var ptr0 = isLikeNone(halo) ? 0 : passArrayF32ToWasm0(halo, wasm.__wbindgen_malloc);
413
+ var len0 = WASM_VECTOR_LEN;
414
+ wasm.engine_setBody(this.__wbg_ptr, radius, flattening, ptr0, len0, lowest, highest);
415
+ }
416
+ /**
417
+ * @param {number} lon
418
+ * @param {number} lat
419
+ * @param {number} zoom
420
+ * @param {number} pitch
421
+ * @param {number} bearing
422
+ */
423
+ setCamera(lon, lat, zoom, pitch, bearing) {
424
+ wasm.engine_setCamera(this.__wbg_ptr, lon, lat, zoom, pitch, bearing);
425
+ }
426
+ /**
427
+ * Circles lying on the ground (true) or facing the screen
428
+ * @param {number} id
429
+ * @param {boolean} on_ground
430
+ */
431
+ setCircleAlignment(id, on_ground) {
432
+ wasm.engine_setCircleAlignment(this.__wbg_ptr, id, on_ground);
433
+ }
434
+ /**
435
+ * New points for a circle layer (same features)
436
+ * @param {number} id
437
+ * @param {Float64Array} points
438
+ * @param {Uint32Array} feature
439
+ */
440
+ setCircles(id, points, feature) {
441
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
442
+ const len0 = WASM_VECTOR_LEN;
443
+ const ptr1 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
444
+ const len1 = WASM_VECTOR_LEN;
445
+ wasm.engine_setCircles(this.__wbg_ptr, id, ptr0, len0, ptr1, len1);
446
+ }
447
+ /**
448
+ * Anchors of batch `key` on the linked network: per feature, node A, node B, cost from A, cost from B
449
+ * @param {number} id
450
+ * @param {number} key
451
+ * @param {Float32Array} anchors
452
+ */
453
+ setExtrusionAnchors(id, key, anchors) {
454
+ const ptr0 = passArrayF32ToWasm0(anchors, wasm.__wbindgen_malloc);
455
+ const len0 = WASM_VECTOR_LEN;
456
+ const ret = wasm.engine_setExtrusionAnchors(this.__wbg_ptr, id, key, ptr0, len0);
457
+ if (ret[1]) {
458
+ throw takeFromExternrefTable0(ret[0]);
459
+ }
460
+ }
461
+ /**
462
+ * Adds or replaces batch `key` of an extrusion layer: polygons as for `addFills`, `feature_count` features (the
463
+ * feature style gives each its height and base height as its two sizes, metres)
464
+ * @param {number} id
465
+ * @param {number} key
466
+ * @param {Float64Array} points
467
+ * @param {Uint32Array} ring_start
468
+ * @param {Uint32Array} polygon_start
469
+ * @param {Uint32Array} feature
470
+ * @param {number} feature_count
471
+ */
472
+ setExtrusionBatch(id, key, points, ring_start, polygon_start, feature, feature_count) {
473
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
474
+ const len0 = WASM_VECTOR_LEN;
475
+ const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
476
+ const len1 = WASM_VECTOR_LEN;
477
+ const ptr2 = passArray32ToWasm0(polygon_start, wasm.__wbindgen_malloc);
478
+ const len2 = WASM_VECTOR_LEN;
479
+ const ptr3 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
480
+ const len3 = WASM_VECTOR_LEN;
481
+ const ret = wasm.engine_setExtrusionBatch(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, feature_count);
482
+ if (ret[1]) {
483
+ throw takeFromExternrefTable0(ret[0]);
484
+ }
485
+ }
486
+ /**
487
+ * Layer-wide style of a feature layer: opacity as zoom stops (four zooms then four values), the zoom range it
488
+ * shows in (`min_zoom` included, `max_zoom` excluded), whether it shows at all
489
+ * @param {number} id
490
+ * @param {Float32Array} opacity
491
+ * @param {number} min_zoom
492
+ * @param {number} max_zoom
493
+ * @param {boolean} visible
494
+ */
495
+ setFeatureLayer(id, opacity, min_zoom, max_zoom, visible) {
496
+ const ptr0 = passArrayF32ToWasm0(opacity, wasm.__wbindgen_malloc);
497
+ const len0 = WASM_VECTOR_LEN;
498
+ wasm.engine_setFeatureLayer(this.__wbg_ptr, id, ptr0, len0, min_zoom, max_zoom, visible);
499
+ }
500
+ /**
501
+ * One byte per feature, 0 hiding it (the filter)
502
+ * @param {number} id
503
+ * @param {Uint8Array} mask
504
+ * @param {number | null} [key]
505
+ */
506
+ setFeatureMask(id, mask, key) {
507
+ const ptr0 = passArray8ToWasm0(mask, wasm.__wbindgen_malloc);
508
+ const len0 = WASM_VECTOR_LEN;
509
+ wasm.engine_setFeatureMask(this.__wbg_ptr, id, ptr0, len0, isLikeNone(key) ? Number.MAX_SAFE_INTEGER : (key) >>> 0);
510
+ }
511
+ /**
512
+ * Colors of the values `min` to `max`, 256 RGBA texels (1024 bytes); undefined: none
513
+ * @param {number} id
514
+ * @param {Uint8Array | null | undefined} rgba
515
+ * @param {number} min
516
+ * @param {number} max
517
+ */
518
+ setFeatureRamp(id, rgba, min, max) {
519
+ var ptr0 = isLikeNone(rgba) ? 0 : passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
520
+ var len0 = WASM_VECTOR_LEN;
521
+ wasm.engine_setFeatureRamp(this.__wbg_ptr, id, ptr0, len0, min, max);
522
+ }
523
+ /**
524
+ * Style of the features of a line, circle, fill or extrusion layer (batch `key` of the latter): 32 floats per
525
+ * feature, its color (RGBA 0-1), its second color (a circle's stroke), then two sizes as zoom stops (four zooms,
526
+ * four values each): a line's width; a circle's radius and stroke width, CSS pixels; a block's height and base
527
+ * height, metres
528
+ * @param {number} id
529
+ * @param {Float32Array} style
530
+ * @param {number | null} [key]
531
+ */
532
+ setFeatureStyle(id, style, key) {
533
+ const ptr0 = passArrayF32ToWasm0(style, wasm.__wbindgen_malloc);
534
+ const len0 = WASM_VECTOR_LEN;
535
+ wasm.engine_setFeatureStyle(this.__wbg_ptr, id, ptr0, len0, isLikeNone(key) ? Number.MAX_SAFE_INTEGER : (key) >>> 0);
536
+ }
537
+ /**
538
+ * One value per feature, colored through the layer's ramp (`setFeatureRamp`); 1e30 or NaN: its own color
539
+ * @param {number} id
540
+ * @param {Float32Array} values
541
+ * @param {number | null} [key]
542
+ */
543
+ setFeatureValues(id, values, key) {
544
+ const ptr0 = passArrayF32ToWasm0(values, wasm.__wbindgen_malloc);
545
+ const len0 = WASM_VECTOR_LEN;
546
+ wasm.engine_setFeatureValues(this.__wbg_ptr, id, ptr0, len0, isLikeNone(key) ? Number.MAX_SAFE_INTEGER : (key) >>> 0);
547
+ }
548
+ /**
549
+ * New polygons for a fill layer (same arguments as `addFills`, the same features)
550
+ * @param {number} id
551
+ * @param {Float64Array} points
552
+ * @param {Uint32Array} ring_start
553
+ * @param {Uint32Array} polygon_start
554
+ * @param {Uint32Array} feature
555
+ */
556
+ setFills(id, points, ring_start, polygon_start, feature) {
557
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
558
+ const len0 = WASM_VECTOR_LEN;
559
+ const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
560
+ const len1 = WASM_VECTOR_LEN;
561
+ const ptr2 = passArray32ToWasm0(polygon_start, wasm.__wbindgen_malloc);
562
+ const len2 = WASM_VECTOR_LEN;
563
+ const ptr3 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
564
+ const len3 = WASM_VECTOR_LEN;
565
+ wasm.engine_setFills(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
566
+ }
567
+ /**
568
+ * Color of the globe under the tiles (polar caps)
569
+ * @param {number} r
570
+ * @param {number} g
571
+ * @param {number} b
572
+ */
573
+ setGlobeColor(r, g, b) {
574
+ wasm.engine_setGlobeColor(this.__wbg_ptr, r, g, b);
575
+ }
576
+ /**
577
+ * Globe (true) or Web Mercator (false)
578
+ * @param {boolean} globe
579
+ */
580
+ setGlobe(globe) {
581
+ wasm.engine_setGlobe(this.__wbg_ptr, globe);
582
+ }
583
+ /**
584
+ * The glyph atlas shared by the symbol layers, one page: `width` × `height` bytes of signed distances
585
+ * (allocated again, filled with `data` if given)
586
+ * @param {number} width
587
+ * @param {number} height
588
+ * @param {Uint8Array | null} [data]
589
+ */
590
+ setGlyphAtlas(width, height, data) {
591
+ var ptr0 = isLikeNone(data) ? 0 : passArray8ToWasm0(data, wasm.__wbindgen_malloc);
592
+ var len0 = WASM_VECTOR_LEN;
593
+ const ret = wasm.engine_setGlyphAtlas(this.__wbg_ptr, width, height, ptr0, len0);
594
+ if (ret[1]) {
595
+ throw takeFromExternrefTable0(ret[0]);
596
+ }
597
+ }
598
+ /**
599
+ * The glyph atlas shared by the symbol layers, `pages` pages of `width` × `height` bytes of signed distances,
600
+ * allocated again and empty (`updateGlyphPage` fills them). A glyph on page `p` at row `v` has the atlas
601
+ * coordinate `v + p × height`
602
+ * @param {number} width
603
+ * @param {number} height
604
+ * @param {number} pages
605
+ */
606
+ setGlyphPages(width, height, pages) {
607
+ const ret = wasm.engine_setGlyphPages(this.__wbg_ptr, width, height, pages);
608
+ if (ret[1]) {
609
+ throw takeFromExternrefTable0(ret[0]);
610
+ }
611
+ }
612
+ /**
613
+ * @param {number} id
614
+ * @param {number} min_x
615
+ * @param {number} min_y
616
+ * @param {number} max_x
617
+ * @param {number} max_y
618
+ */
619
+ setGroundBounds(id, min_x, min_y, max_x, max_y) {
620
+ wasm.engine_setGroundBounds(this.__wbg_ptr, id, min_x, min_y, max_x, max_y);
621
+ }
622
+ /**
623
+ * Creates the texture of sampler `name` (`format`: r8, r8ui, r16ui, r16i, r32ui, r32f, rg16ui, rg32f, rgba8,
624
+ * rgba8ui, rgba16ui, rgba32f; `depth` 0 for 2D, else a 2D array of that many layers; `linear` filtering for the
625
+ * non-integer formats); `data`: its texels as bytes, or undefined for an empty texture
626
+ * @param {number} id
627
+ * @param {string} name
628
+ * @param {string} format
629
+ * @param {number} width
630
+ * @param {number} height
631
+ * @param {number} depth
632
+ * @param {boolean} linear
633
+ * @param {Uint8Array | null} [data]
634
+ */
635
+ setGroundTexture(id, name, format, width, height, depth, linear, data) {
636
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
+ const len0 = WASM_VECTOR_LEN;
638
+ const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
639
+ const len1 = WASM_VECTOR_LEN;
640
+ var ptr2 = isLikeNone(data) ? 0 : passArray8ToWasm0(data, wasm.__wbindgen_malloc);
641
+ var len2 = WASM_VECTOR_LEN;
642
+ const ret = wasm.engine_setGroundTexture(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, width, height, depth, linear, ptr2, len2);
643
+ if (ret[1]) {
644
+ throw takeFromExternrefTable0(ret[0]);
645
+ }
646
+ }
647
+ /**
648
+ * A uniform of a ground layer's code, as numbers
649
+ * @param {number} id
650
+ * @param {string} name
651
+ * @param {Float64Array} values
652
+ */
653
+ setGroundUniform(id, name, values) {
654
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
655
+ const len0 = WASM_VECTOR_LEN;
656
+ const ptr1 = passArrayF64ToWasm0(values, wasm.__wbindgen_malloc);
657
+ const len1 = WASM_VECTOR_LEN;
658
+ const ret = wasm.engine_setGroundUniform(this.__wbg_ptr, id, ptr0, len0, ptr1, len1);
659
+ if (ret[1]) {
660
+ throw takeFromExternrefTable0(ret[0]);
661
+ }
662
+ }
663
+ /**
664
+ * @param {number} id
665
+ * @param {boolean} visible
666
+ */
667
+ setGroundVisible(id, visible) {
668
+ wasm.engine_setGroundVisible(this.__wbg_ptr, id, visible);
669
+ }
670
+ /**
671
+ * How tiles load and show: `true`, immediately (everything visible loads, no fade, the default); `false`,
672
+ * smoothly (levels skipped during flights, off-center tiles waiting while the camera moves, fade-in)
673
+ * @param {boolean} immediate
674
+ */
675
+ setImmediateLoading(immediate) {
676
+ wasm.engine_setImmediateLoading(this.__wbg_ptr, immediate);
677
+ }
678
+ /**
679
+ * Dashes of a line layer, in line widths (`MapLibre`'s `line-dasharray`); 0, 0: solid
680
+ * @param {number} id
681
+ * @param {number} dash
682
+ * @param {number} gap
683
+ */
684
+ setLineDash(id, dash, gap) {
685
+ wasm.engine_setLineDash(this.__wbg_ptr, id, dash, gap);
686
+ }
687
+ /**
688
+ * New lines for a line layer (same arguments as `addLines`, the same features)
689
+ * @param {number} id
690
+ * @param {Float64Array} points
691
+ * @param {Uint32Array} start
692
+ * @param {Uint32Array} feature
693
+ */
694
+ setLines(id, points, start, feature) {
695
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
696
+ const len0 = WASM_VECTOR_LEN;
697
+ const ptr1 = passArray32ToWasm0(start, wasm.__wbindgen_malloc);
698
+ const len1 = WASM_VECTOR_LEN;
699
+ const ptr2 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
700
+ const len2 = WASM_VECTOR_LEN;
701
+ const ret = wasm.engine_setLines(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2);
702
+ if (ret[1]) {
703
+ throw takeFromExternrefTable0(ret[0]);
704
+ }
705
+ }
706
+ /**
707
+ * Highest pitch the camera accepts, degrees (up to 85)
708
+ * @param {number} max
709
+ */
710
+ setMaxPitch(max) {
711
+ wasm.engine_setMaxPitch(this.__wbg_ptr, max);
712
+ }
713
+ /**
714
+ * Costs of a network's edges (see `addNetwork`), when the way it is travelled changes; null: interpolated values
715
+ * @param {number} id
716
+ * @param {Float32Array | null} [costs]
717
+ */
718
+ setNetworkCosts(id, costs) {
719
+ var ptr0 = isLikeNone(costs) ? 0 : passArrayF32ToWasm0(costs, wasm.__wbindgen_malloc);
720
+ var len0 = WASM_VECTOR_LEN;
721
+ wasm.engine_setNetworkCosts(this.__wbg_ptr, id, ptr0, len0);
722
+ }
723
+ /**
724
+ * Colors of the values from 0 to the maximum, 256 RGBA texels (1024 bytes); undefined: green to red
725
+ * @param {number} id
726
+ * @param {Uint8Array | null} [rgba]
727
+ */
728
+ setNetworkRamp(id, rgba) {
729
+ var ptr0 = isLikeNone(rgba) ? 0 : passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
730
+ var len0 = WASM_VECTOR_LEN;
731
+ wasm.engine_setNetworkRamp(this.__wbg_ptr, id, ptr0, len0);
732
+ }
733
+ /**
734
+ * Width factor of each edge (1 without): rail lines wider than streets
735
+ * @param {number} id
736
+ * @param {Float32Array | null} [scales]
737
+ */
738
+ setNetworkScales(id, scales) {
739
+ var ptr0 = isLikeNone(scales) ? 0 : passArrayF32ToWasm0(scales, wasm.__wbindgen_malloc);
740
+ var len0 = WASM_VECTOR_LEN;
741
+ wasm.engine_setNetworkScales(this.__wbg_ptr, id, ptr0, len0);
742
+ }
743
+ /**
744
+ * Style of a network: width (CSS pixels) and halo width as zoom stops (8 numbers each: four zooms, four values),
745
+ * then the maximum, the contour interval, the opacity, the halo opacity, the color of the unreached parts (RGBA
746
+ * 0-1) and the share of the maximum over which the colors fade out: 25 numbers
747
+ * @param {number} id
748
+ * @param {Float32Array} style
749
+ */
750
+ setNetworkStyle(id, style) {
751
+ const ptr0 = passArrayF32ToWasm0(style, wasm.__wbindgen_malloc);
752
+ const len0 = WASM_VECTOR_LEN;
753
+ wasm.engine_setNetworkStyle(this.__wbg_ptr, id, ptr0, len0);
754
+ }
755
+ /**
756
+ * One value per node; negative = unreached
757
+ * @param {number} id
758
+ * @param {Float32Array} values
759
+ */
760
+ setNetworkValues(id, values) {
761
+ const ptr0 = passArrayF32ToWasm0(values, wasm.__wbindgen_malloc);
762
+ const len0 = WASM_VECTOR_LEN;
763
+ wasm.engine_setNetworkValues(this.__wbg_ptr, id, ptr0, len0);
764
+ }
765
+ /**
766
+ * @param {number} id
767
+ * @param {number} opacity
768
+ * @param {number} saturation
769
+ */
770
+ setRasterStyle(id, opacity, saturation) {
771
+ wasm.engine_setRasterStyle(this.__wbg_ptr, id, opacity, saturation);
772
+ }
773
+ /**
774
+ * Space behind the globe (stars, atmosphere halo), in the globe projection
775
+ * @param {boolean} enabled
776
+ */
777
+ setSky(enabled) {
778
+ wasm.engine_setSky(this.__wbg_ptr, enabled);
779
+ }
780
+ /**
781
+ * Layer-wide style of a symbol layer: size scale and opacity as zoom stops (four zooms then four values each),
782
+ * zoom range, visibility
783
+ * @param {number} id
784
+ * @param {Float32Array} size
785
+ * @param {Float32Array} opacity
786
+ * @param {number} min_zoom
787
+ * @param {number} max_zoom
788
+ * @param {boolean} visible
789
+ */
790
+ setSymbolLayer(id, size, opacity, min_zoom, max_zoom, visible) {
791
+ const ptr0 = passArrayF32ToWasm0(size, wasm.__wbindgen_malloc);
792
+ const len0 = WASM_VECTOR_LEN;
793
+ const ptr1 = passArrayF32ToWasm0(opacity, wasm.__wbindgen_malloc);
794
+ const len1 = WASM_VECTOR_LEN;
795
+ wasm.engine_setSymbolLayer(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, min_zoom, max_zoom, visible);
796
+ }
797
+ /**
798
+ * Labels of a symbol layer, shaped by the page: anchors (Mercator, interleaved), boxes (min x, min y, max x, max y,
799
+ * CSS pixels from the anchor), styles (20 floats each, see `LABEL_FLOATS`) and glyph quads (10 floats each: label, x, y, width, height from the anchor, atlas u0, v0, u1, v1 in
800
+ * texels, font scale)
801
+ * @param {number} id
802
+ * @param {Float64Array} anchors
803
+ * @param {Float32Array} boxes
804
+ * @param {Float32Array} styles
805
+ * @param {Float32Array} quads
806
+ */
807
+ setSymbols(id, anchors, boxes, styles, quads) {
808
+ const ptr0 = passArrayF64ToWasm0(anchors, wasm.__wbindgen_malloc);
809
+ const len0 = WASM_VECTOR_LEN;
810
+ const ptr1 = passArrayF32ToWasm0(boxes, wasm.__wbindgen_malloc);
811
+ const len1 = WASM_VECTOR_LEN;
812
+ const ptr2 = passArrayF32ToWasm0(styles, wasm.__wbindgen_malloc);
813
+ const len2 = WASM_VECTOR_LEN;
814
+ const ptr3 = passArrayF32ToWasm0(quads, wasm.__wbindgen_malloc);
815
+ const len3 = WASM_VECTOR_LEN;
816
+ const ret = wasm.engine_setSymbols(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
817
+ if (ret[1]) {
818
+ throw takeFromExternrefTable0(ret[0]);
819
+ }
820
+ }
821
+ /**
822
+ * Relief under the raster layers, from raw altitudes (`image/x-bil;bits=32`, 256 × 256, or the same followed by
823
+ * the validity mask of an `ArcGIS` raw grid): `url` is a template with `{bbox}` (WMS `GetMap` in EPSG:3857, or in
824
+ * the Mercator metres of another body) or `{z}/{x}/{y}`; `undefined` turns it off. `exaggeration` scales the
825
+ * heights (1: true relief); `max_z`: finest level loaded (up to 15, from 6 on the Earth, coarser on bodies of a
826
+ * larger relief for their size: `terrain_levels`); `geoid`: altitudes raised by the RAF20 geoid height (heights
827
+ * above the ellipsoid, those of 3D Tiles), else left as served (NGF-IGN69 over France); `loader`: gives the
828
+ * altitudes of each tile instead of fetching `url` (an encoding decoded by the page: Terrarium, Terrain-RGB)
829
+ * @param {string | null | undefined} url
830
+ * @param {number} exaggeration
831
+ * @param {number | null | undefined} max_z
832
+ * @param {boolean | null | undefined} geoid
833
+ * @param {((z: number, x: number, y: number, signal: AbortSignal) => Promise<Float32Array | null>) | undefined} loader
834
+ */
835
+ setTerrain(url, exaggeration, max_z, geoid, loader) {
836
+ var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
837
+ var len0 = WASM_VECTOR_LEN;
838
+ const ret = wasm.engine_setTerrain(this.__wbg_ptr, ptr0, len0, exaggeration, isLikeNone(max_z) ? 0xFFFFFF : max_z, isLikeNone(geoid) ? 0xFFFFFF : geoid ? 1 : 0, isLikeNone(loader) ? 0 : addToExternrefTable0(loader));
839
+ if (ret[1]) {
840
+ throw takeFromExternrefTable0(ret[0]);
841
+ }
842
+ }
843
+ /**
844
+ * Pool of workers that fetch and decode 3D Tiles content off the main thread: an object with
845
+ * `load(id, url, transform, yUp, reload, priority) → Promise<{ anchor, primitives }>` and `abort(id)`. Without
846
+ * it, tiles are decoded on the main thread. Set it before adding 3D Tiles layers.
847
+ * @param {TileLoaderLike | null} loader
848
+ */
849
+ setTileLoader(loader) {
850
+ wasm.engine_setTileLoader(this.__wbg_ptr, loader);
851
+ }
852
+ /**
853
+ * Screen-space error threshold and opacity of a 3D Tiles layer
854
+ * @param {number} id
855
+ * @param {number} max_error
856
+ * @param {number} opacity
857
+ */
858
+ setTiles3dStyle(id, max_error, opacity) {
859
+ wasm.engine_setTiles3dStyle(this.__wbg_ptr, id, max_error, opacity);
860
+ }
861
+ /**
862
+ * @param {number} min
863
+ * @param {number} max
864
+ */
865
+ setZoomRange(min, max) {
866
+ wasm.engine_setZoomRange(this.__wbg_ptr, min, max);
867
+ }
868
+ /**
869
+ * Tile counters of the raster layers, for diagnostics
870
+ * @returns {RasterLayerStats[]}
871
+ */
872
+ stats() {
873
+ const ret = wasm.engine_stats(this.__wbg_ptr);
874
+ return ret;
875
+ }
876
+ /**
877
+ * Compressed texture formats of the GPU (their WebGL extensions get enabled), for the KTX2 transcoding
878
+ * @returns {TextureFormats}
879
+ */
880
+ textureFormats() {
881
+ const ret = wasm.engine_textureFormats(this.__wbg_ptr);
882
+ return ret;
883
+ }
884
+ /**
885
+ * Counters of a 3D Tiles layer, undefined if there is none with this id
886
+ * @param {number} id
887
+ * @returns {Tiles3dStats | undefined}
888
+ */
889
+ tiles3dStats(id) {
890
+ const ret = wasm.engine_tiles3dStats(this.__wbg_ptr, id);
891
+ return ret;
892
+ }
893
+ /**
894
+ * A region of the first page of the glyph atlas: `width` × `height` bytes at (`x`, `y`)
895
+ * @param {number} x
896
+ * @param {number} y
897
+ * @param {number} width
898
+ * @param {number} height
899
+ * @param {Uint8Array} data
900
+ */
901
+ updateGlyphAtlas(x, y, width, height, data) {
902
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
903
+ const len0 = WASM_VECTOR_LEN;
904
+ wasm.engine_updateGlyphAtlas(this.__wbg_ptr, x, y, width, height, ptr0, len0);
905
+ }
906
+ /**
907
+ * A region of a page of the glyph atlas: `width` × `height` bytes at (`x`, `y`) of the page
908
+ * @param {number} page
909
+ * @param {number} x
910
+ * @param {number} y
911
+ * @param {number} width
912
+ * @param {number} height
913
+ * @param {Uint8Array} data
914
+ */
915
+ updateGlyphPage(page, x, y, width, height, data) {
916
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
917
+ const len0 = WASM_VECTOR_LEN;
918
+ wasm.engine_updateGlyphPage(this.__wbg_ptr, page, x, y, width, height, ptr0, len0);
919
+ }
920
+ /**
921
+ * Replaces a region of a ground layer's texture (one layer of a 2D array)
922
+ * @param {number} id
923
+ * @param {string} name
924
+ * @param {number} x
925
+ * @param {number} y
926
+ * @param {number} layer
927
+ * @param {number} width
928
+ * @param {number} height
929
+ * @param {Uint8Array} data
930
+ */
931
+ updateGroundTexture(id, name, x, y, layer, width, height, data) {
932
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
933
+ const len0 = WASM_VECTOR_LEN;
934
+ const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
935
+ const len1 = WASM_VECTOR_LEN;
936
+ const ret = wasm.engine_updateGroundTexture(this.__wbg_ptr, id, ptr0, len0, x, y, layer, width, height, ptr1, len1);
937
+ if (ret[1]) {
938
+ throw takeFromExternrefTable0(ret[0]);
939
+ }
940
+ }
941
+ /**
942
+ * @param {number} delta
943
+ * @param {number} x
944
+ * @param {number} y
945
+ */
946
+ zoomAt(delta, x, y) {
947
+ wasm.engine_zoomAt(this.__wbg_ptr, delta, x, y);
948
+ }
949
+ }
950
+ if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
951
+
952
+ /**
953
+ * Decodes a `.b3dm` / `.glb` tile: `{ anchor: Float64Array(3), primitives: [{ vertices: Float32Array (x, y, z, u,
954
+ * v per vertex, relative to the anchor), indices: Uint32Array, image?: Uint8Array, mime?: string }] }`.
955
+ * `transform`: the tile's world transform (16 numbers, column-major).
956
+ * `draco`: the decoded geometries of its Draco primitives (`dracoRequests`), if any.
957
+ * @param {Uint8Array} bytes
958
+ * @param {Float64Array} transform
959
+ * @param {boolean} y_up
960
+ * @param {DracoGeometry[] | undefined} draco
961
+ * @returns {EncodedTile}
962
+ */
963
+ export function decodeTile(bytes, transform, y_up, draco) {
964
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
965
+ const len0 = WASM_VECTOR_LEN;
966
+ const ptr1 = passArrayF64ToWasm0(transform, wasm.__wbindgen_malloc);
967
+ const len1 = WASM_VECTOR_LEN;
968
+ const ret = wasm.decodeTile(ptr0, len0, ptr1, len1, y_up, draco);
969
+ if (ret[2]) {
970
+ throw takeFromExternrefTable0(ret[1]);
971
+ }
972
+ return takeFromExternrefTable0(ret[0]);
973
+ }
974
+
975
+ /**
976
+ * The Draco-compressed primitives of a tile, to decode before `decodeTile`
977
+ * @param {Uint8Array} bytes
978
+ * @returns {DracoRequest[]}
979
+ */
980
+ export function dracoRequests(bytes) {
981
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
982
+ const len0 = WASM_VECTOR_LEN;
983
+ const ret = wasm.dracoRequests(ptr0, len0);
984
+ if (ret[2]) {
985
+ throw takeFromExternrefTable0(ret[1]);
986
+ }
987
+ return takeFromExternrefTable0(ret[0]);
988
+ }
989
+ function __wbg_get_imports() {
990
+ const import0 = {
991
+ __proto__: null,
992
+ __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
993
+ const v = arg0;
994
+ const ret = typeof(v) === 'boolean' ? v : undefined;
995
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
996
+ },
997
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
998
+ const ret = debugString(arg1);
999
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1000
+ const len1 = WASM_VECTOR_LEN;
1001
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1002
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1003
+ },
1004
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
1005
+ const ret = typeof(arg0) === 'function';
1006
+ return ret;
1007
+ },
1008
+ __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
1009
+ const ret = arg0 === null;
1010
+ return ret;
1011
+ },
1012
+ __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
1013
+ const val = arg0;
1014
+ const ret = typeof(val) === 'object' && val !== null;
1015
+ return ret;
1016
+ },
1017
+ __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
1018
+ const ret = arg0 === undefined;
1019
+ return ret;
1020
+ },
1021
+ __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
1022
+ const obj = arg1;
1023
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1024
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1025
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1026
+ },
1027
+ __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
1028
+ const obj = arg1;
1029
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1030
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1031
+ var len1 = WASM_VECTOR_LEN;
1032
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1033
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1034
+ },
1035
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
1036
+ throw new Error(getStringFromWasm0(arg0, arg1));
1037
+ },
1038
+ __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
1039
+ arg0._wbg_cb_unref();
1040
+ },
1041
+ __wbg_abort_f78b99d80248bacb: function(arg0) {
1042
+ arg0.abort();
1043
+ },
1044
+ __wbg_aborted_5b2b5f06b5e59fde: function(arg0) {
1045
+ const ret = arg0.aborted;
1046
+ return ret;
1047
+ },
1048
+ __wbg_activeTexture_11079673eac5c921: function(arg0, arg1) {
1049
+ arg0.activeTexture(arg1 >>> 0);
1050
+ },
1051
+ __wbg_activeTexture_2fad46c01cafe6b1: function(arg0, arg1) {
1052
+ arg0.activeTexture(arg1 >>> 0);
1053
+ },
1054
+ __wbg_apply_a910804df6e1e433: function() { return handleError(function (arg0, arg1, arg2) {
1055
+ const ret = arg0.apply(arg1, arg2);
1056
+ return ret;
1057
+ }, arguments); },
1058
+ __wbg_arrayBuffer_f07be74819944ea2: function() { return handleError(function (arg0) {
1059
+ const ret = arg0.arrayBuffer();
1060
+ return ret;
1061
+ }, arguments); },
1062
+ __wbg_attachShader_8920a5beea54aba7: function(arg0, arg1, arg2) {
1063
+ arg0.attachShader(arg1, arg2);
1064
+ },
1065
+ __wbg_attachShader_9567ae57af6746d5: function(arg0, arg1, arg2) {
1066
+ arg0.attachShader(arg1, arg2);
1067
+ },
1068
+ __wbg_bindBuffer_0324f62b876c4403: function(arg0, arg1, arg2) {
1069
+ arg0.bindBuffer(arg1 >>> 0, arg2);
1070
+ },
1071
+ __wbg_bindBuffer_2195e89b585ce0c3: function(arg0, arg1, arg2) {
1072
+ arg0.bindBuffer(arg1 >>> 0, arg2);
1073
+ },
1074
+ __wbg_bindFramebuffer_22e4b8e6e6d8d0e8: function(arg0, arg1, arg2) {
1075
+ arg0.bindFramebuffer(arg1 >>> 0, arg2);
1076
+ },
1077
+ __wbg_bindFramebuffer_378eb18ef219d37a: function(arg0, arg1, arg2) {
1078
+ arg0.bindFramebuffer(arg1 >>> 0, arg2);
1079
+ },
1080
+ __wbg_bindRenderbuffer_db090531fb28de34: function(arg0, arg1, arg2) {
1081
+ arg0.bindRenderbuffer(arg1 >>> 0, arg2);
1082
+ },
1083
+ __wbg_bindRenderbuffer_e0c5aeef245a913a: function(arg0, arg1, arg2) {
1084
+ arg0.bindRenderbuffer(arg1 >>> 0, arg2);
1085
+ },
1086
+ __wbg_bindTexture_3cf008f256f3ed99: function(arg0, arg1, arg2) {
1087
+ arg0.bindTexture(arg1 >>> 0, arg2);
1088
+ },
1089
+ __wbg_bindTexture_613a47b8917a0ccd: function(arg0, arg1, arg2) {
1090
+ arg0.bindTexture(arg1 >>> 0, arg2);
1091
+ },
1092
+ __wbg_bindVertexArrayOES_3141815cb8234a6e: function(arg0, arg1) {
1093
+ arg0.bindVertexArrayOES(arg1);
1094
+ },
1095
+ __wbg_bindVertexArray_f58af0a346185ec5: function(arg0, arg1) {
1096
+ arg0.bindVertexArray(arg1);
1097
+ },
1098
+ __wbg_blendFuncSeparate_28abe082febb1a26: function(arg0, arg1, arg2, arg3, arg4) {
1099
+ arg0.blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
1100
+ },
1101
+ __wbg_blendFuncSeparate_2af9d47f7efc0452: function(arg0, arg1, arg2, arg3, arg4) {
1102
+ arg0.blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
1103
+ },
1104
+ __wbg_blendFunc_491ee1105079ce76: function(arg0, arg1, arg2) {
1105
+ arg0.blendFunc(arg1 >>> 0, arg2 >>> 0);
1106
+ },
1107
+ __wbg_blendFunc_589e4252bb396484: function(arg0, arg1, arg2) {
1108
+ arg0.blendFunc(arg1 >>> 0, arg2 >>> 0);
1109
+ },
1110
+ __wbg_blob_232135c7e297b861: function() { return handleError(function (arg0) {
1111
+ const ret = arg0.blob();
1112
+ return ret;
1113
+ }, arguments); },
1114
+ __wbg_bufferData_50f5eb06469330e4: function(arg0, arg1, arg2, arg3) {
1115
+ arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1116
+ },
1117
+ __wbg_bufferData_53e0f7a06b58fe81: function(arg0, arg1, arg2, arg3) {
1118
+ arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1119
+ },
1120
+ __wbg_bufferData_5fa44d94fe7a3878: function(arg0, arg1, arg2, arg3) {
1121
+ arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1122
+ },
1123
+ __wbg_bufferData_bad7ce562b6a9eac: function(arg0, arg1, arg2, arg3) {
1124
+ arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1125
+ },
1126
+ __wbg_byteLength_141bda7c7c28aa72: function(arg0) {
1127
+ const ret = arg0.byteLength;
1128
+ return ret;
1129
+ },
1130
+ __wbg_byteLength_18a1704c0bf397bb: function(arg0) {
1131
+ const ret = arg0.byteLength;
1132
+ return ret;
1133
+ },
1134
+ __wbg_byteLength_27689b065d089962: function(arg0) {
1135
+ const ret = arg0.byteLength;
1136
+ return ret;
1137
+ },
1138
+ __wbg_byteLength_9f985b8373f1f3fe: function(arg0) {
1139
+ const ret = arg0.byteLength;
1140
+ return ret;
1141
+ },
1142
+ __wbg_call_01721c8c75200a10: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1143
+ const ret = arg0.call(arg1, arg2, arg3, arg4, arg5);
1144
+ return ret;
1145
+ }, arguments); },
1146
+ __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
1147
+ const ret = arg0.call(arg1, arg2);
1148
+ return ret;
1149
+ }, arguments); },
1150
+ __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
1151
+ const ret = arg0.call(arg1);
1152
+ return ret;
1153
+ }, arguments); },
1154
+ __wbg_clearColor_3f6aa096dc12e8b7: function(arg0, arg1, arg2, arg3, arg4) {
1155
+ arg0.clearColor(arg1, arg2, arg3, arg4);
1156
+ },
1157
+ __wbg_clearColor_796427e8ac60fe14: function(arg0, arg1, arg2, arg3, arg4) {
1158
+ arg0.clearColor(arg1, arg2, arg3, arg4);
1159
+ },
1160
+ __wbg_clearStencil_1b8b8c727f598eec: function(arg0, arg1) {
1161
+ arg0.clearStencil(arg1);
1162
+ },
1163
+ __wbg_clearStencil_e4383e4a543e7997: function(arg0, arg1) {
1164
+ arg0.clearStencil(arg1);
1165
+ },
1166
+ __wbg_clear_175cf3cb6d98d72b: function(arg0, arg1) {
1167
+ arg0.clear(arg1 >>> 0);
1168
+ },
1169
+ __wbg_clear_cb96796cc568b7c8: function(arg0, arg1) {
1170
+ arg0.clear(arg1 >>> 0);
1171
+ },
1172
+ __wbg_close_355afba6ea5ad1ae: function(arg0) {
1173
+ arg0.close();
1174
+ },
1175
+ __wbg_colorMask_4d6afbbbc3022fbe: function(arg0, arg1, arg2, arg3, arg4) {
1176
+ arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0);
1177
+ },
1178
+ __wbg_colorMask_8c903995f6f873be: function(arg0, arg1, arg2, arg3, arg4) {
1179
+ arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0);
1180
+ },
1181
+ __wbg_compileShader_073a75409aaf96d2: function(arg0, arg1) {
1182
+ arg0.compileShader(arg1);
1183
+ },
1184
+ __wbg_compileShader_c2b53ff3a8851f60: function(arg0, arg1) {
1185
+ arg0.compileShader(arg1);
1186
+ },
1187
+ __wbg_compressedTexImage2D_93d2b30687f2cfad: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
1188
+ arg0.compressedTexImage2D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5, arg6, arg7);
1189
+ },
1190
+ __wbg_createBuffer_d1dd23bf8704564c: function(arg0) {
1191
+ const ret = arg0.createBuffer();
1192
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1193
+ },
1194
+ __wbg_createBuffer_ffe613371d42cfd3: function(arg0) {
1195
+ const ret = arg0.createBuffer();
1196
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1197
+ },
1198
+ __wbg_createFramebuffer_2c6b5b0f49c88e5d: function(arg0) {
1199
+ const ret = arg0.createFramebuffer();
1200
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1201
+ },
1202
+ __wbg_createFramebuffer_d0969af4e9886297: function(arg0) {
1203
+ const ret = arg0.createFramebuffer();
1204
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1205
+ },
1206
+ __wbg_createImageBitmap_69996a36c51d409f: function() { return handleError(function (arg0, arg1, arg2) {
1207
+ const ret = arg0.createImageBitmap(arg1, arg2);
1208
+ return ret;
1209
+ }, arguments); },
1210
+ __wbg_createProgram_cbf448e6f18a9402: function(arg0) {
1211
+ const ret = arg0.createProgram();
1212
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1213
+ },
1214
+ __wbg_createProgram_e0c81b0d2b8d0fd0: function(arg0) {
1215
+ const ret = arg0.createProgram();
1216
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1217
+ },
1218
+ __wbg_createRenderbuffer_2b17e9fe2e6fb4be: function(arg0) {
1219
+ const ret = arg0.createRenderbuffer();
1220
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1221
+ },
1222
+ __wbg_createRenderbuffer_c864095d6ebd60d0: function(arg0) {
1223
+ const ret = arg0.createRenderbuffer();
1224
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1225
+ },
1226
+ __wbg_createShader_6c1a2295587878a5: function(arg0, arg1) {
1227
+ const ret = arg0.createShader(arg1 >>> 0);
1228
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1229
+ },
1230
+ __wbg_createShader_7c9d99a21ecb08c0: function(arg0, arg1) {
1231
+ const ret = arg0.createShader(arg1 >>> 0);
1232
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1233
+ },
1234
+ __wbg_createTexture_01e8e591b64237de: function(arg0) {
1235
+ const ret = arg0.createTexture();
1236
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1237
+ },
1238
+ __wbg_createTexture_5f2583508ebe379b: function(arg0) {
1239
+ const ret = arg0.createTexture();
1240
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1241
+ },
1242
+ __wbg_createVertexArrayOES_a8dc8498b56df937: function(arg0) {
1243
+ const ret = arg0.createVertexArrayOES();
1244
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1245
+ },
1246
+ __wbg_createVertexArray_b223ea69dd08fcab: function(arg0) {
1247
+ const ret = arg0.createVertexArray();
1248
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1249
+ },
1250
+ __wbg_deleteBuffer_070e58aaaf2a7a8b: function(arg0, arg1) {
1251
+ arg0.deleteBuffer(arg1);
1252
+ },
1253
+ __wbg_deleteBuffer_7775ee9e248c8468: function(arg0, arg1) {
1254
+ arg0.deleteBuffer(arg1);
1255
+ },
1256
+ __wbg_deleteFramebuffer_3f8ab330098bf8e6: function(arg0, arg1) {
1257
+ arg0.deleteFramebuffer(arg1);
1258
+ },
1259
+ __wbg_deleteFramebuffer_570d3b214a509fa2: function(arg0, arg1) {
1260
+ arg0.deleteFramebuffer(arg1);
1261
+ },
1262
+ __wbg_deleteProgram_822906f0368175d0: function(arg0, arg1) {
1263
+ arg0.deleteProgram(arg1);
1264
+ },
1265
+ __wbg_deleteProgram_b524b30ad176cdb4: function(arg0, arg1) {
1266
+ arg0.deleteProgram(arg1);
1267
+ },
1268
+ __wbg_deleteRenderbuffer_826c9b43b7ea68f5: function(arg0, arg1) {
1269
+ arg0.deleteRenderbuffer(arg1);
1270
+ },
1271
+ __wbg_deleteRenderbuffer_f4e121a3ab21c605: function(arg0, arg1) {
1272
+ arg0.deleteRenderbuffer(arg1);
1273
+ },
1274
+ __wbg_deleteShader_a70f6cc1918d67eb: function(arg0, arg1) {
1275
+ arg0.deleteShader(arg1);
1276
+ },
1277
+ __wbg_deleteShader_da18a294158c2d15: function(arg0, arg1) {
1278
+ arg0.deleteShader(arg1);
1279
+ },
1280
+ __wbg_deleteSync_4f0be28b03f50495: function(arg0, arg1) {
1281
+ arg0.deleteSync(arg1);
1282
+ },
1283
+ __wbg_deleteTexture_78c170241204a466: function(arg0, arg1) {
1284
+ arg0.deleteTexture(arg1);
1285
+ },
1286
+ __wbg_deleteTexture_9f42750adb092e4f: function(arg0, arg1) {
1287
+ arg0.deleteTexture(arg1);
1288
+ },
1289
+ __wbg_deleteVertexArrayOES_e01f31634d466176: function(arg0, arg1) {
1290
+ arg0.deleteVertexArrayOES(arg1);
1291
+ },
1292
+ __wbg_deleteVertexArray_ca9768805d051d49: function(arg0, arg1) {
1293
+ arg0.deleteVertexArray(arg1);
1294
+ },
1295
+ __wbg_depthFunc_92e96d8f46a23300: function(arg0, arg1) {
1296
+ arg0.depthFunc(arg1 >>> 0);
1297
+ },
1298
+ __wbg_depthFunc_a41fb5adacb22e09: function(arg0, arg1) {
1299
+ arg0.depthFunc(arg1 >>> 0);
1300
+ },
1301
+ __wbg_depthMask_06ecff4d4514c38f: function(arg0, arg1) {
1302
+ arg0.depthMask(arg1 !== 0);
1303
+ },
1304
+ __wbg_depthMask_0d7c3dec3b8405ee: function(arg0, arg1) {
1305
+ arg0.depthMask(arg1 !== 0);
1306
+ },
1307
+ __wbg_detachShader_1ed15fc2d289cf15: function(arg0, arg1, arg2) {
1308
+ arg0.detachShader(arg1, arg2);
1309
+ },
1310
+ __wbg_detachShader_67dabaaad80a795e: function(arg0, arg1, arg2) {
1311
+ arg0.detachShader(arg1, arg2);
1312
+ },
1313
+ __wbg_disable_19fe787eccdf0272: function(arg0, arg1) {
1314
+ arg0.disable(arg1 >>> 0);
1315
+ },
1316
+ __wbg_disable_81b2cb5f8cea15ae: function(arg0, arg1) {
1317
+ arg0.disable(arg1 >>> 0);
1318
+ },
1319
+ __wbg_drawArraysInstancedANGLE_b76512b5abba6668: function(arg0, arg1, arg2, arg3, arg4) {
1320
+ arg0.drawArraysInstancedANGLE(arg1 >>> 0, arg2, arg3, arg4);
1321
+ },
1322
+ __wbg_drawArraysInstanced_9b44aa78a087154d: function(arg0, arg1, arg2, arg3, arg4) {
1323
+ arg0.drawArraysInstanced(arg1 >>> 0, arg2, arg3, arg4);
1324
+ },
1325
+ __wbg_drawArrays_08872e02fb57b847: function(arg0, arg1, arg2, arg3) {
1326
+ arg0.drawArrays(arg1 >>> 0, arg2, arg3);
1327
+ },
1328
+ __wbg_drawArrays_741af5c3f8db636f: function(arg0, arg1, arg2, arg3) {
1329
+ arg0.drawArrays(arg1 >>> 0, arg2, arg3);
1330
+ },
1331
+ __wbg_drawElementsInstancedANGLE_c3fc0cfa9e29a1bc: function(arg0, arg1, arg2, arg3, arg4, arg5) {
1332
+ arg0.drawElementsInstancedANGLE(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
1333
+ },
1334
+ __wbg_drawElementsInstanced_d7c396aa034159b6: function(arg0, arg1, arg2, arg3, arg4, arg5) {
1335
+ arg0.drawElementsInstanced(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
1336
+ },
1337
+ __wbg_drawElements_c8988ba71de1101a: function(arg0, arg1, arg2, arg3, arg4) {
1338
+ arg0.drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4);
1339
+ },
1340
+ __wbg_drawElements_cc1e6c631e89eddf: function(arg0, arg1, arg2, arg3, arg4) {
1341
+ arg0.drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4);
1342
+ },
1343
+ __wbg_enableVertexAttribArray_1496b78a8dbab9fd: function(arg0, arg1) {
1344
+ arg0.enableVertexAttribArray(arg1 >>> 0);
1345
+ },
1346
+ __wbg_enableVertexAttribArray_d52693866bc8b8dd: function(arg0, arg1) {
1347
+ arg0.enableVertexAttribArray(arg1 >>> 0);
1348
+ },
1349
+ __wbg_enable_6eeb9c0e9b483cee: function(arg0, arg1) {
1350
+ arg0.enable(arg1 >>> 0);
1351
+ },
1352
+ __wbg_enable_cb4fc19b51148c37: function(arg0, arg1) {
1353
+ arg0.enable(arg1 >>> 0);
1354
+ },
1355
+ __wbg_error_c9cf3fc2064683a9: function(arg0) {
1356
+ console.error(arg0);
1357
+ },
1358
+ __wbg_fenceSync_330293024adb66bc: function(arg0, arg1, arg2) {
1359
+ const ret = arg0.fenceSync(arg1 >>> 0, arg2 >>> 0);
1360
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1361
+ },
1362
+ __wbg_fetch_b322877f1ed6457d: function(arg0, arg1, arg2, arg3) {
1363
+ const ret = arg0.fetch(getStringFromWasm0(arg1, arg2), arg3);
1364
+ return ret;
1365
+ },
1366
+ __wbg_flush_13b162660ad850d2: function(arg0) {
1367
+ arg0.flush();
1368
+ },
1369
+ __wbg_flush_a5ad38200881ac35: function(arg0) {
1370
+ arg0.flush();
1371
+ },
1372
+ __wbg_framebufferRenderbuffer_1c6337e0030411f3: function(arg0, arg1, arg2, arg3, arg4) {
1373
+ arg0.framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4);
1374
+ },
1375
+ __wbg_framebufferRenderbuffer_f019e9231b142c0d: function(arg0, arg1, arg2, arg3, arg4) {
1376
+ arg0.framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4);
1377
+ },
1378
+ __wbg_framebufferTexture2D_73c52f23ec33aa22: function(arg0, arg1, arg2, arg3, arg4, arg5) {
1379
+ arg0.framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5);
1380
+ },
1381
+ __wbg_framebufferTexture2D_caddefa1f767646e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
1382
+ arg0.framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5);
1383
+ },
1384
+ __wbg_from_296ca31f8d0f1c52: function(arg0) {
1385
+ const ret = Array.from(arg0);
1386
+ return ret;
1387
+ },
1388
+ __wbg_frontFace_6751b4b97f997aeb: function(arg0, arg1) {
1389
+ arg0.frontFace(arg1 >>> 0);
1390
+ },
1391
+ __wbg_frontFace_b064adb15b6f3772: function(arg0, arg1) {
1392
+ arg0.frontFace(arg1 >>> 0);
1393
+ },
1394
+ __wbg_generateMipmap_c63604006bfa52d5: function(arg0, arg1) {
1395
+ arg0.generateMipmap(arg1 >>> 0);
1396
+ },
1397
+ __wbg_generateMipmap_cd49f6eec9558721: function(arg0, arg1) {
1398
+ arg0.generateMipmap(arg1 >>> 0);
1399
+ },
1400
+ __wbg_getActiveUniform_239de631a40c387a: function(arg0, arg1, arg2) {
1401
+ const ret = arg0.getActiveUniform(arg1, arg2 >>> 0);
1402
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1403
+ },
1404
+ __wbg_getActiveUniform_f2052b3c57679fe2: function(arg0, arg1, arg2) {
1405
+ const ret = arg0.getActiveUniform(arg1, arg2 >>> 0);
1406
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1407
+ },
1408
+ __wbg_getBufferSubData_dd23246099b166d1: function(arg0, arg1, arg2, arg3) {
1409
+ arg0.getBufferSubData(arg1 >>> 0, arg2, arg3);
1410
+ },
1411
+ __wbg_getContext_051324720aa5b7e8: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1412
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2), arg3);
1413
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1414
+ }, arguments); },
1415
+ __wbg_getExtension_abfda2c5db286b07: function() { return handleError(function (arg0, arg1, arg2) {
1416
+ const ret = arg0.getExtension(getStringFromWasm0(arg1, arg2));
1417
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1418
+ }, arguments); },
1419
+ __wbg_getParameter_974595a6624c6c10: function() { return handleError(function (arg0, arg1) {
1420
+ const ret = arg0.getParameter(arg1 >>> 0);
1421
+ return ret;
1422
+ }, arguments); },
1423
+ __wbg_getProgramInfoLog_208fb1ff31006495: function(arg0, arg1, arg2) {
1424
+ const ret = arg1.getProgramInfoLog(arg2);
1425
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1426
+ var len1 = WASM_VECTOR_LEN;
1427
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1428
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1429
+ },
1430
+ __wbg_getProgramInfoLog_3276b294d6d42fe2: function(arg0, arg1, arg2) {
1431
+ const ret = arg1.getProgramInfoLog(arg2);
1432
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1433
+ var len1 = WASM_VECTOR_LEN;
1434
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1435
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1436
+ },
1437
+ __wbg_getProgramParameter_50bafab01cf88652: function(arg0, arg1, arg2) {
1438
+ const ret = arg0.getProgramParameter(arg1, arg2 >>> 0);
1439
+ return ret;
1440
+ },
1441
+ __wbg_getProgramParameter_fc7124bb9fb7c675: function(arg0, arg1, arg2) {
1442
+ const ret = arg0.getProgramParameter(arg1, arg2 >>> 0);
1443
+ return ret;
1444
+ },
1445
+ __wbg_getShaderInfoLog_7e0cbba353ca95da: function(arg0, arg1, arg2) {
1446
+ const ret = arg1.getShaderInfoLog(arg2);
1447
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1448
+ var len1 = WASM_VECTOR_LEN;
1449
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1450
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1451
+ },
1452
+ __wbg_getShaderInfoLog_bb64c5a52df0b7a3: function(arg0, arg1, arg2) {
1453
+ const ret = arg1.getShaderInfoLog(arg2);
1454
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1455
+ var len1 = WASM_VECTOR_LEN;
1456
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1457
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1458
+ },
1459
+ __wbg_getShaderParameter_745acf10b8e45e31: function(arg0, arg1, arg2) {
1460
+ const ret = arg0.getShaderParameter(arg1, arg2 >>> 0);
1461
+ return ret;
1462
+ },
1463
+ __wbg_getShaderParameter_e55ea9c456df5484: function(arg0, arg1, arg2) {
1464
+ const ret = arg0.getShaderParameter(arg1, arg2 >>> 0);
1465
+ return ret;
1466
+ },
1467
+ __wbg_getSupportedExtensions_1459bad37860c0c3: function(arg0) {
1468
+ const ret = arg0.getSupportedExtensions();
1469
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1470
+ },
1471
+ __wbg_getSyncParameter_bb4be47b67bfa2f8: function(arg0, arg1, arg2) {
1472
+ const ret = arg0.getSyncParameter(arg1, arg2 >>> 0);
1473
+ return ret;
1474
+ },
1475
+ __wbg_getUniformLocation_50ba45dade572703: function(arg0, arg1, arg2, arg3) {
1476
+ const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3));
1477
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1478
+ },
1479
+ __wbg_getUniformLocation_cb4e3e121235f91a: function(arg0, arg1, arg2, arg3) {
1480
+ const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3));
1481
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1482
+ },
1483
+ __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
1484
+ const ret = Reflect.get(arg0, arg1);
1485
+ return ret;
1486
+ }, arguments); },
1487
+ __wbg_get_index_f4750150bb3083b3: function(arg0, arg1) {
1488
+ const ret = arg0[arg1 >>> 0];
1489
+ return ret;
1490
+ },
1491
+ __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
1492
+ const ret = arg0[arg1 >>> 0];
1493
+ return ret;
1494
+ },
1495
+ __wbg_height_9dca4d43c3e4b84b: function(arg0) {
1496
+ const ret = arg0.height;
1497
+ return ret;
1498
+ },
1499
+ __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
1500
+ let result;
1501
+ try {
1502
+ result = arg0 instanceof ArrayBuffer;
1503
+ } catch (_) {
1504
+ result = false;
1505
+ }
1506
+ const ret = result;
1507
+ return ret;
1508
+ },
1509
+ __wbg_instanceof_Blob_7c6191a4cd5834d3: function(arg0) {
1510
+ let result;
1511
+ try {
1512
+ result = arg0 instanceof Blob;
1513
+ } catch (_) {
1514
+ result = false;
1515
+ }
1516
+ const ret = result;
1517
+ return ret;
1518
+ },
1519
+ __wbg_instanceof_Float32Array_595afb0f28b828c9: function(arg0) {
1520
+ let result;
1521
+ try {
1522
+ result = arg0 instanceof Float32Array;
1523
+ } catch (_) {
1524
+ result = false;
1525
+ }
1526
+ const ret = result;
1527
+ return ret;
1528
+ },
1529
+ __wbg_instanceof_Float64Array_8a59377f9eec1b8b: function(arg0) {
1530
+ let result;
1531
+ try {
1532
+ result = arg0 instanceof Float64Array;
1533
+ } catch (_) {
1534
+ result = false;
1535
+ }
1536
+ const ret = result;
1537
+ return ret;
1538
+ },
1539
+ __wbg_instanceof_ImageBitmap_74bea45ee48d3d7a: function(arg0) {
1540
+ let result;
1541
+ try {
1542
+ result = arg0 instanceof ImageBitmap;
1543
+ } catch (_) {
1544
+ result = false;
1545
+ }
1546
+ const ret = result;
1547
+ return ret;
1548
+ },
1549
+ __wbg_instanceof_Promise_e1dc6893aa1ece28: function(arg0) {
1550
+ let result;
1551
+ try {
1552
+ result = arg0 instanceof Promise;
1553
+ } catch (_) {
1554
+ result = false;
1555
+ }
1556
+ const ret = result;
1557
+ return ret;
1558
+ },
1559
+ __wbg_instanceof_Response_b8758567269c30b2: function(arg0) {
1560
+ let result;
1561
+ try {
1562
+ result = arg0 instanceof Response;
1563
+ } catch (_) {
1564
+ result = false;
1565
+ }
1566
+ const ret = result;
1567
+ return ret;
1568
+ },
1569
+ __wbg_instanceof_Uint32Array_53a4facaf04b8a8b: function(arg0) {
1570
+ let result;
1571
+ try {
1572
+ result = arg0 instanceof Uint32Array;
1573
+ } catch (_) {
1574
+ result = false;
1575
+ }
1576
+ const ret = result;
1577
+ return ret;
1578
+ },
1579
+ __wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
1580
+ let result;
1581
+ try {
1582
+ result = arg0 instanceof Uint8Array;
1583
+ } catch (_) {
1584
+ result = false;
1585
+ }
1586
+ const ret = result;
1587
+ return ret;
1588
+ },
1589
+ __wbg_instanceof_WebGl2RenderingContext_64c994c14c0790fb: function(arg0) {
1590
+ let result;
1591
+ try {
1592
+ result = arg0 instanceof WebGL2RenderingContext;
1593
+ } catch (_) {
1594
+ result = false;
1595
+ }
1596
+ const ret = result;
1597
+ return ret;
1598
+ },
1599
+ __wbg_instanceof_Window_82d71df4eddf88bc: function(arg0) {
1600
+ let result;
1601
+ try {
1602
+ result = arg0 instanceof Window;
1603
+ } catch (_) {
1604
+ result = false;
1605
+ }
1606
+ const ret = result;
1607
+ return ret;
1608
+ },
1609
+ __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
1610
+ const ret = Array.isArray(arg0);
1611
+ return ret;
1612
+ },
1613
+ __wbg_isContextLost_fbbab8b921e614b7: function(arg0) {
1614
+ const ret = arg0.isContextLost();
1615
+ return ret;
1616
+ },
1617
+ __wbg_is_4b278c0bd3caba97: function(arg0, arg1) {
1618
+ const ret = Object.is(arg0, arg1);
1619
+ return ret;
1620
+ },
1621
+ __wbg_length_511b1f84719d3462: function(arg0) {
1622
+ const ret = arg0.length;
1623
+ return ret;
1624
+ },
1625
+ __wbg_length_58572db4c38f3c3e: function(arg0) {
1626
+ const ret = arg0.length;
1627
+ return ret;
1628
+ },
1629
+ __wbg_length_7f3c00c40364105e: function(arg0) {
1630
+ const ret = arg0.length;
1631
+ return ret;
1632
+ },
1633
+ __wbg_length_b5f0008bbf60cf59: function(arg0) {
1634
+ const ret = arg0.length;
1635
+ return ret;
1636
+ },
1637
+ __wbg_length_d4bdea10311bd9cf: function(arg0) {
1638
+ const ret = arg0.length;
1639
+ return ret;
1640
+ },
1641
+ __wbg_linkProgram_571a9ea00d38ff83: function(arg0, arg1) {
1642
+ arg0.linkProgram(arg1);
1643
+ },
1644
+ __wbg_linkProgram_acdc299c43d734a0: function(arg0, arg1) {
1645
+ arg0.linkProgram(arg1);
1646
+ },
1647
+ __wbg_name_91a697e9ff1634bf: function(arg0, arg1) {
1648
+ const ret = arg1.name;
1649
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1650
+ const len1 = WASM_VECTOR_LEN;
1651
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1652
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1653
+ },
1654
+ __wbg_new_1dbf7428bba60a42: function(arg0) {
1655
+ const ret = new Uint8Array(arg0);
1656
+ return ret;
1657
+ },
1658
+ __wbg_new_2e41357094e99294: function() { return handleError(function () {
1659
+ const ret = new AbortController();
1660
+ return ret;
1661
+ }, arguments); },
1662
+ __wbg_new_5502aad30c185fc8: function(arg0, arg1) {
1663
+ try {
1664
+ var state0 = {a: arg0, b: arg1};
1665
+ var cb0 = (arg0, arg1) => {
1666
+ const a = state0.a;
1667
+ state0.a = 0;
1668
+ try {
1669
+ return wasm_bindgen_3785b71bf6f54dd0___convert__closures_____invoke___js_sys_9aebc20340329cea___Function_fn_wasm_bindgen_3785b71bf6f54dd0___JsValue_____wasm_bindgen_3785b71bf6f54dd0___sys__Undefined___js_sys_9aebc20340329cea___Function_fn_wasm_bindgen_3785b71bf6f54dd0___JsValue_____wasm_bindgen_3785b71bf6f54dd0___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1670
+ } finally {
1671
+ state0.a = a;
1672
+ }
1673
+ };
1674
+ const ret = new Promise(cb0);
1675
+ return ret;
1676
+ } finally {
1677
+ state0.a = 0;
1678
+ }
1679
+ },
1680
+ __wbg_new_617a8cdb8bb1130e: function() {
1681
+ const ret = new Object();
1682
+ return ret;
1683
+ },
1684
+ __wbg_new_ee2291f50781bf1d: function() {
1685
+ const ret = new Array();
1686
+ return ret;
1687
+ },
1688
+ __wbg_new_from_slice_37a3c3a194266cb8: function(arg0, arg1) {
1689
+ const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
1690
+ return ret;
1691
+ },
1692
+ __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
1693
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1694
+ return ret;
1695
+ },
1696
+ __wbg_new_from_slice_ca6ad97db1f4779a: function(arg0, arg1) {
1697
+ const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
1698
+ return ret;
1699
+ },
1700
+ __wbg_new_from_slice_f545fd22ddc142b8: function(arg0, arg1) {
1701
+ const ret = new Float64Array(getArrayF64FromWasm0(arg0, arg1));
1702
+ return ret;
1703
+ },
1704
+ __wbg_new_with_byte_offset_70ba6193352e027b: function(arg0, arg1) {
1705
+ const ret = new Uint8Array(arg0, arg1 >>> 0);
1706
+ return ret;
1707
+ },
1708
+ __wbg_new_with_byte_offset_and_length_40c170286adc9005: function(arg0, arg1, arg2) {
1709
+ const ret = new Float32Array(arg0, arg1 >>> 0, arg2 >>> 0);
1710
+ return ret;
1711
+ },
1712
+ __wbg_new_with_u8_array_sequence_and_options_fccc08fe93f4b8fd: function() { return handleError(function (arg0, arg1) {
1713
+ const ret = new Blob(arg0, arg1);
1714
+ return ret;
1715
+ }, arguments); },
1716
+ __wbg_now_aa4ccb83129e9e55: function() {
1717
+ const ret = Date.now();
1718
+ return ret;
1719
+ },
1720
+ __wbg_of_20798cb14708764f: function(arg0, arg1) {
1721
+ const ret = Array.of(arg0, arg1);
1722
+ return ret;
1723
+ },
1724
+ __wbg_of_d5dbecdc59e02e34: function(arg0) {
1725
+ const ret = Array.of(arg0);
1726
+ return ret;
1727
+ },
1728
+ __wbg_of_fea2613674ee0d0f: function(arg0, arg1, arg2, arg3, arg4) {
1729
+ const ret = Array.of(arg0, arg1, arg2, arg3, arg4);
1730
+ return ret;
1731
+ },
1732
+ __wbg_ok_125878a7db256ecb: function(arg0) {
1733
+ const ret = arg0.ok;
1734
+ return ret;
1735
+ },
1736
+ __wbg_pixelStorei_af18e636b3e7b725: function(arg0, arg1, arg2) {
1737
+ arg0.pixelStorei(arg1 >>> 0, arg2);
1738
+ },
1739
+ __wbg_pixelStorei_cb4e43466f5b8703: function(arg0, arg1, arg2) {
1740
+ arg0.pixelStorei(arg1 >>> 0, arg2);
1741
+ },
1742
+ __wbg_prototypesetcall_06eb15da165dee8f: function(arg0, arg1, arg2) {
1743
+ Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);
1744
+ },
1745
+ __wbg_prototypesetcall_8b03c01e2c0f8066: function(arg0, arg1, arg2) {
1746
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
1747
+ },
1748
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
1749
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1750
+ },
1751
+ __wbg_push_2baf45db356cf468: function(arg0, arg1) {
1752
+ const ret = arg0.push(arg1);
1753
+ return ret;
1754
+ },
1755
+ __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
1756
+ const ret = arg0.queueMicrotask;
1757
+ return ret;
1758
+ },
1759
+ __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
1760
+ queueMicrotask(arg0);
1761
+ },
1762
+ __wbg_readPixels_31e44e70558ac590: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
1763
+ arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7);
1764
+ }, arguments); },
1765
+ __wbg_readPixels_3321086a7818a739: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
1766
+ arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7);
1767
+ }, arguments); },
1768
+ __wbg_readPixels_eb030cd9976eeca5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
1769
+ arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7);
1770
+ }, arguments); },
1771
+ __wbg_renderbufferStorage_52b131bbf3112b3a: function(arg0, arg1, arg2, arg3, arg4) {
1772
+ arg0.renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4);
1773
+ },
1774
+ __wbg_renderbufferStorage_bca487b0dea425b8: function(arg0, arg1, arg2, arg3, arg4) {
1775
+ arg0.renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4);
1776
+ },
1777
+ __wbg_resolve_0076e10020304ede: function(arg0) {
1778
+ const ret = Promise.resolve(arg0);
1779
+ return ret;
1780
+ },
1781
+ __wbg_scissor_12ddc324094acd50: function(arg0, arg1, arg2, arg3, arg4) {
1782
+ arg0.scissor(arg1, arg2, arg3, arg4);
1783
+ },
1784
+ __wbg_scissor_a9468482697c2bdb: function(arg0, arg1, arg2, arg3, arg4) {
1785
+ arg0.scissor(arg1, arg2, arg3, arg4);
1786
+ },
1787
+ __wbg_setTimeout_db7bbc18a17e152a: function() { return handleError(function (arg0, arg1, arg2) {
1788
+ const ret = arg0.setTimeout(arg1, arg2);
1789
+ return ret;
1790
+ }, arguments); },
1791
+ __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
1792
+ const ret = Reflect.set(arg0, arg1, arg2);
1793
+ return ret;
1794
+ }, arguments); },
1795
+ __wbg_set_alpha_6dea851a46253adf: function(arg0, arg1) {
1796
+ arg0.alpha = arg1 !== 0;
1797
+ },
1798
+ __wbg_set_antialias_1f699e96763e8a35: function(arg0, arg1) {
1799
+ arg0.antialias = arg1 !== 0;
1800
+ },
1801
+ __wbg_set_cache_7507c4cc5938ccc7: function(arg0, arg1) {
1802
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
1803
+ },
1804
+ __wbg_set_color_space_conversion_f27e9d866a683b4b: function(arg0, arg1) {
1805
+ arg0.colorSpaceConversion = __wbindgen_enum_ColorSpaceConversion[arg1];
1806
+ },
1807
+ __wbg_set_depth_8b49de49803d4e60: function(arg0, arg1) {
1808
+ arg0.depth = arg1 !== 0;
1809
+ },
1810
+ __wbg_set_power_preference_6ef22d4c8baf517f: function(arg0, arg1) {
1811
+ arg0.powerPreference = __wbindgen_enum_WebGlPowerPreference[arg1];
1812
+ },
1813
+ __wbg_set_premultiply_alpha_45a4cf9a1e87bfbf: function(arg0, arg1) {
1814
+ arg0.premultiplyAlpha = __wbindgen_enum_PremultiplyAlpha[arg1];
1815
+ },
1816
+ __wbg_set_resize_height_274433c2f249624d: function(arg0, arg1) {
1817
+ arg0.resizeHeight = arg1 >>> 0;
1818
+ },
1819
+ __wbg_set_resize_width_6f06543b29d1ca48: function(arg0, arg1) {
1820
+ arg0.resizeWidth = arg1 >>> 0;
1821
+ },
1822
+ __wbg_set_signal_2dbd377604627f26: function(arg0, arg1) {
1823
+ arg0.signal = arg1;
1824
+ },
1825
+ __wbg_set_stencil_edc32d9477c7c107: function(arg0, arg1) {
1826
+ arg0.stencil = arg1 !== 0;
1827
+ },
1828
+ __wbg_set_type_dcf75b2afa60c694: function(arg0, arg1, arg2) {
1829
+ arg0.type = getStringFromWasm0(arg1, arg2);
1830
+ },
1831
+ __wbg_shaderSource_06379dac249994dd: function(arg0, arg1, arg2, arg3) {
1832
+ arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3));
1833
+ },
1834
+ __wbg_shaderSource_c8812639b47d87b9: function(arg0, arg1, arg2, arg3) {
1835
+ arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3));
1836
+ },
1837
+ __wbg_signal_e5a49a2d9c65b7f6: function(arg0) {
1838
+ const ret = arg0.signal;
1839
+ return ret;
1840
+ },
1841
+ __wbg_size_74c48d7329291685: function(arg0) {
1842
+ const ret = arg0.size;
1843
+ return ret;
1844
+ },
1845
+ __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
1846
+ const ret = typeof global === 'undefined' ? null : global;
1847
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1848
+ },
1849
+ __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
1850
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1851
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1852
+ },
1853
+ __wbg_static_accessor_SELF_0b583911f537483a: function() {
1854
+ const ret = typeof self === 'undefined' ? null : self;
1855
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1856
+ },
1857
+ __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
1858
+ const ret = typeof window === 'undefined' ? null : window;
1859
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1860
+ },
1861
+ __wbg_status_ce0a98d3c57125f3: function(arg0) {
1862
+ const ret = arg0.status;
1863
+ return ret;
1864
+ },
1865
+ __wbg_stencilFunc_aa3cd8856be514c4: function(arg0, arg1, arg2, arg3) {
1866
+ arg0.stencilFunc(arg1 >>> 0, arg2, arg3 >>> 0);
1867
+ },
1868
+ __wbg_stencilFunc_bab7e0b7c443f093: function(arg0, arg1, arg2, arg3) {
1869
+ arg0.stencilFunc(arg1 >>> 0, arg2, arg3 >>> 0);
1870
+ },
1871
+ __wbg_stencilOpSeparate_7d01185cbdb89d99: function(arg0, arg1, arg2, arg3, arg4) {
1872
+ arg0.stencilOpSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
1873
+ },
1874
+ __wbg_stencilOpSeparate_c5af5f5dbd237bea: function(arg0, arg1, arg2, arg3, arg4) {
1875
+ arg0.stencilOpSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
1876
+ },
1877
+ __wbg_stencilOp_12274af665ab8a00: function(arg0, arg1, arg2, arg3) {
1878
+ arg0.stencilOp(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
1879
+ },
1880
+ __wbg_stencilOp_2697194654fee819: function(arg0, arg1, arg2, arg3) {
1881
+ arg0.stencilOp(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
1882
+ },
1883
+ __wbg_texImage2D_1b3349107ad0faae: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1884
+ arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4 >>> 0, arg5 >>> 0, arg6);
1885
+ }, arguments); },
1886
+ __wbg_texImage2D_82bf2b4c8aa9a1db: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1887
+ arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9);
1888
+ }, arguments); },
1889
+ __wbg_texImage2D_8fc2f2fcca249b59: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1890
+ arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4 >>> 0, arg5 >>> 0, arg6);
1891
+ }, arguments); },
1892
+ __wbg_texImage2D_a856af552acdc9d9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1893
+ arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9);
1894
+ }, arguments); },
1895
+ __wbg_texImage2D_ca3d0fe24620ec85: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1896
+ arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9);
1897
+ }, arguments); },
1898
+ __wbg_texParameteri_647fdb1426809cb5: function(arg0, arg1, arg2, arg3) {
1899
+ arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3);
1900
+ },
1901
+ __wbg_texParameteri_7864076abcdb03e0: function(arg0, arg1, arg2, arg3) {
1902
+ arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3);
1903
+ },
1904
+ __wbg_texStorage2D_cf2bd991072d9efb: function(arg0, arg1, arg2, arg3, arg4, arg5) {
1905
+ arg0.texStorage2D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
1906
+ },
1907
+ __wbg_texStorage3D_74b701c2b176380c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1908
+ arg0.texStorage3D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5, arg6);
1909
+ },
1910
+ __wbg_texSubImage2D_31a0c2797aa04f32: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1911
+ arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9);
1912
+ }, arguments); },
1913
+ __wbg_texSubImage2D_5e90c7a719d40256: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1914
+ arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9);
1915
+ }, arguments); },
1916
+ __wbg_texSubImage2D_bb322aae90f7657f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
1917
+ arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9);
1918
+ }, arguments); },
1919
+ __wbg_texSubImage3D_5143d5af7e182ddc: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
1920
+ arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11);
1921
+ }, arguments); },
1922
+ __wbg_texSubImage3D_5d773fc7a8cd4d08: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
1923
+ arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11);
1924
+ }, arguments); },
1925
+ __wbg_texSubImage3D_e0d113b7047a5130: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
1926
+ arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11);
1927
+ }, arguments); },
1928
+ __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
1929
+ const ret = arg0.then(arg1, arg2);
1930
+ return ret;
1931
+ },
1932
+ __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
1933
+ const ret = arg0.then(arg1);
1934
+ return ret;
1935
+ },
1936
+ __wbg_type_ff6f7b321fe8478b: function(arg0) {
1937
+ const ret = arg0.type;
1938
+ return ret;
1939
+ },
1940
+ __wbg_uniform1f_9cfecfaeb8cf43c1: function(arg0, arg1, arg2) {
1941
+ arg0.uniform1f(arg1, arg2);
1942
+ },
1943
+ __wbg_uniform1f_b5856e35a43b65a1: function(arg0, arg1, arg2) {
1944
+ arg0.uniform1f(arg1, arg2);
1945
+ },
1946
+ __wbg_uniform1fv_1bf537fc926ef8b9: function(arg0, arg1, arg2, arg3) {
1947
+ arg0.uniform1fv(arg1, getArrayF32FromWasm0(arg2, arg3));
1948
+ },
1949
+ __wbg_uniform1fv_1cc1d09bc13b03bf: function(arg0, arg1, arg2, arg3) {
1950
+ arg0.uniform1fv(arg1, getArrayF32FromWasm0(arg2, arg3));
1951
+ },
1952
+ __wbg_uniform1i_531b98c4a7177366: function(arg0, arg1, arg2) {
1953
+ arg0.uniform1i(arg1, arg2);
1954
+ },
1955
+ __wbg_uniform1i_fc2dc8cadc49d8ec: function(arg0, arg1, arg2) {
1956
+ arg0.uniform1i(arg1, arg2);
1957
+ },
1958
+ __wbg_uniform1iv_4b8cbceccddfaa62: function(arg0, arg1, arg2, arg3) {
1959
+ arg0.uniform1iv(arg1, getArrayI32FromWasm0(arg2, arg3));
1960
+ },
1961
+ __wbg_uniform1iv_8fc880ae80c77c74: function(arg0, arg1, arg2, arg3) {
1962
+ arg0.uniform1iv(arg1, getArrayI32FromWasm0(arg2, arg3));
1963
+ },
1964
+ __wbg_uniform1ui_353c67ec681b540c: function(arg0, arg1, arg2) {
1965
+ arg0.uniform1ui(arg1, arg2 >>> 0);
1966
+ },
1967
+ __wbg_uniform1uiv_ad5e946730aacbec: function(arg0, arg1, arg2, arg3) {
1968
+ arg0.uniform1uiv(arg1, getArrayU32FromWasm0(arg2, arg3));
1969
+ },
1970
+ __wbg_uniform2f_131da2d4bf17e4b9: function(arg0, arg1, arg2, arg3) {
1971
+ arg0.uniform2f(arg1, arg2, arg3);
1972
+ },
1973
+ __wbg_uniform2f_a92b5bb95dc5b4d9: function(arg0, arg1, arg2, arg3) {
1974
+ arg0.uniform2f(arg1, arg2, arg3);
1975
+ },
1976
+ __wbg_uniform2fv_319c49f0ce340f26: function(arg0, arg1, arg2, arg3) {
1977
+ arg0.uniform2fv(arg1, getArrayF32FromWasm0(arg2, arg3));
1978
+ },
1979
+ __wbg_uniform2fv_a7d3c1830d18c1b2: function(arg0, arg1, arg2, arg3) {
1980
+ arg0.uniform2fv(arg1, getArrayF32FromWasm0(arg2, arg3));
1981
+ },
1982
+ __wbg_uniform2iv_65f36fc9777697d7: function(arg0, arg1, arg2, arg3) {
1983
+ arg0.uniform2iv(arg1, getArrayI32FromWasm0(arg2, arg3));
1984
+ },
1985
+ __wbg_uniform2iv_ca9cb507409b9ad1: function(arg0, arg1, arg2, arg3) {
1986
+ arg0.uniform2iv(arg1, getArrayI32FromWasm0(arg2, arg3));
1987
+ },
1988
+ __wbg_uniform2uiv_c95af5fb653ccb86: function(arg0, arg1, arg2, arg3) {
1989
+ arg0.uniform2uiv(arg1, getArrayU32FromWasm0(arg2, arg3));
1990
+ },
1991
+ __wbg_uniform3f_1211579ff87ccfad: function(arg0, arg1, arg2, arg3, arg4) {
1992
+ arg0.uniform3f(arg1, arg2, arg3, arg4);
1993
+ },
1994
+ __wbg_uniform3f_ee105161897ee48a: function(arg0, arg1, arg2, arg3, arg4) {
1995
+ arg0.uniform3f(arg1, arg2, arg3, arg4);
1996
+ },
1997
+ __wbg_uniform3fv_055ea5ac38af4fce: function(arg0, arg1, arg2, arg3) {
1998
+ arg0.uniform3fv(arg1, getArrayF32FromWasm0(arg2, arg3));
1999
+ },
2000
+ __wbg_uniform3fv_58520ffe22a6e27c: function(arg0, arg1, arg2, arg3) {
2001
+ arg0.uniform3fv(arg1, getArrayF32FromWasm0(arg2, arg3));
2002
+ },
2003
+ __wbg_uniform3iv_0590e8b7eff2a791: function(arg0, arg1, arg2, arg3) {
2004
+ arg0.uniform3iv(arg1, getArrayI32FromWasm0(arg2, arg3));
2005
+ },
2006
+ __wbg_uniform3iv_e91b1410dc299f50: function(arg0, arg1, arg2, arg3) {
2007
+ arg0.uniform3iv(arg1, getArrayI32FromWasm0(arg2, arg3));
2008
+ },
2009
+ __wbg_uniform3uiv_9992491000463a52: function(arg0, arg1, arg2, arg3) {
2010
+ arg0.uniform3uiv(arg1, getArrayU32FromWasm0(arg2, arg3));
2011
+ },
2012
+ __wbg_uniform4f_22bfec882308eec2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
2013
+ arg0.uniform4f(arg1, arg2, arg3, arg4, arg5);
2014
+ },
2015
+ __wbg_uniform4f_8dd8f311e656ca0d: function(arg0, arg1, arg2, arg3, arg4, arg5) {
2016
+ arg0.uniform4f(arg1, arg2, arg3, arg4, arg5);
2017
+ },
2018
+ __wbg_uniform4fv_3ef2f5121fcb78ae: function(arg0, arg1, arg2, arg3) {
2019
+ arg0.uniform4fv(arg1, getArrayF32FromWasm0(arg2, arg3));
2020
+ },
2021
+ __wbg_uniform4fv_cf8ff646c36232c8: function(arg0, arg1, arg2, arg3) {
2022
+ arg0.uniform4fv(arg1, getArrayF32FromWasm0(arg2, arg3));
2023
+ },
2024
+ __wbg_uniform4iv_6fc5436b4f876039: function(arg0, arg1, arg2, arg3) {
2025
+ arg0.uniform4iv(arg1, getArrayI32FromWasm0(arg2, arg3));
2026
+ },
2027
+ __wbg_uniform4iv_99c2b07787d362d6: function(arg0, arg1, arg2, arg3) {
2028
+ arg0.uniform4iv(arg1, getArrayI32FromWasm0(arg2, arg3));
2029
+ },
2030
+ __wbg_uniform4uiv_a6fb3237d9df7ed4: function(arg0, arg1, arg2, arg3) {
2031
+ arg0.uniform4uiv(arg1, getArrayU32FromWasm0(arg2, arg3));
2032
+ },
2033
+ __wbg_uniformMatrix3fv_472e7824735acce1: function(arg0, arg1, arg2, arg3, arg4) {
2034
+ arg0.uniformMatrix3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
2035
+ },
2036
+ __wbg_uniformMatrix3fv_83fdc9c3c0d43204: function(arg0, arg1, arg2, arg3, arg4) {
2037
+ arg0.uniformMatrix3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
2038
+ },
2039
+ __wbg_uniformMatrix4fv_dff9738d995fd0b1: function(arg0, arg1, arg2, arg3, arg4) {
2040
+ arg0.uniformMatrix4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
2041
+ },
2042
+ __wbg_uniformMatrix4fv_e691d7f14d3609f7: function(arg0, arg1, arg2, arg3, arg4) {
2043
+ arg0.uniformMatrix4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
2044
+ },
2045
+ __wbg_useProgram_5bdae58fd9f9826f: function(arg0, arg1) {
2046
+ arg0.useProgram(arg1);
2047
+ },
2048
+ __wbg_useProgram_e075c2902e420761: function(arg0, arg1) {
2049
+ arg0.useProgram(arg1);
2050
+ },
2051
+ __wbg_vertexAttribDivisorANGLE_659fb027198a47c3: function(arg0, arg1, arg2) {
2052
+ arg0.vertexAttribDivisorANGLE(arg1 >>> 0, arg2 >>> 0);
2053
+ },
2054
+ __wbg_vertexAttribDivisor_7575d382215322f7: function(arg0, arg1, arg2) {
2055
+ arg0.vertexAttribDivisor(arg1 >>> 0, arg2 >>> 0);
2056
+ },
2057
+ __wbg_vertexAttribIPointer_fc8057c62cfcc63c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
2058
+ arg0.vertexAttribIPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
2059
+ },
2060
+ __wbg_vertexAttribPointer_24b495e18df325dc: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
2061
+ arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6);
2062
+ },
2063
+ __wbg_vertexAttribPointer_54d56b18f71a946d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
2064
+ arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6);
2065
+ },
2066
+ __wbg_viewport_16936692526e2ce6: function(arg0, arg1, arg2, arg3, arg4) {
2067
+ arg0.viewport(arg1, arg2, arg3, arg4);
2068
+ },
2069
+ __wbg_viewport_e35d16c542d2ce70: function(arg0, arg1, arg2, arg3, arg4) {
2070
+ arg0.viewport(arg1, arg2, arg3, arg4);
2071
+ },
2072
+ __wbg_warn_13abc63e0d4b3527: function(arg0) {
2073
+ console.warn(arg0);
2074
+ },
2075
+ __wbg_width_8a9cc26363f10d5f: function(arg0) {
2076
+ const ret = arg0.width;
2077
+ return ret;
2078
+ },
2079
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
2080
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 145, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2081
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3785b71bf6f54dd0___convert__closures_____invoke___wasm_bindgen_3785b71bf6f54dd0___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_3785b71bf6f54dd0___JsError___true_);
2082
+ return ret;
2083
+ },
2084
+ __wbindgen_generic_0000000000000002: function(arg0) {
2085
+ // Cast intrinsic for `F64 -> Externref`.
2086
+ const ret = arg0;
2087
+ return ret;
2088
+ },
2089
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
2090
+ // Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref("Float32Array")`.
2091
+ const ret = getArrayF32FromWasm0(arg0, arg1);
2092
+ return ret;
2093
+ },
2094
+ __wbindgen_generic_0000000000000004: function(arg0, arg1) {
2095
+ // Cast intrinsic for `Ref(Slice(I16)) -> NamedExternref("Int16Array")`.
2096
+ const ret = getArrayI16FromWasm0(arg0, arg1);
2097
+ return ret;
2098
+ },
2099
+ __wbindgen_generic_0000000000000005: function(arg0, arg1) {
2100
+ // Cast intrinsic for `Ref(Slice(I32)) -> NamedExternref("Int32Array")`.
2101
+ const ret = getArrayI32FromWasm0(arg0, arg1);
2102
+ return ret;
2103
+ },
2104
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
2105
+ // Cast intrinsic for `Ref(Slice(I8)) -> NamedExternref("Int8Array")`.
2106
+ const ret = getArrayI8FromWasm0(arg0, arg1);
2107
+ return ret;
2108
+ },
2109
+ __wbindgen_generic_0000000000000007: function(arg0, arg1) {
2110
+ // Cast intrinsic for `Ref(Slice(U16)) -> NamedExternref("Uint16Array")`.
2111
+ const ret = getArrayU16FromWasm0(arg0, arg1);
2112
+ return ret;
2113
+ },
2114
+ __wbindgen_generic_0000000000000008: function(arg0, arg1) {
2115
+ // Cast intrinsic for `Ref(Slice(U32)) -> NamedExternref("Uint32Array")`.
2116
+ const ret = getArrayU32FromWasm0(arg0, arg1);
2117
+ return ret;
2118
+ },
2119
+ __wbindgen_generic_0000000000000009: function(arg0, arg1) {
2120
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
2121
+ const ret = getArrayU8FromWasm0(arg0, arg1);
2122
+ return ret;
2123
+ },
2124
+ __wbindgen_generic_000000000000000a: function(arg0, arg1) {
2125
+ // Cast intrinsic for `Ref(String) -> Externref`.
2126
+ const ret = getStringFromWasm0(arg0, arg1);
2127
+ return ret;
2128
+ },
2129
+ __wbindgen_init_externref_table: function() {
2130
+ const table = wasm.__wbindgen_externrefs;
2131
+ const offset = table.grow(4);
2132
+ table.set(0, undefined);
2133
+ table.set(offset + 0, undefined);
2134
+ table.set(offset + 1, null);
2135
+ table.set(offset + 2, true);
2136
+ table.set(offset + 3, false);
2137
+ },
2138
+ };
2139
+ return {
2140
+ __proto__: null,
2141
+ "./isard_bg.js": import0,
2142
+ };
2143
+ }
2144
+
2145
+ function wasm_bindgen_3785b71bf6f54dd0___convert__closures_____invoke___wasm_bindgen_3785b71bf6f54dd0___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_3785b71bf6f54dd0___JsError___true_(arg0, arg1, arg2) {
2146
+ const ret = wasm.wasm_bindgen_3785b71bf6f54dd0___convert__closures_____invoke___wasm_bindgen_3785b71bf6f54dd0___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_3785b71bf6f54dd0___JsError___true_(arg0, arg1, arg2);
2147
+ if (ret[1]) {
2148
+ throw takeFromExternrefTable0(ret[0]);
2149
+ }
2150
+ }
2151
+
2152
+ function wasm_bindgen_3785b71bf6f54dd0___convert__closures_____invoke___js_sys_9aebc20340329cea___Function_fn_wasm_bindgen_3785b71bf6f54dd0___JsValue_____wasm_bindgen_3785b71bf6f54dd0___sys__Undefined___js_sys_9aebc20340329cea___Function_fn_wasm_bindgen_3785b71bf6f54dd0___JsValue_____wasm_bindgen_3785b71bf6f54dd0___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
2153
+ wasm.wasm_bindgen_3785b71bf6f54dd0___convert__closures_____invoke___js_sys_9aebc20340329cea___Function_fn_wasm_bindgen_3785b71bf6f54dd0___JsValue_____wasm_bindgen_3785b71bf6f54dd0___sys__Undefined___js_sys_9aebc20340329cea___Function_fn_wasm_bindgen_3785b71bf6f54dd0___JsValue_____wasm_bindgen_3785b71bf6f54dd0___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
2154
+ }
2155
+
2156
+
2157
+ const __wbindgen_enum_ColorSpaceConversion = ["none", "default"];
2158
+
2159
+
2160
+ const __wbindgen_enum_PremultiplyAlpha = ["none", "premultiply", "default"];
2161
+
2162
+
2163
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
2164
+
2165
+
2166
+ const __wbindgen_enum_WebGlPowerPreference = ["default", "low-power", "high-performance"];
2167
+ const EngineFinalization = (typeof FinalizationRegistry === 'undefined')
2168
+ ? { register: () => {}, unregister: () => {} }
2169
+ : new FinalizationRegistry(ptr => wasm.__wbg_engine_free(ptr, 1));
2170
+
2171
+ function addToExternrefTable0(obj) {
2172
+ const idx = wasm.__externref_table_alloc();
2173
+ wasm.__wbindgen_externrefs.set(idx, obj);
2174
+ return idx;
2175
+ }
2176
+
2177
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2178
+ ? { register: () => {}, unregister: () => {} }
2179
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
2180
+
2181
+ function debugString(val) {
2182
+ // primitive types
2183
+ const type = typeof val;
2184
+ if (type == 'number' || type == 'boolean' || val == null) {
2185
+ return `${val}`;
2186
+ }
2187
+ if (type == 'string') {
2188
+ return `"${val}"`;
2189
+ }
2190
+ if (type == 'symbol') {
2191
+ const description = val.description;
2192
+ if (description == null) {
2193
+ return 'Symbol';
2194
+ } else {
2195
+ return `Symbol(${description})`;
2196
+ }
2197
+ }
2198
+ if (type == 'function') {
2199
+ const name = val.name;
2200
+ if (typeof name == 'string' && name.length > 0) {
2201
+ return `Function(${name})`;
2202
+ } else {
2203
+ return 'Function';
2204
+ }
2205
+ }
2206
+ // objects
2207
+ if (Array.isArray(val)) {
2208
+ const length = val.length;
2209
+ let debug = '[';
2210
+ if (length > 0) {
2211
+ debug += debugString(val[0]);
2212
+ }
2213
+ for(let i = 1; i < length; i++) {
2214
+ debug += ', ' + debugString(val[i]);
2215
+ }
2216
+ debug += ']';
2217
+ return debug;
2218
+ }
2219
+ // Test for built-in
2220
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
2221
+ let className;
2222
+ if (builtInMatches && builtInMatches.length > 1) {
2223
+ className = builtInMatches[1];
2224
+ } else {
2225
+ // Failed to match the standard '[object ClassName]'
2226
+ return toString.call(val);
2227
+ }
2228
+ if (className == 'Object') {
2229
+ // we're a user defined class or Object
2230
+ // JSON.stringify avoids problems with cycles, and is generally much
2231
+ // easier than looping through ownProperties of `val`.
2232
+ try {
2233
+ return 'Object(' + JSON.stringify(val) + ')';
2234
+ } catch (_) {
2235
+ return 'Object';
2236
+ }
2237
+ }
2238
+ // errors
2239
+ if (val instanceof Error) {
2240
+ return `${val.name}: ${val.message}\n${val.stack}`;
2241
+ }
2242
+ // TODO we could test for more things here, like `Set`s and `Map`s.
2243
+ return className;
2244
+ }
2245
+
2246
+ function getArrayF32FromWasm0(ptr, len) {
2247
+ ptr = ptr >>> 0;
2248
+ return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2249
+ }
2250
+
2251
+ function getArrayF64FromWasm0(ptr, len) {
2252
+ ptr = ptr >>> 0;
2253
+ return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
2254
+ }
2255
+
2256
+ function getArrayI16FromWasm0(ptr, len) {
2257
+ ptr = ptr >>> 0;
2258
+ return getInt16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
2259
+ }
2260
+
2261
+ function getArrayI32FromWasm0(ptr, len) {
2262
+ ptr = ptr >>> 0;
2263
+ return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2264
+ }
2265
+
2266
+ function getArrayI8FromWasm0(ptr, len) {
2267
+ ptr = ptr >>> 0;
2268
+ return getInt8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2269
+ }
2270
+
2271
+ function getArrayU16FromWasm0(ptr, len) {
2272
+ ptr = ptr >>> 0;
2273
+ return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
2274
+ }
2275
+
2276
+ function getArrayU32FromWasm0(ptr, len) {
2277
+ ptr = ptr >>> 0;
2278
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2279
+ }
2280
+
2281
+ function getArrayU8FromWasm0(ptr, len) {
2282
+ ptr = ptr >>> 0;
2283
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2284
+ }
2285
+
2286
+ let cachedDataViewMemory0 = null;
2287
+ function getDataViewMemory0() {
2288
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2289
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2290
+ }
2291
+ return cachedDataViewMemory0;
2292
+ }
2293
+
2294
+ let cachedFloat32ArrayMemory0 = null;
2295
+ function getFloat32ArrayMemory0() {
2296
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
2297
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
2298
+ }
2299
+ return cachedFloat32ArrayMemory0;
2300
+ }
2301
+
2302
+ let cachedFloat64ArrayMemory0 = null;
2303
+ function getFloat64ArrayMemory0() {
2304
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
2305
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
2306
+ }
2307
+ return cachedFloat64ArrayMemory0;
2308
+ }
2309
+
2310
+ let cachedInt16ArrayMemory0 = null;
2311
+ function getInt16ArrayMemory0() {
2312
+ if (cachedInt16ArrayMemory0 === null || cachedInt16ArrayMemory0.byteLength === 0) {
2313
+ cachedInt16ArrayMemory0 = new Int16Array(wasm.memory.buffer);
2314
+ }
2315
+ return cachedInt16ArrayMemory0;
2316
+ }
2317
+
2318
+ let cachedInt32ArrayMemory0 = null;
2319
+ function getInt32ArrayMemory0() {
2320
+ if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) {
2321
+ cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer);
2322
+ }
2323
+ return cachedInt32ArrayMemory0;
2324
+ }
2325
+
2326
+ let cachedInt8ArrayMemory0 = null;
2327
+ function getInt8ArrayMemory0() {
2328
+ if (cachedInt8ArrayMemory0 === null || cachedInt8ArrayMemory0.byteLength === 0) {
2329
+ cachedInt8ArrayMemory0 = new Int8Array(wasm.memory.buffer);
2330
+ }
2331
+ return cachedInt8ArrayMemory0;
2332
+ }
2333
+
2334
+ function getStringFromWasm0(ptr, len) {
2335
+ return decodeText(ptr >>> 0, len);
2336
+ }
2337
+
2338
+ let cachedUint16ArrayMemory0 = null;
2339
+ function getUint16ArrayMemory0() {
2340
+ if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
2341
+ cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
2342
+ }
2343
+ return cachedUint16ArrayMemory0;
2344
+ }
2345
+
2346
+ let cachedUint32ArrayMemory0 = null;
2347
+ function getUint32ArrayMemory0() {
2348
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
2349
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
2350
+ }
2351
+ return cachedUint32ArrayMemory0;
2352
+ }
2353
+
2354
+ let cachedUint8ArrayMemory0 = null;
2355
+ function getUint8ArrayMemory0() {
2356
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2357
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2358
+ }
2359
+ return cachedUint8ArrayMemory0;
2360
+ }
2361
+
2362
+ function handleError(f, args) {
2363
+ try {
2364
+ return f.apply(this, args);
2365
+ } catch (e) {
2366
+ const idx = addToExternrefTable0(e);
2367
+ wasm.__wbindgen_exn_store(idx);
2368
+ }
2369
+ }
2370
+
2371
+ function isLikeNone(x) {
2372
+ return x === undefined || x === null;
2373
+ }
2374
+
2375
+ function makeMutClosure(arg0, arg1, f) {
2376
+ const state = { a: arg0, b: arg1, cnt: 1 };
2377
+ const real = (...args) => {
2378
+
2379
+ // First up with a closure we increment the internal reference
2380
+ // count. This ensures that the Rust closure environment won't
2381
+ // be deallocated while we're invoking it.
2382
+ state.cnt++;
2383
+ const a = state.a;
2384
+ state.a = 0;
2385
+ try {
2386
+ return f(a, state.b, ...args);
2387
+ } finally {
2388
+ state.a = a;
2389
+ real._wbg_cb_unref();
2390
+ }
2391
+ };
2392
+ real._wbg_cb_unref = () => {
2393
+ if (--state.cnt === 0) {
2394
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
2395
+ state.a = 0;
2396
+ CLOSURE_DTORS.unregister(state);
2397
+ }
2398
+ };
2399
+ CLOSURE_DTORS.register(real, state, state);
2400
+ return real;
2401
+ }
2402
+
2403
+ function passArray32ToWasm0(arg, malloc) {
2404
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
2405
+ getUint32ArrayMemory0().set(arg, ptr / 4);
2406
+ WASM_VECTOR_LEN = arg.length;
2407
+ return ptr;
2408
+ }
2409
+
2410
+ function passArray8ToWasm0(arg, malloc) {
2411
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
2412
+ getUint8ArrayMemory0().set(arg, ptr / 1);
2413
+ WASM_VECTOR_LEN = arg.length;
2414
+ return ptr;
2415
+ }
2416
+
2417
+ function passArrayF32ToWasm0(arg, malloc) {
2418
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
2419
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
2420
+ WASM_VECTOR_LEN = arg.length;
2421
+ return ptr;
2422
+ }
2423
+
2424
+ function passArrayF64ToWasm0(arg, malloc) {
2425
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
2426
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
2427
+ WASM_VECTOR_LEN = arg.length;
2428
+ return ptr;
2429
+ }
2430
+
2431
+ function passStringToWasm0(arg, malloc, realloc) {
2432
+ if (realloc === undefined) {
2433
+ const buf = cachedTextEncoder.encode(arg);
2434
+ const ptr = malloc(buf.length, 1) >>> 0;
2435
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2436
+ WASM_VECTOR_LEN = buf.length;
2437
+ return ptr;
2438
+ }
2439
+
2440
+ let len = arg.length;
2441
+ let ptr = malloc(len, 1) >>> 0;
2442
+
2443
+ const mem = getUint8ArrayMemory0();
2444
+
2445
+ let offset = 0;
2446
+
2447
+ for (; offset < len; offset++) {
2448
+ const code = arg.charCodeAt(offset);
2449
+ if (code > 0x7F) break;
2450
+ mem[ptr + offset] = code;
2451
+ }
2452
+ if (offset !== len) {
2453
+ if (offset !== 0) {
2454
+ arg = arg.slice(offset);
2455
+ }
2456
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2457
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2458
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2459
+
2460
+ offset += ret.written;
2461
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2462
+ }
2463
+
2464
+ WASM_VECTOR_LEN = offset;
2465
+ return ptr;
2466
+ }
2467
+
2468
+ function takeFromExternrefTable0(idx) {
2469
+ const value = wasm.__wbindgen_externrefs.get(idx);
2470
+ wasm.__externref_table_dealloc(idx);
2471
+ return value;
2472
+ }
2473
+
2474
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2475
+ cachedTextDecoder.decode();
2476
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
2477
+ let numBytesDecoded = 0;
2478
+ function decodeText(ptr, len) {
2479
+ numBytesDecoded += len;
2480
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2481
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2482
+ cachedTextDecoder.decode();
2483
+ numBytesDecoded = len;
2484
+ }
2485
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2486
+ }
2487
+
2488
+ const cachedTextEncoder = new TextEncoder();
2489
+
2490
+ if (!('encodeInto' in cachedTextEncoder)) {
2491
+ cachedTextEncoder.encodeInto = function (arg, view) {
2492
+ const buf = cachedTextEncoder.encode(arg);
2493
+ view.set(buf);
2494
+ return {
2495
+ read: arg.length,
2496
+ written: buf.length
2497
+ };
2498
+ };
2499
+ }
2500
+
2501
+ let WASM_VECTOR_LEN = 0;
2502
+
2503
+ let wasmModule, wasmInstance, wasm;
2504
+ function __wbg_finalize_init(instance, module) {
2505
+ wasmInstance = instance;
2506
+ wasm = instance.exports;
2507
+ wasmModule = module;
2508
+ cachedDataViewMemory0 = null;
2509
+ cachedFloat32ArrayMemory0 = null;
2510
+ cachedFloat64ArrayMemory0 = null;
2511
+ cachedInt16ArrayMemory0 = null;
2512
+ cachedInt32ArrayMemory0 = null;
2513
+ cachedInt8ArrayMemory0 = null;
2514
+ cachedUint16ArrayMemory0 = null;
2515
+ cachedUint32ArrayMemory0 = null;
2516
+ cachedUint8ArrayMemory0 = null;
2517
+ wasm.__wbindgen_start();
2518
+ return wasm;
2519
+ }
2520
+
2521
+ async function __wbg_load(module, imports) {
2522
+ if (typeof Response === 'function' && module instanceof Response) {
2523
+ if (!module.ok) {
2524
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
2525
+ }
2526
+
2527
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
2528
+ try {
2529
+ return await WebAssembly.instantiateStreaming(module, imports);
2530
+ } catch (e) {
2531
+ const validResponse = expectedResponseType(module.type);
2532
+
2533
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
2534
+ 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);
2535
+
2536
+ } else { throw e; }
2537
+ }
2538
+ }
2539
+
2540
+ const bytes = await module.arrayBuffer();
2541
+ return await WebAssembly.instantiate(bytes, imports);
2542
+ } else {
2543
+ const instance = await WebAssembly.instantiate(module, imports);
2544
+
2545
+ if (instance instanceof WebAssembly.Instance) {
2546
+ return { instance, module };
2547
+ } else {
2548
+ return instance;
2549
+ }
2550
+ }
2551
+
2552
+ function expectedResponseType(type) {
2553
+ switch (type) {
2554
+ case 'basic': case 'cors': case 'default': return true;
2555
+ }
2556
+ return false;
2557
+ }
2558
+ }
2559
+
2560
+ function initSync(module) {
2561
+ if (wasm !== undefined) return wasm;
2562
+
2563
+
2564
+ if (module !== undefined) {
2565
+ if (Object.getPrototypeOf(module) === Object.prototype) {
2566
+ ({module} = module)
2567
+ } else {
2568
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
2569
+ }
2570
+ }
2571
+
2572
+ const imports = __wbg_get_imports();
2573
+ if (!(module instanceof WebAssembly.Module)) {
2574
+ module = new WebAssembly.Module(module);
2575
+ }
2576
+ const instance = new WebAssembly.Instance(module, imports);
2577
+ return __wbg_finalize_init(instance, module);
2578
+ }
2579
+
2580
+ async function __wbg_init(module_or_path) {
2581
+ if (wasm !== undefined) return wasm;
2582
+
2583
+
2584
+ if (module_or_path !== undefined) {
2585
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2586
+ ({module_or_path} = module_or_path)
2587
+ } else {
2588
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
2589
+ }
2590
+ }
2591
+
2592
+ if (module_or_path === undefined) {
2593
+ module_or_path = new URL('isard_bg.wasm', import.meta.url);
2594
+ }
2595
+ const imports = __wbg_get_imports();
2596
+
2597
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
2598
+ module_or_path = fetch(module_or_path);
2599
+ }
2600
+
2601
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
2602
+
2603
+ return __wbg_finalize_init(instance, module);
2604
+ }
2605
+
2606
+ export { initSync, __wbg_init as default };