isard 1.9.0 → 1.11.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 (71) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +9 -4
  3. package/dist/basemap/vectortiles/requests.d.ts +8 -1
  4. package/dist/basemap/vectortiles/requests.js +32 -4
  5. package/dist/basemap/vectortiles/requests.js.map +1 -1
  6. package/dist/basemap/vectortiles/vectors.d.ts +8 -1
  7. package/dist/basemap/vectortiles/vectors.js +26 -2
  8. package/dist/basemap/vectortiles/vectors.js.map +1 -1
  9. package/dist/basemap/vectortiles.d.ts +15 -9
  10. package/dist/basemap/vectortiles.js +3 -1
  11. package/dist/basemap/vectortiles.js.map +1 -1
  12. package/dist/basemap.worker.js +2 -2
  13. package/dist/basemap.worker.js.map +4 -4
  14. package/dist/bind/layers.js +10 -2
  15. package/dist/bind/layers.js.map +1 -1
  16. package/dist/data/tileset.d.ts +21 -0
  17. package/dist/data/tileset.js +101 -0
  18. package/dist/data/tileset.js.map +1 -0
  19. package/dist/decoder.worker.js +3 -3
  20. package/dist/decoder.worker.js.map +3 -3
  21. package/dist/engine-loader.d.ts +2 -2
  22. package/dist/engine-loader.js +9 -3
  23. package/dist/engine-loader.js.map +1 -1
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.js +1 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/isard_bg.wasm +0 -0
  28. package/dist/isard_core_bg.wasm +0 -0
  29. package/dist/isard_tess_bg.wasm +0 -0
  30. package/dist/layers/features.d.ts +7 -0
  31. package/dist/layers/features.js +21 -5
  32. package/dist/layers/features.js.map +1 -1
  33. package/dist/layers/layers.js +2 -0
  34. package/dist/layers/layers.js.map +1 -1
  35. package/dist/layers/tiles3d.d.ts +6 -0
  36. package/dist/layers/tiles3d.js +57 -3
  37. package/dist/layers/tiles3d.js.map +1 -1
  38. package/dist/layers/vectors.d.ts +3 -0
  39. package/dist/layers/vectors.js +4 -0
  40. package/dist/layers/vectors.js.map +1 -1
  41. package/dist/map/events.js +1 -0
  42. package/dist/map/events.js.map +1 -1
  43. package/dist/map/quality.d.ts +33 -0
  44. package/dist/map/quality.js +61 -0
  45. package/dist/map/quality.js.map +1 -0
  46. package/dist/map.d.ts +22 -1
  47. package/dist/map.js +87 -8
  48. package/dist/map.js.map +1 -1
  49. package/dist/react/IsardMap.d.ts +1 -0
  50. package/dist/react/IsardMap.js +2 -0
  51. package/dist/react/IsardMap.js.map +1 -1
  52. package/dist/react/VectorGeometry.d.ts +4 -0
  53. package/dist/react/VectorGeometry.js +6 -3
  54. package/dist/react/VectorGeometry.js.map +1 -1
  55. package/dist/react/VectorTiles.d.ts +5 -1
  56. package/dist/react/VectorTiles.js +8 -0
  57. package/dist/react/VectorTiles.js.map +1 -1
  58. package/dist/react/index.d.ts +1 -1
  59. package/dist/react/index.js +1 -1
  60. package/dist/react/index.js.map +1 -1
  61. package/dist/types.d.ts +22 -0
  62. package/dist/types.js.map +1 -1
  63. package/dist/ui/interaction.d.ts +4 -0
  64. package/dist/ui/interaction.js +53 -2
  65. package/dist/ui/interaction.js.map +1 -1
  66. package/dist/wasm/isard.d.ts +30 -6
  67. package/dist/wasm/isard.js +61 -7
  68. package/dist/wasm/isard_core.d.ts +20 -6
  69. package/dist/wasm/isard_core.js +41 -7
  70. package/dist/workers/basemap/protocol.d.ts +3 -0
  71. package/package.json +1 -1
