isard 1.2.0 → 1.4.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 (119) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +46 -39
  3. package/dist/basemap/basemaps.js +1 -0
  4. package/dist/basemap/basemaps.js.map +1 -1
  5. package/dist/basemap/pmtileslayer.d.ts +33 -0
  6. package/dist/basemap/pmtileslayer.js +97 -0
  7. package/dist/basemap/pmtileslayer.js.map +1 -0
  8. package/dist/basemap/trees.d.ts +26 -0
  9. package/dist/basemap/trees.js +141 -0
  10. package/dist/basemap/trees.js.map +1 -0
  11. package/dist/basemap/vectorstyle.d.ts +10 -0
  12. package/dist/basemap/vectorstyle.js +35 -0
  13. package/dist/basemap/vectorstyle.js.map +1 -1
  14. package/dist/basemap/vectortiles.d.ts +93 -44
  15. package/dist/basemap/vectortiles.js +511 -303
  16. package/dist/basemap/vectortiles.js.map +1 -1
  17. package/dist/basemap/workerpool.d.ts +17 -0
  18. package/dist/basemap/workerpool.js +203 -0
  19. package/dist/basemap/workerpool.js.map +1 -0
  20. package/dist/basemap.worker.js +2 -2
  21. package/dist/basemap.worker.js.map +18 -8
  22. package/dist/bind/layers.js +10 -0
  23. package/dist/bind/layers.js.map +1 -1
  24. package/dist/decoder.worker.js +4 -4
  25. package/dist/decoder.worker.js.map +3 -3
  26. package/dist/engine-loader.d.ts +8 -1
  27. package/dist/engine-loader.js +20 -1
  28. package/dist/engine-loader.js.map +1 -1
  29. package/dist/geoplateforme.d.ts +16 -0
  30. package/dist/geoplateforme.js +23 -0
  31. package/dist/geoplateforme.js.map +1 -1
  32. package/dist/grid-module.d.ts +44 -0
  33. package/dist/grid-module.js +63 -0
  34. package/dist/grid-module.js.map +1 -0
  35. package/dist/grids.d.ts +51 -0
  36. package/dist/grids.js +88 -0
  37. package/dist/grids.js.map +1 -0
  38. package/dist/index.d.ts +14 -4
  39. package/dist/index.js +11 -2
  40. package/dist/index.js.map +1 -1
  41. package/dist/isard_bg.wasm +0 -0
  42. package/dist/isard_core_bg.wasm +0 -0
  43. package/dist/isard_grid_bg.wasm +0 -0
  44. package/dist/isard_tess_bg.wasm +0 -0
  45. package/dist/layers/flow.d.ts +111 -0
  46. package/dist/layers/flow.js +222 -0
  47. package/dist/layers/flow.js.map +1 -0
  48. package/dist/layers/layers.js +9 -0
  49. package/dist/layers/layers.js.map +1 -1
  50. package/dist/layers/symbols.d.ts +2 -0
  51. package/dist/layers/symbols.js +2 -1
  52. package/dist/layers/symbols.js.map +1 -1
  53. package/dist/layers/vectors.d.ts +60 -0
  54. package/dist/layers/vectors.js +130 -0
  55. package/dist/layers/vectors.js.map +1 -0
  56. package/dist/map/frame-loop.d.ts +3 -0
  57. package/dist/map/frame-loop.js +6 -0
  58. package/dist/map/frame-loop.js.map +1 -1
  59. package/dist/map/layer-spec.d.ts +4 -1
  60. package/dist/map/layer-spec.js +2 -0
  61. package/dist/map/layer-spec.js.map +1 -1
  62. package/dist/map/raster-source.js +1 -1
  63. package/dist/map/raster-source.js.map +1 -1
  64. package/dist/map/workers.d.ts +5 -1
  65. package/dist/map/workers.js +36 -1
  66. package/dist/map/workers.js.map +1 -1
  67. package/dist/map.d.ts +35 -6
  68. package/dist/map.js +83 -11
  69. package/dist/map.js.map +1 -1
  70. package/dist/react/IsardMap.js +1 -0
  71. package/dist/react/IsardMap.js.map +1 -1
  72. package/dist/react/Layer.d.ts +2 -0
  73. package/dist/react/Layer.js.map +1 -1
  74. package/dist/react/Swipe.d.ts +11 -4
  75. package/dist/react/Swipe.js +26 -15
  76. package/dist/react/Swipe.js.map +1 -1
  77. package/dist/react/VectorGeometry.d.ts +35 -0
  78. package/dist/react/VectorGeometry.js +82 -0
  79. package/dist/react/VectorGeometry.js.map +1 -0
  80. package/dist/react/context.d.ts +2 -1
  81. package/dist/react/context.js.map +1 -1
  82. package/dist/react/index.d.ts +2 -1
  83. package/dist/react/index.js +2 -1
  84. package/dist/react/index.js.map +1 -1
  85. package/dist/types.d.ts +30 -3
  86. package/dist/types.js.map +1 -1
  87. package/dist/ui/minimap.d.ts +25 -0
  88. package/dist/ui/minimap.js +90 -0
  89. package/dist/ui/minimap.js.map +1 -0
  90. package/dist/ui/scale.d.ts +19 -0
  91. package/dist/ui/scale.js +44 -0
  92. package/dist/ui/scale.js.map +1 -0
  93. package/dist/ui/search.d.ts +25 -0
  94. package/dist/ui/search.js +119 -0
  95. package/dist/ui/search.js.map +1 -0
  96. package/dist/ui/style.js +17 -0
  97. package/dist/ui/style.js.map +1 -1
  98. package/dist/util/sun.d.ts +11 -0
  99. package/dist/util/sun.js +26 -0
  100. package/dist/util/sun.js.map +1 -0
  101. package/dist/wasm/isard.d.ts +124 -7
  102. package/dist/wasm/isard.js +319 -8
  103. package/dist/wasm/isard_core.d.ts +124 -7
  104. package/dist/wasm/isard_core.js +319 -8
  105. package/dist/wasm/isard_grid.d.ts +101 -0
  106. package/dist/wasm/isard_grid.js +375 -0
  107. package/dist/wasm/isard_tess.d.ts +109 -0
  108. package/dist/wasm/isard_tess.js +398 -0
  109. package/dist/workers/basemap/geometry.d.ts +72 -0
  110. package/dist/workers/basemap/labels.d.ts +8 -0
  111. package/dist/workers/basemap/raster.d.ts +10 -0
  112. package/dist/workers/basemap/street.d.ts +19 -0
  113. package/dist/workers/basemap/tiles.d.ts +65 -0
  114. package/dist/workers/basemap/trees.d.ts +19 -0
  115. package/dist/workers/basemap.worker.d.ts +147 -22
  116. package/dist/workers/basemap.worker.js +93 -553
  117. package/dist/workers/basemap.worker.js.map +1 -1
  118. package/package.json +6 -4
  119. package/vite.js +11 -2
@@ -103,6 +103,16 @@ export class Engine {
103
103
  * info log), or when `feature_count` features need a table texture past the GPU's `MAX_TEXTURE_SIZE`
104
104
  */
105
105
  addFills(points: Float64Array, ring_start: Uint32Array, polygon_start: Uint32Array, feature: Uint32Array, feature_count: number): number;
106
+ /**
107
+ * A flow layer of `particles` particles (rounded up to a multiple of 4096) with trails of `trail` positions; its
108
+ * field comes with `setFlowField`
109
+ *
110
+ * # Errors
111
+ *
112
+ * Throws (to JavaScript) when a WebGL object cannot be created, a shader fails to compile or the trails need a
113
+ * table texture past the GPU's `MAX_TEXTURE_SIZE`
114
+ */
115
+ addFlow(particles: number, trail: number): number;
106
116
  /**
107
117
  * Ground layer running `code` (GLSL ES 3.0 defining `vec4 ground(vec2 offset)`, see `render::ground`) over the
108
118
  * ground; `anchor`: Mercator point the offsets are taken from; bounds: Mercator box it shows in. Compilation errors
@@ -156,6 +166,15 @@ export class Engine {
156
166
  * info log)
157
167
  */
158
168
  addSymbols(): number;
169
+ /**
170
+ * An empty layer of vector tiles drawn as geometry: its style layers come with `setVectorSublayers`, its tiles
171
+ * with `setVectorTile`
172
+ *
173
+ * # Errors
174
+ *
175
+ * Throws (to JavaScript) when a shader fails to compile (the error carries its info log)
176
+ */
177
+ addVectorTiles(): number;
159
178
  /**
160
179
  * Longitudes and latitudes the view covers on the ground, `[west, south, east, north]` (degrees): the screen's
161
180
  * border cast on the ground, or on the far plane where it passes the horizon
@@ -256,6 +275,10 @@ export class Engine {
256
275
  * Removes a layer and frees its GPU objects; the other layers forget it (a layer that referred to it)
257
276
  */
258
277
  removeLayer(id: number): void;
278
+ /**
279
+ * Removes tile `key` of a vector tile layer (nothing if there is none)
280
+ */
281
+ removeVectorTile(id: number, key: number): void;
259
282
  /**
260
283
  * Draws a frame: the backdrop, the ground and the layers over it bottom to top, then the panorama and the
261
284
  * viewshed; returns true while tiles are still loading (a new frame will be asked through `redraw`)
@@ -338,10 +361,10 @@ export class Engine {
338
361
  */
339
362
  setFeatureRamp(id: number, rgba: Uint8Array | null | undefined, min: number, max: number): void;
340
363
  /**
341
- * Style of the features of a line, circle, fill or extrusion layer (batch `key` of the latter): 32 floats per
342
- * feature, its color (RGBA 0-1), its second color (a circle's stroke), then two sizes as zoom stops (four zooms,
343
- * four values each): a line's width; a circle's radius and stroke width, CSS pixels; a block's height and base
344
- * height, metres
364
+ * Style of the features of a line, circle, fill, extrusion or vector tile layer (batch or tile `key` of the last
365
+ * two): 32 floats per feature, its color (RGBA 0-1), its second color (a circle's stroke), then two sizes as zoom
366
+ * stops (four zooms, four values each): a line's width; a circle's radius and stroke width, CSS pixels; a block's
367
+ * height and base height, metres
345
368
  */
346
369
  setFeatureStyle(id: number, style: Float32Array, key?: number | null): void;
347
370
  /**
@@ -358,6 +381,28 @@ export class Engine {
358
381
  * of view of `fov` degrees. A camera set with `setCamera` turns around a point again
359
382
  */
360
383
  setFirstPerson(lon: number, lat: number, height: number, bearing: number, pitch: number, fov: number): void;
384
+ /**
385
+ * How far a flow layer's field has gone towards its next one, 0 to 1 (the time between the model's two hours)
386
+ */
387
+ setFlowBlend(id: number, blend: number): void;
388
+ /**
389
+ * The field of a flow layer: `width` × `height` points over `bounds` (west, south, east, north, degrees: the
390
+ * longitudes and latitudes of the corner points; a last column one step short of 360° round the world), their
391
+ * east and north components (m/s, row after row from the north; not a number: none there). On the grid of the
392
+ * field before, the particles go on (its next field and blend kept); on another one, they start again
393
+ */
394
+ setFlowField(id: number, width: number, height: number, u: Float32Array, v: Float32Array, bounds: Float64Array): void;
395
+ /**
396
+ * The field a flow layer's goes towards, on its grid (the model's next hour: east and north components, row after
397
+ * row; empty: none), mixed in by `setFlowBlend`
398
+ */
399
+ setFlowNext(id: number, u: Float32Array, v: Float32Array): void;
400
+ /**
401
+ * The look of a flow layer's trails: speeds (m/s) and their colors (RGBA 0-1, four numbers each), up to 8;
402
+ * width (CSS pixels), opacity, height over the ground (metres), speed on screen (pixels a second for 10 m/s),
403
+ * particles moving for each 100 × 100 CSS pixels of the view (at most the layer's)
404
+ */
405
+ setFlowStyle(id: number, speeds: Float32Array, colors: Float32Array, width: number, opacity: number, height: number, speed: number, density: number): void;
361
406
  /**
362
407
  * Color of the globe under the tiles (polar caps)
363
408
  */