@@ -154,16 +154,20 @@ export class Engine {
154
154
  * @param {Uint32Array} start
155
155
  * @param {Uint32Array} feature
156
156
  * @param {number} feature_count
157
+ * @param {Float64Array | null} [heights]
158
+ * @param {boolean | null} [sea]
157
159
  * @returns {number}
158
160
  */
159
- addLines(points, start, feature, feature_count) {
161
+ addLines(points, start, feature, feature_count, heights, sea) {
160
162
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
161
163
  const len0 = WASM_VECTOR_LEN;
162
164
  const ptr1 = passArray32ToWasm0(start, wasm.__wbindgen_malloc);
163
165
  const len1 = WASM_VECTOR_LEN;
164
166
  const ptr2 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
165
167
  const len2 = WASM_VECTOR_LEN;
166
- const ret = wasm.engine_addLines(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, feature_count);
168
+ var ptr3 = isLikeNone(heights) ? 0 : passArrayF64ToWasm0(heights, wasm.__wbindgen_malloc);
169
+ var len3 = WASM_VECTOR_LEN;
170
+ const ret = wasm.engine_addLines(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, feature_count, ptr3, len3, isLikeNone(sea) ? 0xFFFFFF : sea ? 1 : 0);
167
171
  if (ret[2]) {
168
172
  throw takeFromExternrefTable0(ret[1]);
169
173
  }
@@ -285,6 +289,12 @@ export class Engine {
285
289
  const ret = wasm.engine_camera(this.__wbg_ptr);
286
290
  return ret;
287
291
  }
292
+ /**
293
+ * The turns go around the screen center again
294
+ */
295
+ clearPivot() {
296
+ wasm.engine_clearPivot(this.__wbg_ptr);
297
+ }
288
298
  /**
289
299
  * Stops loading the tiles of the flight's destination (`preload`)
290
300
  */
@@ -338,7 +348,9 @@ export class Engine {
338
348
  return ret;
339
349
  }
340
350
  /**
341
- * Position under a screen point (CSS pixels), undefined above the horizon; on the relief itself
351
+ * Position under a screen point (CSS pixels), undefined above the horizon; on the relief itself: from the copy of
352
+ * its tiles kept on the CPU, the drawn ground read back from the GPU only where none is there (a read back waits
353
+ * for the frame: called during a move, it stalls it)
342
354
  * @param {number} x
343
355
  * @param {number} y
344
356
  * @returns {[lon: number, lat: number] | undefined}
@@ -535,7 +547,7 @@ export class Engine {
535
547
  wasm.engine_resize(this.__wbg_ptr, width, height, pixel_ratio);
536
548
  }
537
549
  /**
538
- * Turns and tilts around the screen center, in degrees
550
+ * Turns and tilts, in degrees: around the pivot if one is set (`setPivot`), else around the screen center
539
551
  * @param {number} bearing
540
552
  * @param {number} pitch
541
553
  */
@@ -1012,15 +1024,19 @@ export class Engine {
1012
1024
  * @param {Float64Array} points
1013
1025
  * @param {Uint32Array} start
1014
1026
  * @param {Uint32Array} feature
1027
+ * @param {Float64Array | null} [heights]
1028
+ * @param {boolean | null} [sea]
1015
1029
  */
1016
- setLines(id, points, start, feature) {
1030
+ setLines(id, points, start, feature, heights, sea) {
1017
1031
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1018
1032
  const len0 = WASM_VECTOR_LEN;
1019
1033
  const ptr1 = passArray32ToWasm0(start, wasm.__wbindgen_malloc);
1020
1034
  const len1 = WASM_VECTOR_LEN;
1021
1035
  const ptr2 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
1022
1036
  const len2 = WASM_VECTOR_LEN;
1023
- const ret = wasm.engine_setLines(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2);
1037
+ var ptr3 = isLikeNone(heights) ? 0 : passArrayF64ToWasm0(heights, wasm.__wbindgen_malloc);
1038
+ var len3 = WASM_VECTOR_LEN;
1039
+ const ret = wasm.engine_setLines(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(sea) ? 0xFFFFFF : sea ? 1 : 0);
1024
1040
  if (ret[1]) {
1025
1041
  throw takeFromExternrefTable0(ret[0]);
1026
1042
  }
@@ -1084,6 +1100,18 @@ export class Engine {
1084
1100
  const len0 = WASM_VECTOR_LEN;
1085
1101
  wasm.engine_setNetworkValues(this.__wbg_ptr, id, ptr0, len0);
1086
1102
  }
1103
+ /**
1104
+ * Sets the point the next turns and tilts go around (`rotate`): what is drawn under a screen point (CSS
1105
+ * pixels), a roof or a mesh as the relief. Read back from the last frame (a stall): once, where a drag starts.
1106
+ * Returns whether something was drawn there; over nothing, the turns go around the center
1107
+ * @param {number} x
1108
+ * @param {number} y
1109
+ * @returns {boolean}
1110
+ */
1111
+ setPivot(x, y) {
1112
+ const ret = wasm.engine_setPivot(this.__wbg_ptr, x, y);
1113
+ return ret !== 0;
1114
+ }
1087
1115
  /**
1088
1116
  * Opacity and saturation (0-1) of a raster layer; nothing for another id
1089
1117
  * @param {number} id
@@ -1952,6 +1980,12 @@ function __wbg_get_imports() {
1952
1980
  __wbg_detachShader_67dabaaad80a795e: function(arg0, arg1, arg2) {
1953
1981
  arg0.detachShader(arg1, arg2);
1954
1982
  },
1983
+ __wbg_disableVertexAttribArray_11c9f11bee30c9d8: function(arg0, arg1) {
1984
+ arg0.disableVertexAttribArray(arg1 >>> 0);
1985
+ },
1986
+ __wbg_disableVertexAttribArray_c4c8af1f9e4120d4: function(arg0, arg1) {
1987
+ arg0.disableVertexAttribArray(arg1 >>> 0);
1988
+ },
1955
1989
  __wbg_disable_19fe787eccdf0272: function(arg0, arg1) {
1956
1990
  arg0.disable(arg1 >>> 0);
1957
1991
  },
@@ -2636,7 +2670,7 @@ function __wbg_get_imports() {
2636
2670
  return ret;
2637
2671
  },
2638
2672
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
2639
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 117, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2673
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 119, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2640
2674
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
2641
2675
  return ret;
2642
2676
  },
@@ -94,6 +94,9 @@ export type BasemapWork = {
94
94
  deepest?: number;
95
95
  /** How the buildings' roofs are made (`RoofMode`) */
96
96
  roofs?: RoofMode;
97
+ /** Where 3D buildings stand in place of the raised ones (`vectors({ buildings3d })`): boxes meeting the tile,
98
+ * west, south, east and north (degrees) one after the other; a raised building standing in one is left out */
99
+ covered?: number[];
97
100
  styles?: boolean;
98
101
  /** With the prisms of the fills (a relief under them) */
99
102
  prism?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isard",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "description": "A WebGL2 map engine for large, interactive data layers, labels and 3D Tiles over raster or vector basemaps (Rust core in WebAssembly)",
5
5
  "license": "MIT",
6
6
  "author": "Kevin Graff",