@@ -481,11 +526,22 @@ export class Engine {
481
526
  * Space behind the globe (stars, atmosphere halo), in the globe projection
482
527
  */
483
528
  setSky(enabled: boolean): void;
529
+ /**
530
+ * The sun casting shadows and the night: its azimuth (degrees clockwise from north) and altitude (degrees above
531
+ * the horizon), the shadows' opacity (0 to 1; none under the horizon or not a number), how dark the night is (0 to
532
+ * 1: the frame tinted, the lights of the layers on). Neither shadows nor night: nothing drawn
533
+ *
534
+ * # Errors
535
+ *
536
+ * Throws (to JavaScript) when a WebGL object cannot be created or the pass fails to compile
537
+ */
538
+ setSun(azimuth: number, altitude: number, opacity: number, night: number): void;
484
539
  /**
485
540
  * Shows `layers` on one side of a vertical line only, the others beneath on the other side (comparing two states
486
- * of a place): left of `x` (CSS pixels from the left of the canvas), or right of it; a non-finite `x` stops
541
+ * of a place): left of `x` (CSS pixels from the left of the canvas), or right of it; `others` on the other side
542
+ * only (two meshes of the same place, each on its side, never drawn over each other); a non-finite `x` stops
487
543
  */
488
- setSwipe(x: number, right: boolean, layers: Uint32Array): void;
544
+ setSwipe(x: number, right: boolean, layers: Uint32Array, others: Uint32Array): void;
489
545
  /**
490
546
  * Layer-wide style of a symbol layer: size scale and opacity as zoom stops (four zooms then four values each),
491
547
  * zoom range, visibility
@@ -517,6 +573,44 @@ export class Engine {
517
573
  * Throws (to JavaScript) when the texture holding the relief's tiles cannot be created
518
574
  */
519
575
  setTerrain(url: string | null | undefined, exaggeration: number, max_z: number | null | undefined, geoid: boolean | null | undefined, loader: ((z: number, x: number, y: number, signal: AbortSignal) => Promise<Float32Array | null>) | undefined): void;
576
+ /**
577
+ * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion), its zoom range
578
+ * (two numbers: shown from the first, included, to the second, excluded), whether it shows (0 or 1), its dashes
579
+ * (four numbers: dash, gap, dash, gap, in line widths; 0: solid), its opacity as zoom stops (four zooms then four
580
+ * values; missing: opaque), the caps of its lines' ends (0 butt, 1 round, 2 square; missing: round), whether its
581
+ * lines glow at night (streets; 0 or 1)
582
+ */
583
+ setVectorSublayers(id: number, kinds: Uint8Array, zooms: Float64Array, visible: Uint8Array, dashes: Float32Array, opacities: Float32Array, caps: Uint8Array, lit: Uint8Array): void;
584
+ /**
585
+ * Adds or replaces tile `key` of a vector tile layer ready for the GPU, as the basemap workers make it (the
586
+ * tessellation module): its polygons as for `setVectorTile` (picked here; their prisms built here if drawn in
587
+ * relief while `prism` is false), the vertices of its fills (`shapes::Vertex` as bytes, each with its feature),
588
+ * their triangles, per sublayer its top cap and the rest of its prism (`fill_ranges`: four numbers, first and
589
+ * end of each), its line pieces (`pieces::Piece` as bytes), the line table (feature and length of each line),
590
+ * per sublayer its pieces (`line_ranges`: first, end), the blocks of its extrusion sublayers (`shapes::Block` as
591
+ * bytes), their triangles, per sublayer its blocks' triangles (`block_ranges`: first, end), the extent of its
592
+ * points (`bounds`: min x, min y, max x, max y), `feature_count` features
593
+ *
594
+ * # Errors
595
+ *
596
+ * Throws (to JavaScript) when the vertices, pieces or blocks are cut short, when a WebGL object of the tile cannot be
597
+ * created, or when its features or lines need a table texture past the GPU's `MAX_TEXTURE_SIZE`
598
+ */
599
+ setVectorTileMesh(id: number, key: number, points: Float64Array, ring_start: Uint32Array, polygon_start: Uint32Array, polygon_feature: Uint32Array, fill_start: Uint32Array, vertices: Uint8Array, indices: Uint32Array, fill_ranges: Uint32Array, prism: boolean, pieces: Uint8Array, line_table: Float32Array, line_ranges: Uint32Array, blocks: Uint8Array, block_indices: Uint32Array, block_ranges: Uint32Array, bounds: Float64Array, feature_count: number): void;
600
+ /**
601
+ * Adds or replaces tile `key` of a vector tile layer: its polygons as for `addFills` (`fill_start`: the first
602
+ * polygon of each sublayer, and the end; those of an extrusion sublayer raised into blocks), its lines as for
603
+ * `addLines` (`line_start`: the first line of each sublayer, and the end), `feature_count` features, styled as an
604
+ * extrusion layer's (`setFeatureStyle` with the key: a color, then a line's width or a block's height and base);
605
+ * `tile`: the corners of the tile they are cut to (west, north, east, south; empty: none), along whose edges no
606
+ * wall of a block rises
607
+ *
608
+ * # Errors
609
+ *
610
+ * Throws (to JavaScript) when a WebGL object of the tile cannot be created, or when its features or lines need a
611
+ * table texture past the GPU's `MAX_TEXTURE_SIZE`
612
+ */
613
+ setVectorTile(id: number, key: number, points: Float64Array, ring_start: Uint32Array, polygon_start: Uint32Array, polygon_feature: Uint32Array, fill_start: Uint32Array, line_points: Float64Array, line_first: Uint32Array, line_feature: Uint32Array, line_start: Uint32Array, feature_count: number, tile: Float64Array): void;
520
614
  /**
521
615
  * Shows what can be seen from points, each within its range: `observers` holds 8 numbers per observer
522
616
  * (16 at most): longitude, latitude (degrees), metres above the ground, range (metres), then to look one way
@@ -538,6 +632,10 @@ export class Engine {
538
632
  * Tile counters of the raster layers, for diagnostics
539
633
  */
540
634
  stats(): RasterLayerStats[];
635
+ /**
636
+ * Moves a flow layer's particles by `seconds` of the page's time (one animation frame), in the current view
637
+ */
638
+ stepFlow(id: number, seconds: number): void;
541
639
  /**
542
640
  * The height above the relief (metres) of the top of what stands at a position (degrees): a roof, a mesh, 0 on
543
641
  * the bare ground; undefined where nothing of the last frame is there. The scene is drawn from above into a single
@@ -571,6 +669,12 @@ export class Engine {
571
669
  * A region of the icon atlas: `width` × `height` RGBA texels (premultiplied) at (`x`, `y`)
572
670
  */
573
671
  updateIconAtlas(x: number, y: number, width: number, height: number, data: Uint8Array): void;
672
+ /**
673
+ * Vector tiles (512 CSS pixels across at their level, as `MapLibre`'s) for the view of the last frame (else the
674
+ * camera's), levels `min_z` to `max_z`, three numbers per tile (z, x, y), the nearest to the eye first: what a
675
+ * vector tile layer draws (`addVectorTiles`), coarser far away in a tilted view as the raster layers
676
+ */
677
+ vectorTilesInView(min_z: number, max_z: number): Uint32Array;
574
678
  /**
575
679
  * Tiles a raster layer wants for the view of the last frame, three numbers per tile (z, x, y), the nearest to
576
680
  * the eye first: the level each area of the ground is drawn at, for the labels of a vector style to follow it
@@ -591,11 +695,13 @@ export interface InitOutput {
591
695
  readonly engine_addCustomLayer: (a: number, b: any, c: number) => number;
592
696
  readonly engine_addExtrusions: (a: number) => [number, number, number];
593
697
  readonly engine_addFills: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
698
+ readonly engine_addFlow: (a: number, b: number, c: number) => [number, number, number];
594
699
  readonly engine_addGround: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
595
700
  readonly engine_addLines: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
596
701
  readonly engine_addNetwork: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => [number, number, number];
597
702
  readonly engine_addRaster: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
598
703
  readonly engine_addSymbols: (a: number) => [number, number, number];
704
+ readonly engine_addVectorTiles: (a: number) => [number, number, number];
599
705
  readonly engine_bounds: (a: number) => [number, number];
600
706
  readonly engine_camera: (a: number) => any;
601
707
  readonly engine_clearPreload: (a: number) => void;
@@ -616,6 +722,7 @@ export interface InitOutput {
616
722
  readonly engine_project: (a: number, b: number, c: number, d: number, e: number) => any;
617
723
  readonly engine_removeExtrusionBatch: (a: number, b: number, c: number) => void;
618
724
  readonly engine_removeLayer: (a: number, b: number) => void;
725
+ readonly engine_removeVectorTile: (a: number, b: number, c: number) => void;
619
726
  readonly engine_render: (a: number) => number;
620
727
  readonly engine_requestPick: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
621
728
  readonly engine_resize: (a: number, b: number, c: number, d: number) => void;
@@ -635,6 +742,10 @@ export interface InitOutput {
635
742
  readonly engine_setFeatureValues: (a: number, b: number, c: number, d: number, e: number) => void;
636
743
  readonly engine_setFills: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
637
744
  readonly engine_setFirstPerson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
745
+ readonly engine_setFlowBlend: (a: number, b: number, c: number) => void;
746
+ readonly engine_setFlowField: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
747
+ readonly engine_setFlowNext: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
748
+ readonly engine_setFlowStyle: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
638
749
  readonly engine_setGlobe: (a: number, b: number) => void;
639
750
  readonly engine_setGlobeColor: (a: number, b: number, c: number, d: number) => void;
640
751
  readonly engine_setGlyphAtlas: (a: number, b: number, c: number, d: number, e: number) => [number, number];
@@ -656,19 +767,25 @@ export interface InitOutput {
656
767
  readonly engine_setRasterStyle: (a: number, b: number, c: number, d: number) => void;
657
768
  readonly engine_setRequestHeaders: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
658
769
  readonly engine_setSky: (a: number, b: number) => void;
659
- readonly engine_setSwipe: (a: number, b: number, c: number, d: number, e: number) => void;
770
+ readonly engine_setSun: (a: number, b: number, c: number, d: number, e: number) => [number, number];
771
+ readonly engine_setSwipe: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
660
772
  readonly engine_setSymbolLayer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
661
773
  readonly engine_setSymbols: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
662
774
  readonly engine_setTerrain: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
775
+ readonly engine_setVectorSublayers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => void;
776
+ readonly engine_setVectorTile: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number) => [number, number];
777
+ readonly engine_setVectorTileMesh: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number) => [number, number];
663
778
  readonly engine_setViewshed: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
664
779
  readonly engine_setZoomRange: (a: number, b: number, c: number) => void;
665
780
  readonly engine_stats: (a: number) => any;
781
+ readonly engine_stepFlow: (a: number, b: number, c: number) => void;
666
782
  readonly engine_surface: (a: number, b: number, c: number) => any;
667
783
  readonly engine_surfaceAt: (a: number, b: number, c: number) => any;
668
784
  readonly engine_updateGlyphAtlas: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
669
785
  readonly engine_updateGlyphPage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
670
786
  readonly engine_updateGroundTexture: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number];
671
787
  readonly engine_updateIconAtlas: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
788
+ readonly engine_vectorTilesInView: (a: number, b: number, c: number) => [number, number];
672
789
  readonly engine_wantedTiles: (a: number, b: number) => [number, number];
673
790
  readonly engine_zoomAt: (a: number, b: number, c: number, d: number) => void;
674
791
  readonly wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___js_sys_b1e1c29ba6b0e6b3___Function_fn_wasm_bindgen_2e566c63402fe7fa___JsValue_____wasm_bindgen_2e566c63402fe7fa___sys__Undefined___js_sys_b1e1c29ba6b0e6b3___Function_fn_wasm_bindgen_2e566c63402fe7fa___JsValue_____wasm_bindgen_2e566c63402fe7fa___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
@@ -97,6 +97,25 @@ export class Engine {
97
97
  }
98
98
  return ret[0] >>> 0;
99
99
  }
100
+ /**
101
+ * A flow layer of `particles` particles (rounded up to a multiple of 4096) with trails of `trail` positions; its
102
+ * field comes with `setFlowField`
103
+ *
104
+ * # Errors
105
+ *
106
+ * Throws (to JavaScript) when a WebGL object cannot be created, a shader fails to compile or the trails need a
107
+ * table texture past the GPU's `MAX_TEXTURE_SIZE`
108
+ * @param {number} particles
109
+ * @param {number} trail
110
+ * @returns {number}
111
+ */
112
+ addFlow(particles, trail) {
113
+ const ret = wasm.engine_addFlow(this.__wbg_ptr, particles, trail);
114
+ if (ret[2]) {
115
+ throw takeFromExternrefTable0(ret[1]);
116
+ }
117
+ return ret[0] >>> 0;
118
+ }
100
119
  /**
101
120
  * Ground layer running `code` (GLSL ES 3.0 defining `vec4 ground(vec2 offset)`, see `render::ground`) over the
102
121
  * ground; `anchor`: Mercator point the offsets are taken from; bounds: Mercator box it shows in. Compilation errors
@@ -231,6 +250,22 @@ export class Engine {
231
250
  }
232
251
  return ret[0] >>> 0;
233
252
  }
253
+ /**
254
+ * An empty layer of vector tiles drawn as geometry: its style layers come with `setVectorSublayers`, its tiles
255
+ * with `setVectorTile`
256
+ *
257
+ * # Errors
258
+ *
259
+ * Throws (to JavaScript) when a shader fails to compile (the error carries its info log)
260
+ * @returns {number}
261
+ */
262
+ addVectorTiles() {
263
+ const ret = wasm.engine_addVectorTiles(this.__wbg_ptr);
264
+ if (ret[2]) {
265
+ throw takeFromExternrefTable0(ret[1]);
266
+ }
267
+ return ret[0] >>> 0;
268
+ }
234
269
  /**
235
270
  * Longitudes and latitudes the view covers on the ground, `[west, south, east, north]` (degrees): the screen's
236
271
  * border cast on the ground, or on the far plane where it passes the horizon
@@ -449,6 +484,14 @@ export class Engine {
449
484
  removeLayer(id) {
450
485
  wasm.engine_removeLayer(this.__wbg_ptr, id);
451
486
  }
487
+ /**
488
+ * Removes tile `key` of a vector tile layer (nothing if there is none)
489
+ * @param {number} id
490
+ * @param {number} key
491
+ */
492
+ removeVectorTile(id, key) {
493
+ wasm.engine_removeVectorTile(this.__wbg_ptr, id, key);
494
+ }
452
495
  /**
453
496
  * Draws a frame: the backdrop, the ground and the layers over it bottom to top, then the panorama and the
454
497
  * viewshed; returns true while tiles are still loading (a new frame will be asked through `redraw`)
@@ -647,10 +690,10 @@ export class Engine {
647
690
  wasm.engine_setFeatureRamp(this.__wbg_ptr, id, ptr0, len0, min, max);
648
691
  }
649
692
  /**
650
- * Style of the features of a line, circle, fill or extrusion layer (batch `key` of the latter): 32 floats per
651
- * feature, its color (RGBA 0-1), its second color (a circle's stroke), then two sizes as zoom stops (four zooms,
652
- * four values each): a line's width; a circle's radius and stroke width, CSS pixels; a block's height and base
653
- * height, metres
693
+ * Style of the features of a line, circle, fill, extrusion or vector tile layer (batch or tile `key` of the last
694
+ * two): 32 floats per feature, its color (RGBA 0-1), its second color (a circle's stroke), then two sizes as zoom
695
+ * stops (four zooms, four values each): a line's width; a circle's radius and stroke width, CSS pixels; a block's
696
+ * height and base height, metres
654
697
  * @param {number} id
655
698
  * @param {Float32Array} style
656
699
  * @param {number | null} [key]
@@ -704,6 +747,69 @@ export class Engine {
704
747
  setFirstPerson(lon, lat, height, bearing, pitch, fov) {
705
748
  wasm.engine_setFirstPerson(this.__wbg_ptr, lon, lat, height, bearing, pitch, fov);
706
749
  }
750
+ /**
751
+ * How far a flow layer's field has gone towards its next one, 0 to 1 (the time between the model's two hours)
752
+ * @param {number} id
753
+ * @param {number} blend
754
+ */
755
+ setFlowBlend(id, blend) {
756
+ wasm.engine_setFlowBlend(this.__wbg_ptr, id, blend);
757
+ }
758
+ /**
759
+ * The field of a flow layer: `width` × `height` points over `bounds` (west, south, east, north, degrees: the
760
+ * longitudes and latitudes of the corner points; a last column one step short of 360° round the world), their
761
+ * east and north components (m/s, row after row from the north; not a number: none there). On the grid of the
762
+ * field before, the particles go on (its next field and blend kept); on another one, they start again
763
+ * @param {number} id
764
+ * @param {number} width
765
+ * @param {number} height
766
+ * @param {Float32Array} u
767
+ * @param {Float32Array} v
768
+ * @param {Float64Array} bounds
769
+ */
770
+ setFlowField(id, width, height, u, v, bounds) {
771
+ const ptr0 = passArrayF32ToWasm0(u, wasm.__wbindgen_malloc);
772
+ const len0 = WASM_VECTOR_LEN;
773
+ const ptr1 = passArrayF32ToWasm0(v, wasm.__wbindgen_malloc);
774
+ const len1 = WASM_VECTOR_LEN;
775
+ const ptr2 = passArrayF64ToWasm0(bounds, wasm.__wbindgen_malloc);
776
+ const len2 = WASM_VECTOR_LEN;
777
+ wasm.engine_setFlowField(this.__wbg_ptr, id, width, height, ptr0, len0, ptr1, len1, ptr2, len2);
778
+ }
779
+ /**
780
+ * The field a flow layer's goes towards, on its grid (the model's next hour: east and north components, row after
781
+ * row; empty: none), mixed in by `setFlowBlend`
782
+ * @param {number} id
783
+ * @param {Float32Array} u
784
+ * @param {Float32Array} v
785
+ */
786
+ setFlowNext(id, u, v) {
787
+ const ptr0 = passArrayF32ToWasm0(u, wasm.__wbindgen_malloc);
788
+ const len0 = WASM_VECTOR_LEN;
789
+ const ptr1 = passArrayF32ToWasm0(v, wasm.__wbindgen_malloc);
790
+ const len1 = WASM_VECTOR_LEN;
791
+ wasm.engine_setFlowNext(this.__wbg_ptr, id, ptr0, len0, ptr1, len1);
792
+ }
793
+ /**
794
+ * The look of a flow layer's trails: speeds (m/s) and their colors (RGBA 0-1, four numbers each), up to 8;
795
+ * width (CSS pixels), opacity, height over the ground (metres), speed on screen (pixels a second for 10 m/s),
796
+ * particles moving for each 100 × 100 CSS pixels of the view (at most the layer's)
797
+ * @param {number} id
798
+ * @param {Float32Array} speeds
799
+ * @param {Float32Array} colors
800
+ * @param {number} width
801
+ * @param {number} opacity
802
+ * @param {number} height
803
+ * @param {number} speed
804
+ * @param {number} density
805
+ */
806
+ setFlowStyle(id, speeds, colors, width, opacity, height, speed, density) {
807
+ const ptr0 = passArrayF32ToWasm0(speeds, wasm.__wbindgen_malloc);
808
+ const len0 = WASM_VECTOR_LEN;
809
+ const ptr1 = passArrayF32ToWasm0(colors, wasm.__wbindgen_malloc);
810
+ const len1 = WASM_VECTOR_LEN;
811
+ wasm.engine_setFlowStyle(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, width, opacity, height, speed, density);
812
+ }
707
813
  /**
708
814
  * Color of the globe under the tiles (polar caps)
709
815
  * @param {number} r
@@ -977,17 +1083,40 @@ export class Engine {
977
1083
  setSky(enabled) {
978
1084
  wasm.engine_setSky(this.__wbg_ptr, enabled);
979
1085
  }
1086
+ /**
1087
+ * The sun casting shadows and the night: its azimuth (degrees clockwise from north) and altitude (degrees above
1088
+ * the horizon), the shadows' opacity (0 to 1; none under the horizon or not a number), how dark the night is (0 to
1089
+ * 1: the frame tinted, the lights of the layers on). Neither shadows nor night: nothing drawn
1090
+ *
1091
+ * # Errors
1092
+ *
1093
+ * Throws (to JavaScript) when a WebGL object cannot be created or the pass fails to compile
1094
+ * @param {number} azimuth
1095
+ * @param {number} altitude
1096
+ * @param {number} opacity
1097
+ * @param {number} night
1098
+ */
1099
+ setSun(azimuth, altitude, opacity, night) {
1100
+ const ret = wasm.engine_setSun(this.__wbg_ptr, azimuth, altitude, opacity, night);
1101
+ if (ret[1]) {
1102
+ throw takeFromExternrefTable0(ret[0]);
1103
+ }
1104
+ }
980
1105
  /**
981
1106
  * Shows `layers` on one side of a vertical line only, the others beneath on the other side (comparing two states
982
- * of a place): left of `x` (CSS pixels from the left of the canvas), or right of it; a non-finite `x` stops
1107
+ * of a place): left of `x` (CSS pixels from the left of the canvas), or right of it; `others` on the other side
1108
+ * only (two meshes of the same place, each on its side, never drawn over each other); a non-finite `x` stops
983
1109
  * @param {number} x
984
1110
  * @param {boolean} right
985
1111
  * @param {Uint32Array} layers
1112
+ * @param {Uint32Array} others
986
1113
  */
987
- setSwipe(x, right, layers) {
1114
+ setSwipe(x, right, layers, others) {
988
1115
  const ptr0 = passArray32ToWasm0(layers, wasm.__wbindgen_malloc);
989
1116
  const len0 = WASM_VECTOR_LEN;
990
- wasm.engine_setSwipe(this.__wbg_ptr, x, right, ptr0, len0);
1117
+ const ptr1 = passArray32ToWasm0(others, wasm.__wbindgen_malloc);
1118
+ const len1 = WASM_VECTOR_LEN;
1119
+ wasm.engine_setSwipe(this.__wbg_ptr, x, right, ptr0, len0, ptr1, len1);
991
1120
  }
992
1121
  /**
993
1122
  * Layer-wide style of a symbol layer: size scale and opacity as zoom stops (four zooms then four values each),
@@ -1062,6 +1191,160 @@ export class Engine {
1062
1191
  throw takeFromExternrefTable0(ret[0]);
1063
1192
  }
1064
1193
  }
1194
+ /**
1195
+ * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion), its zoom range
1196
+ * (two numbers: shown from the first, included, to the second, excluded), whether it shows (0 or 1), its dashes
1197
+ * (four numbers: dash, gap, dash, gap, in line widths; 0: solid), its opacity as zoom stops (four zooms then four
1198
+ * values; missing: opaque), the caps of its lines' ends (0 butt, 1 round, 2 square; missing: round), whether its
1199
+ * lines glow at night (streets; 0 or 1)
1200
+ * @param {number} id
1201
+ * @param {Uint8Array} kinds
1202
+ * @param {Float64Array} zooms
1203
+ * @param {Uint8Array} visible
1204
+ * @param {Float32Array} dashes
1205
+ * @param {Float32Array} opacities
1206
+ * @param {Uint8Array} caps
1207
+ * @param {Uint8Array} lit
1208
+ */
1209
+ setVectorSublayers(id, kinds, zooms, visible, dashes, opacities, caps, lit) {
1210
+ const ptr0 = passArray8ToWasm0(kinds, wasm.__wbindgen_malloc);
1211
+ const len0 = WASM_VECTOR_LEN;
1212
+ const ptr1 = passArrayF64ToWasm0(zooms, wasm.__wbindgen_malloc);
1213
+ const len1 = WASM_VECTOR_LEN;
1214
+ const ptr2 = passArray8ToWasm0(visible, wasm.__wbindgen_malloc);
1215
+ const len2 = WASM_VECTOR_LEN;
1216
+ const ptr3 = passArrayF32ToWasm0(dashes, wasm.__wbindgen_malloc);
1217
+ const len3 = WASM_VECTOR_LEN;
1218
+ const ptr4 = passArrayF32ToWasm0(opacities, wasm.__wbindgen_malloc);
1219
+ const len4 = WASM_VECTOR_LEN;
1220
+ const ptr5 = passArray8ToWasm0(caps, wasm.__wbindgen_malloc);
1221
+ const len5 = WASM_VECTOR_LEN;
1222
+ const ptr6 = passArray8ToWasm0(lit, wasm.__wbindgen_malloc);
1223
+ const len6 = WASM_VECTOR_LEN;
1224
+ wasm.engine_setVectorSublayers(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
1225
+ }
1226
+ /**
1227
+ * Adds or replaces tile `key` of a vector tile layer ready for the GPU, as the basemap workers make it (the
1228
+ * tessellation module): its polygons as for `setVectorTile` (picked here; their prisms built here if drawn in
1229
+ * relief while `prism` is false), the vertices of its fills (`shapes::Vertex` as bytes, each with its feature),
1230
+ * their triangles, per sublayer its top cap and the rest of its prism (`fill_ranges`: four numbers, first and
1231
+ * end of each), its line pieces (`pieces::Piece` as bytes), the line table (feature and length of each line),
1232
+ * per sublayer its pieces (`line_ranges`: first, end), the blocks of its extrusion sublayers (`shapes::Block` as
1233
+ * bytes), their triangles, per sublayer its blocks' triangles (`block_ranges`: first, end), the extent of its
1234
+ * points (`bounds`: min x, min y, max x, max y), `feature_count` features
1235
+ *
1236
+ * # Errors
1237
+ *
1238
+ * Throws (to JavaScript) when the vertices, pieces or blocks are cut short, when a WebGL object of the tile cannot be
1239
+ * created, or when its features or lines need a table texture past the GPU's `MAX_TEXTURE_SIZE`
1240
+ * @param {number} id
1241
+ * @param {number} key
1242
+ * @param {Float64Array} points
1243
+ * @param {Uint32Array} ring_start
1244
+ * @param {Uint32Array} polygon_start
1245
+ * @param {Uint32Array} polygon_feature
1246
+ * @param {Uint32Array} fill_start
1247
+ * @param {Uint8Array} vertices
1248
+ * @param {Uint32Array} indices
1249
+ * @param {Uint32Array} fill_ranges
1250
+ * @param {boolean} prism
1251
+ * @param {Uint8Array} pieces
1252
+ * @param {Float32Array} line_table
1253
+ * @param {Uint32Array} line_ranges
1254
+ * @param {Uint8Array} blocks
1255
+ * @param {Uint32Array} block_indices
1256
+ * @param {Uint32Array} block_ranges
1257
+ * @param {Float64Array} bounds
1258
+ * @param {number} feature_count
1259
+ */
1260
+ setVectorTileMesh(id, key, points, ring_start, polygon_start, polygon_feature, fill_start, vertices, indices, fill_ranges, prism, pieces, line_table, line_ranges, blocks, block_indices, block_ranges, bounds, feature_count) {
1261
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1262
+ const len0 = WASM_VECTOR_LEN;
1263
+ const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
1264
+ const len1 = WASM_VECTOR_LEN;
1265
+ const ptr2 = passArray32ToWasm0(polygon_start, wasm.__wbindgen_malloc);
1266
+ const len2 = WASM_VECTOR_LEN;
1267
+ const ptr3 = passArray32ToWasm0(polygon_feature, wasm.__wbindgen_malloc);
1268
+ const len3 = WASM_VECTOR_LEN;
1269
+ const ptr4 = passArray32ToWasm0(fill_start, wasm.__wbindgen_malloc);
1270
+ const len4 = WASM_VECTOR_LEN;
1271
+ const ptr5 = passArray8ToWasm0(vertices, wasm.__wbindgen_malloc);
1272
+ const len5 = WASM_VECTOR_LEN;
1273
+ const ptr6 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);
1274
+ const len6 = WASM_VECTOR_LEN;
1275
+ const ptr7 = passArray32ToWasm0(fill_ranges, wasm.__wbindgen_malloc);
1276
+ const len7 = WASM_VECTOR_LEN;
1277
+ const ptr8 = passArray8ToWasm0(pieces, wasm.__wbindgen_malloc);
1278
+ const len8 = WASM_VECTOR_LEN;
1279
+ const ptr9 = passArrayF32ToWasm0(line_table, wasm.__wbindgen_malloc);
1280
+ const len9 = WASM_VECTOR_LEN;
1281
+ const ptr10 = passArray32ToWasm0(line_ranges, wasm.__wbindgen_malloc);
1282
+ const len10 = WASM_VECTOR_LEN;
1283
+ const ptr11 = passArray8ToWasm0(blocks, wasm.__wbindgen_malloc);
1284
+ const len11 = WASM_VECTOR_LEN;
1285
+ const ptr12 = passArray32ToWasm0(block_indices, wasm.__wbindgen_malloc);
1286
+ const len12 = WASM_VECTOR_LEN;
1287
+ const ptr13 = passArray32ToWasm0(block_ranges, wasm.__wbindgen_malloc);
1288
+ const len13 = WASM_VECTOR_LEN;
1289
+ const ptr14 = passArrayF64ToWasm0(bounds, wasm.__wbindgen_malloc);
1290
+ const len14 = WASM_VECTOR_LEN;
1291
+ const ret = wasm.engine_setVectorTileMesh(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, prism, ptr8, len8, ptr9, len9, ptr10, len10, ptr11, len11, ptr12, len12, ptr13, len13, ptr14, len14, feature_count);
1292
+ if (ret[1]) {
1293
+ throw takeFromExternrefTable0(ret[0]);
1294
+ }
1295
+ }
1296
+ /**
1297
+ * Adds or replaces tile `key` of a vector tile layer: its polygons as for `addFills` (`fill_start`: the first
1298
+ * polygon of each sublayer, and the end; those of an extrusion sublayer raised into blocks), its lines as for
1299
+ * `addLines` (`line_start`: the first line of each sublayer, and the end), `feature_count` features, styled as an
1300
+ * extrusion layer's (`setFeatureStyle` with the key: a color, then a line's width or a block's height and base);
1301
+ * `tile`: the corners of the tile they are cut to (west, north, east, south; empty: none), along whose edges no
1302
+ * wall of a block rises
1303
+ *
1304
+ * # Errors
1305
+ *
1306
+ * Throws (to JavaScript) when a WebGL object of the tile cannot be created, or when its features or lines need a
1307
+ * table texture past the GPU's `MAX_TEXTURE_SIZE`
1308
+ * @param {number} id
1309
+ * @param {number} key
1310
+ * @param {Float64Array} points
1311
+ * @param {Uint32Array} ring_start
1312
+ * @param {Uint32Array} polygon_start
1313
+ * @param {Uint32Array} polygon_feature
1314
+ * @param {Uint32Array} fill_start
1315
+ * @param {Float64Array} line_points
1316
+ * @param {Uint32Array} line_first
1317
+ * @param {Uint32Array} line_feature
1318
+ * @param {Uint32Array} line_start
1319
+ * @param {number} feature_count
1320
+ * @param {Float64Array} tile
1321
+ */
1322
+ setVectorTile(id, key, points, ring_start, polygon_start, polygon_feature, fill_start, line_points, line_first, line_feature, line_start, feature_count, tile) {
1323
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1324
+ const len0 = WASM_VECTOR_LEN;
1325
+ const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
1326
+ const len1 = WASM_VECTOR_LEN;
1327
+ const ptr2 = passArray32ToWasm0(polygon_start, wasm.__wbindgen_malloc);
1328
+ const len2 = WASM_VECTOR_LEN;
1329
+ const ptr3 = passArray32ToWasm0(polygon_feature, wasm.__wbindgen_malloc);
1330
+ const len3 = WASM_VECTOR_LEN;
1331
+ const ptr4 = passArray32ToWasm0(fill_start, wasm.__wbindgen_malloc);
1332
+ const len4 = WASM_VECTOR_LEN;
1333
+ const ptr5 = passArrayF64ToWasm0(line_points, wasm.__wbindgen_malloc);
1334
+ const len5 = WASM_VECTOR_LEN;
1335
+ const ptr6 = passArray32ToWasm0(line_first, wasm.__wbindgen_malloc);
1336
+ const len6 = WASM_VECTOR_LEN;
1337
+ const ptr7 = passArray32ToWasm0(line_feature, wasm.__wbindgen_malloc);
1338
+ const len7 = WASM_VECTOR_LEN;
1339
+ const ptr8 = passArray32ToWasm0(line_start, wasm.__wbindgen_malloc);
1340
+ const len8 = WASM_VECTOR_LEN;
1341
+ const ptr9 = passArrayF64ToWasm0(tile, wasm.__wbindgen_malloc);
1342
+ const len9 = WASM_VECTOR_LEN;
1343
+ const ret = wasm.engine_setVectorTile(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, feature_count, ptr9, len9);
1344
+ if (ret[1]) {
1345
+ throw takeFromExternrefTable0(ret[0]);
1346
+ }
1347
+ }
1065
1348
  /**
1066
1349
  * Shows what can be seen from points, each within its range: `observers` holds 8 numbers per observer
1067
1350
  * (16 at most): longitude, latitude (degrees), metres above the ground, range (metres), then to look one way
@@ -1109,6 +1392,14 @@ export class Engine {
1109
1392
  const ret = wasm.engine_stats(this.__wbg_ptr);
1110
1393
  return ret;
1111
1394
  }
1395
+ /**
1396
+ * Moves a flow layer's particles by `seconds` of the page's time (one animation frame), in the current view
1397
+ * @param {number} id
1398
+ * @param {number} seconds
1399
+ */
1400
+ stepFlow(id, seconds) {
1401
+ wasm.engine_stepFlow(this.__wbg_ptr, id, seconds);
1402
+ }
1112
1403
  /**
1113
1404
  * The height above the relief (metres) of the top of what stands at a position (degrees): a roof, a mesh, 0 on
1114
1405
  * the bare ground; undefined where nothing of the last frame is there. The scene is drawn from above into a single
@@ -1199,6 +1490,20 @@ export class Engine {
1199
1490
  const len0 = WASM_VECTOR_LEN;
1200
1491
  wasm.engine_updateIconAtlas(this.__wbg_ptr, x, y, width, height, ptr0, len0);
1201
1492
  }
1493
+ /**
1494
+ * Vector tiles (512 CSS pixels across at their level, as `MapLibre`'s) for the view of the last frame (else the
1495
+ * camera's), levels `min_z` to `max_z`, three numbers per tile (z, x, y), the nearest to the eye first: what a
1496
+ * vector tile layer draws (`addVectorTiles`), coarser far away in a tilted view as the raster layers
1497
+ * @param {number} min_z
1498
+ * @param {number} max_z
1499
+ * @returns {Uint32Array}
1500
+ */
1501
+ vectorTilesInView(min_z, max_z) {
1502
+ const ret = wasm.engine_vectorTilesInView(this.__wbg_ptr, min_z, max_z);
1503
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
1504
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1505
+ return v1;
1506
+ }
1202
1507
  /**
1203
1508
  * Tiles a raster layer wants for the view of the last frame, three numbers per tile (z, x, y), the nearest to
1204
1509
  * the eye first: the level each area of the ground is drawn at, for the labels of a vector style to follow it
@@ -1880,6 +2185,12 @@ function __wbg_get_imports() {
1880
2185
  __wbg_pixelStorei_cb4e43466f5b8703: function(arg0, arg1, arg2) {
1881
2186
  arg0.pixelStorei(arg1 >>> 0, arg2);
1882
2187
  },
2188
+ __wbg_polygonOffset_81dc8ca84e29572b: function(arg0, arg1, arg2) {
2189
+ arg0.polygonOffset(arg1, arg2);
2190
+ },
2191
+ __wbg_polygonOffset_8f922d9173d8849d: function(arg0, arg1, arg2) {
2192
+ arg0.polygonOffset(arg1, arg2);
2193
+ },
1883
2194
  __wbg_prototypesetcall_8b03c01e2c0f8066: function(arg0, arg1, arg2) {
1884
2195
  Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
1885
2196
  },
@@ -2218,7 +2529,7 @@ function __wbg_get_imports() {
2218
2529
  return ret;
2219
2530
  },
2220
2531
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
2221
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 92, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2532
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 110, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2222
2533
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
2223
2534
  return ret;
2224
2535
  },