isard 1.5.0 → 1.6.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 (108) hide show
  1. package/CHANGELOG.md +165 -1
  2. package/README.md +3 -2
  3. package/dist/basemap/furniture.d.ts +8 -0
  4. package/dist/basemap/furniture.js +26 -0
  5. package/dist/basemap/furniture.js.map +1 -0
  6. package/dist/basemap/trees.d.ts +35 -8
  7. package/dist/basemap/trees.js +105 -52
  8. package/dist/basemap/trees.js.map +1 -1
  9. package/dist/basemap/vectorstyle.d.ts +9 -3
  10. package/dist/basemap/vectorstyle.js +5 -6
  11. package/dist/basemap/vectorstyle.js.map +1 -1
  12. package/dist/basemap/vectortiles/context.d.ts +3 -0
  13. package/dist/basemap/vectortiles/context.js.map +1 -1
  14. package/dist/basemap/vectortiles/extrusions.d.ts +4 -0
  15. package/dist/basemap/vectortiles/extrusions.js +17 -2
  16. package/dist/basemap/vectortiles/extrusions.js.map +1 -1
  17. package/dist/basemap/vectortiles/labels.d.ts +3 -0
  18. package/dist/basemap/vectortiles/labels.js +42 -17
  19. package/dist/basemap/vectortiles/labels.js.map +1 -1
  20. package/dist/basemap/vectortiles/lamps.d.ts +23 -0
  21. package/dist/basemap/vectortiles/lamps.js +90 -0
  22. package/dist/basemap/vectortiles/lamps.js.map +1 -0
  23. package/dist/basemap/vectortiles/requests.d.ts +4 -0
  24. package/dist/basemap/vectortiles/requests.js +15 -2
  25. package/dist/basemap/vectortiles/requests.js.map +1 -1
  26. package/dist/basemap/vectortiles/trees.d.ts +9 -0
  27. package/dist/basemap/vectortiles/trees.js +114 -29
  28. package/dist/basemap/vectortiles/trees.js.map +1 -1
  29. package/dist/basemap/vectortiles/vectors.d.ts +17 -0
  30. package/dist/basemap/vectortiles/vectors.js +72 -8
  31. package/dist/basemap/vectortiles/vectors.js.map +1 -1
  32. package/dist/basemap/vectortiles.d.ts +26 -6
  33. package/dist/basemap/vectortiles.js +43 -10
  34. package/dist/basemap/vectortiles.js.map +1 -1
  35. package/dist/basemap.worker.js +2 -2
  36. package/dist/basemap.worker.js.map +12 -10
  37. package/dist/bind/layers.js +1 -0
  38. package/dist/bind/layers.js.map +1 -1
  39. package/dist/data/collada.d.ts +19 -0
  40. package/dist/data/collada.js +319 -0
  41. package/dist/data/collada.js.map +1 -0
  42. package/dist/data/ifc.d.ts +100 -0
  43. package/dist/data/ifc.js +372 -0
  44. package/dist/data/ifc.js.map +1 -0
  45. package/dist/decoder.worker.js +5 -5
  46. package/dist/decoder.worker.js.map +3 -3
  47. package/dist/formats.d.ts +7 -2
  48. package/dist/formats.js +7 -2
  49. package/dist/formats.js.map +1 -1
  50. package/dist/index.d.ts +8 -1
  51. package/dist/index.js +6 -1
  52. package/dist/index.js.map +1 -1
  53. package/dist/isard_bg.wasm +0 -0
  54. package/dist/isard_core_bg.wasm +0 -0
  55. package/dist/isard_grid_bg.wasm +0 -0
  56. package/dist/isard_tess_bg.wasm +0 -0
  57. package/dist/layers/extrusions.d.ts +10 -0
  58. package/dist/layers/extrusions.js +28 -2
  59. package/dist/layers/extrusions.js.map +1 -1
  60. package/dist/layers/layers.d.ts +12 -0
  61. package/dist/layers/layers.js +44 -1
  62. package/dist/layers/layers.js.map +1 -1
  63. package/dist/layers/photos.d.ts +48 -0
  64. package/dist/layers/photos.js +140 -0
  65. package/dist/layers/photos.js.map +1 -0
  66. package/dist/layers/symbols.d.ts +5 -1
  67. package/dist/layers/symbols.js +111 -32
  68. package/dist/layers/symbols.js.map +1 -1
  69. package/dist/layers/trees.d.ts +28 -0
  70. package/dist/layers/trees.js +51 -0
  71. package/dist/layers/trees.js.map +1 -0
  72. package/dist/layers/vectors.d.ts +28 -2
  73. package/dist/layers/vectors.js +81 -7
  74. package/dist/layers/vectors.js.map +1 -1
  75. package/dist/map/layer-spec.d.ts +3 -0
  76. package/dist/map/layer-spec.js +2 -0
  77. package/dist/map/layer-spec.js.map +1 -1
  78. package/dist/map.d.ts +8 -0
  79. package/dist/map.js +15 -2
  80. package/dist/map.js.map +1 -1
  81. package/dist/panoramax.d.ts +49 -0
  82. package/dist/panoramax.js +71 -0
  83. package/dist/panoramax.js.map +1 -0
  84. package/dist/react/Layer.d.ts +1 -0
  85. package/dist/react/Layer.js.map +1 -1
  86. package/dist/react/VectorGeometry.d.ts +5 -0
  87. package/dist/react/VectorGeometry.js +12 -4
  88. package/dist/react/VectorGeometry.js.map +1 -1
  89. package/dist/util/gltf.d.ts +9 -0
  90. package/dist/util/gltf.js +27 -0
  91. package/dist/util/gltf.js.map +1 -0
  92. package/dist/util/roofs.d.ts +10 -0
  93. package/dist/util/roofs.js +30 -0
  94. package/dist/util/roofs.js.map +1 -0
  95. package/dist/wasm/isard.d.ts +56 -17
  96. package/dist/wasm/isard.js +128 -18
  97. package/dist/wasm/isard_core.d.ts +44 -17
  98. package/dist/wasm/isard_core.js +104 -18
  99. package/dist/wasm/isard_tess.d.ts +6 -3
  100. package/dist/wasm/isard_tess.js +27 -4
  101. package/dist/workers/basemap/geometry.d.ts +38 -22
  102. package/dist/workers/basemap/labels.d.ts +14 -1
  103. package/dist/workers/basemap/lamps.d.ts +10 -0
  104. package/dist/workers/basemap/trees.d.ts +3 -1
  105. package/dist/workers/basemap.worker.d.ts +43 -3
  106. package/dist/workers/basemap.worker.js +14 -2
  107. package/dist/workers/basemap.worker.js.map +1 -1
  108. package/package.json +1 -1
@@ -737,7 +737,7 @@ export class Engine {
737
737
  }
738
738
  /**
739
739
  * Adds or replaces batch `key` of an extrusion layer: polygons as for `addFills`, `feature_count` features (the
740
- * feature style gives each its height and base height as its two sizes, metres)
740
+ * feature style gives each its height and base height as its two sizes, metres), each polygon's roof (`Roofs`)
741
741
  *
742
742
  * # Errors
743
743
  *
@@ -750,8 +750,11 @@ export class Engine {
750
750
  * @param {Uint32Array} polygon_start
751
751
  * @param {Uint32Array} feature
752
752
  * @param {number} feature_count
753
+ * @param {Uint8Array} roofs
754
+ * @param {Float32Array} roof_heights
755
+ * @param {number} metres
753
756
  */
754
- setExtrusionBatch(id, key, points, ring_start, polygon_start, feature, feature_count) {
757
+ setExtrusionBatch(id, key, points, ring_start, polygon_start, feature, feature_count, roofs, roof_heights, metres) {
755
758
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
756
759
  const len0 = WASM_VECTOR_LEN;
757
760
  const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
@@ -760,11 +763,23 @@ export class Engine {
760
763
  const len2 = WASM_VECTOR_LEN;
761
764
  const ptr3 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
762
765
  const len3 = WASM_VECTOR_LEN;
763
- const ret = wasm.engine_setExtrusionBatch(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, feature_count);
766
+ const ptr4 = passArray8ToWasm0(roofs, wasm.__wbindgen_malloc);
767
+ const len4 = WASM_VECTOR_LEN;
768
+ const ptr5 = passArrayF32ToWasm0(roof_heights, wasm.__wbindgen_malloc);
769
+ const len5 = WASM_VECTOR_LEN;
770
+ const ret = wasm.engine_setExtrusionBatch(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, feature_count, ptr4, len4, ptr5, len5, metres);
764
771
  if (ret[1]) {
765
772
  throw takeFromExternrefTable0(ret[0]);
766
773
  }
767
774
  }
775
+ /**
776
+ * Whether the buildings of an extrusion layer, or of a vector tiles layer, show their windows on their walls
777
+ * @param {number} id
778
+ * @param {boolean} on
779
+ */
780
+ setFacades(id, on) {
781
+ wasm.engine_setFacades(this.__wbg_ptr, id, on);
782
+ }
768
783
  /**
769
784
  * Layer-wide style of a feature layer: opacity as zoom stops (four zooms then four values), the zoom range it
770
785
  * shows in (`min_zoom` included, `max_zoom` excluded), whether it shows at all
@@ -1122,6 +1137,30 @@ export class Engine {
1122
1137
  setMaxPitch(max) {
1123
1138
  wasm.engine_setMaxPitch(this.__wbg_ptr, max);
1124
1139
  }
1140
+ /**
1141
+ * Lights at night the part of a model layer's model from `from` metres up (a street lamp's head) in `r, g, b`;
1142
+ * `from` not a number: none
1143
+ * @param {number} id
1144
+ * @param {number} from
1145
+ * @param {number} r
1146
+ * @param {number} g
1147
+ * @param {number} b
1148
+ */
1149
+ setModelGlow(id, from, r, g, b) {
1150
+ wasm.engine_setModelGlow(this.__wbg_ptr, id, from, r, g, b);
1151
+ }
1152
+ /**
1153
+ * Highlights the feature `feature` of a model layer's model (an IFC model's element) in `r, g, b`; `feature` not a
1154
+ * number: none
1155
+ * @param {number} id
1156
+ * @param {number} feature
1157
+ * @param {number} r
1158
+ * @param {number} g
1159
+ * @param {number} b
1160
+ */
1161
+ setModelHighlight(id, feature, r, g, b) {
1162
+ wasm.engine_setModelHighlight(this.__wbg_ptr, id, feature, r, g, b);
1163
+ }
1125
1164
  /**
1126
1165
  * Replaces the instances of a model layer (as for `addModels`) and the reference of their altitudes
1127
1166
  * @param {number} id
@@ -1315,25 +1354,27 @@ export class Engine {
1315
1354
  }
1316
1355
  /**
1317
1356
  * Layer-wide style of a symbol layer: size scale and opacity as zoom stops (four zooms then four values each),
1318
- * zoom range, visibility
1357
+ * zoom range, visibility, hidden by the buildings
1319
1358
  * @param {number} id
1320
1359
  * @param {Float32Array} size
1321
1360
  * @param {Float32Array} opacity
1322
1361
  * @param {number} min_zoom
1323
1362
  * @param {number} max_zoom
1324
1363
  * @param {boolean} visible
1364
+ * @param {boolean} occluded
1325
1365
  */
1326
- setSymbolLayer(id, size, opacity, min_zoom, max_zoom, visible) {
1366
+ setSymbolLayer(id, size, opacity, min_zoom, max_zoom, visible, occluded) {
1327
1367
  const ptr0 = passArrayF32ToWasm0(size, wasm.__wbindgen_malloc);
1328
1368
  const len0 = WASM_VECTOR_LEN;
1329
1369
  const ptr1 = passArrayF32ToWasm0(opacity, wasm.__wbindgen_malloc);
1330
1370
  const len1 = WASM_VECTOR_LEN;
1331
- wasm.engine_setSymbolLayer(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, min_zoom, max_zoom, visible);
1371
+ wasm.engine_setSymbolLayer(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, min_zoom, max_zoom, visible, occluded);
1332
1372
  }
1333
1373
  /**
1334
1374
  * Labels of a symbol layer, shaped by the page: anchors (Mercator, interleaved), their texts' boxes (min x, min y,
1335
- * max x, max y, CSS pixels from the anchor), styles (36 floats each, see `LABEL_FLOATS`) and glyph and icon quads
1336
- * (11 floats each, see `QUAD_FLOATS`)
1375
+ * max x, max y, CSS pixels from the anchor), styles (37 floats each, see `LABEL_FLOATS`), glyph and icon quads
1376
+ * (11 floats each, see `QUAD_FLOATS`) and the lines their curved texts follow (`paths`: for each label, its number
1377
+ * of points, the index of its anchor among them, then the points, Mercator; 0, 0 and none for the others)
1337
1378
  *
1338
1379
  * # Errors
1339
1380
  *
@@ -1344,8 +1385,9 @@ export class Engine {
1344
1385
  * @param {Float32Array} boxes
1345
1386
  * @param {Float32Array} styles
1346
1387
  * @param {Float32Array} quads
1388
+ * @param {Float64Array} paths
1347
1389
  */
1348
- setSymbols(id, anchors, boxes, styles, quads) {
1390
+ setSymbols(id, anchors, boxes, styles, quads, paths) {
1349
1391
  const ptr0 = passArrayF64ToWasm0(anchors, wasm.__wbindgen_malloc);
1350
1392
  const len0 = WASM_VECTOR_LEN;
1351
1393
  const ptr1 = passArrayF32ToWasm0(boxes, wasm.__wbindgen_malloc);
@@ -1354,7 +1396,9 @@ export class Engine {
1354
1396
  const len2 = WASM_VECTOR_LEN;
1355
1397
  const ptr3 = passArrayF32ToWasm0(quads, wasm.__wbindgen_malloc);
1356
1398
  const len3 = WASM_VECTOR_LEN;
1357
- const ret = wasm.engine_setSymbols(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1399
+ const ptr4 = passArrayF64ToWasm0(paths, wasm.__wbindgen_malloc);
1400
+ const len4 = WASM_VECTOR_LEN;
1401
+ const ret = wasm.engine_setSymbols(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
1358
1402
  if (ret[1]) {
1359
1403
  throw takeFromExternrefTable0(ret[0]);
1360
1404
  }
@@ -1410,11 +1454,15 @@ export class Engine {
1410
1454
  wasm.engine_setTiles3dStyle(this.__wbg_ptr, id, max_error, opacity, !isLikeNone(point_size), isLikeNone(point_size) ? 0 : point_size, ptr0, len0);
1411
1455
  }
1412
1456
  /**
1413
- * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion), its zoom range
1457
+ * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion, 3
1458
+ * circle), its zoom range
1414
1459
  * (two numbers: shown from the first, included, to the second, excluded), whether it shows (0 or 1), its dashes
1415
1460
  * (four numbers: dash, gap, dash, gap, in line widths; 0: solid), its opacity as zoom stops (four zooms then four
1416
1461
  * values; missing: opaque), the caps of its lines' ends (0 butt, 1 round, 2 square; missing: round), whether its
1417
- * lines glow at night (streets; 0 or 1)
1462
+ * lines glow at night (streets; 0 or 1), the joins of its lines (two numbers: 0 round, 1 miter, 2 bevel, then the
1463
+ * miter limit in line widths; missing: round), the translation of its fills or lines (three numbers: x and y in CSS
1464
+ * pixels, x right and y down, then 0 if it turns with the map, 1 if it stays on the screen; missing: none), whether its
1465
+ * fills have patterns (0 or 1)
1418
1466
  * @param {number} id
1419
1467
  * @param {Uint8Array} kinds
1420
1468
  * @param {Float64Array} zooms
@@ -1423,8 +1471,11 @@ export class Engine {
1423
1471
  * @param {Float32Array} opacities
1424
1472
  * @param {Uint8Array} caps
1425
1473
  * @param {Uint8Array} lit
1474
+ * @param {Float32Array} joins
1475
+ * @param {Float32Array} translates
1476
+ * @param {Uint8Array} patterned
1426
1477
  */
1427
- setVectorSublayers(id, kinds, zooms, visible, dashes, opacities, caps, lit) {
1478
+ setVectorSublayers(id, kinds, zooms, visible, dashes, opacities, caps, lit, joins, translates, patterned) {
1428
1479
  const ptr0 = passArray8ToWasm0(kinds, wasm.__wbindgen_malloc);
1429
1480
  const len0 = WASM_VECTOR_LEN;
1430
1481
  const ptr1 = passArrayF64ToWasm0(zooms, wasm.__wbindgen_malloc);
@@ -1439,7 +1490,13 @@ export class Engine {
1439
1490
  const len5 = WASM_VECTOR_LEN;
1440
1491
  const ptr6 = passArray8ToWasm0(lit, wasm.__wbindgen_malloc);
1441
1492
  const len6 = WASM_VECTOR_LEN;
1442
- wasm.engine_setVectorSublayers(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
1493
+ const ptr7 = passArrayF32ToWasm0(joins, wasm.__wbindgen_malloc);
1494
+ const len7 = WASM_VECTOR_LEN;
1495
+ const ptr8 = passArrayF32ToWasm0(translates, wasm.__wbindgen_malloc);
1496
+ const len8 = WASM_VECTOR_LEN;
1497
+ const ptr9 = passArray8ToWasm0(patterned, wasm.__wbindgen_malloc);
1498
+ const len9 = WASM_VECTOR_LEN;
1499
+ wasm.engine_setVectorSublayers(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, ptr9, len9);
1443
1500
  }
1444
1501
  /**
1445
1502
  * Adds or replaces tile `key` of a vector tile layer ready for the GPU, as the basemap workers make it (the
@@ -1511,13 +1568,36 @@ export class Engine {
1511
1568
  throw takeFromExternrefTable0(ret[0]);
1512
1569
  }
1513
1570
  }
1571
+ /**
1572
+ * The points of tile `key` of a vector tile layer, after the tile itself (`setVectorTile`, `setVectorTileMesh`):
1573
+ * Mercator, interleaved, each with its feature (styled as a circle's: a color, a radius and a stroke width, then the
1574
+ * stroke's color), `start` the first point of each sublayer and the end; the circle sublayers draw theirs
1575
+ * @param {number} id
1576
+ * @param {number} key
1577
+ * @param {Float64Array} points
1578
+ * @param {Uint32Array} feature
1579
+ * @param {Uint32Array} start
1580
+ */
1581
+ setVectorTilePoints(id, key, points, feature, start) {
1582
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1583
+ const len0 = WASM_VECTOR_LEN;
1584
+ const ptr1 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
1585
+ const len1 = WASM_VECTOR_LEN;
1586
+ const ptr2 = passArray32ToWasm0(start, wasm.__wbindgen_malloc);
1587
+ const len2 = WASM_VECTOR_LEN;
1588
+ wasm.engine_setVectorTilePoints(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2);
1589
+ }
1514
1590
  /**
1515
1591
  * Adds or replaces tile `key` of a vector tile layer: its polygons as for `addFills` (`fill_start`: the first
1516
1592
  * polygon of each sublayer, and the end; those of an extrusion sublayer raised into blocks), its lines as for
1517
1593
  * `addLines` (`line_start`: the first line of each sublayer, and the end), `feature_count` features, styled as an
1518
1594
  * extrusion layer's (`setFeatureStyle` with the key: a color, then a line's width or a block's height and base);
1519
1595
  * `tile`: the corners of the tile they are cut to (west, north, east, south; empty: none), along whose edges no
1520
- * wall of a block rises
1596
+ * wall of a block rises; `roofs` and `roof_heights`: per polygon, the shape and height of its block's roof
1597
+ * (`shapes::Roofs`: 0 flat, 1 to 5 `RoofShape::number`, 255 generated from its outline; metres, not a number: as
1598
+ * its slopes make it; empty: flat), the whole outlines of the buildings the tile cuts (`roof_outlines`, interleaved
1599
+ * Mercator points, `roof_outline_start`: where each polygon's starts, and the end), `roof_metres` the metres per
1600
+ * Mercator unit at the tile
1521
1601
  *
1522
1602
  * # Errors
1523
1603
  *
@@ -1536,8 +1616,13 @@ export class Engine {
1536
1616
  * @param {Uint32Array} line_start
1537
1617
  * @param {number} feature_count
1538
1618
  * @param {Float64Array} tile
1619
+ * @param {Uint8Array} roofs
1620
+ * @param {Float32Array} roof_heights
1621
+ * @param {Float64Array} roof_outlines
1622
+ * @param {Uint32Array} roof_outline_start
1623
+ * @param {number} roof_metres
1539
1624
  */
1540
- setVectorTile(id, key, points, ring_start, polygon_start, polygon_feature, fill_start, line_points, line_first, line_feature, line_start, feature_count, tile) {
1625
+ setVectorTile(id, key, points, ring_start, polygon_start, polygon_feature, fill_start, line_points, line_first, line_feature, line_start, feature_count, tile, roofs, roof_heights, roof_outlines, roof_outline_start, roof_metres) {
1541
1626
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1542
1627
  const len0 = WASM_VECTOR_LEN;
1543
1628
  const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
@@ -1558,7 +1643,15 @@ export class Engine {
1558
1643
  const len8 = WASM_VECTOR_LEN;
1559
1644
  const ptr9 = passArrayF64ToWasm0(tile, wasm.__wbindgen_malloc);
1560
1645
  const len9 = WASM_VECTOR_LEN;
1561
- 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);
1646
+ const ptr10 = passArray8ToWasm0(roofs, wasm.__wbindgen_malloc);
1647
+ const len10 = WASM_VECTOR_LEN;
1648
+ const ptr11 = passArrayF32ToWasm0(roof_heights, wasm.__wbindgen_malloc);
1649
+ const len11 = WASM_VECTOR_LEN;
1650
+ const ptr12 = passArrayF64ToWasm0(roof_outlines, wasm.__wbindgen_malloc);
1651
+ const len12 = WASM_VECTOR_LEN;
1652
+ const ptr13 = passArray32ToWasm0(roof_outline_start, wasm.__wbindgen_malloc);
1653
+ const len13 = WASM_VECTOR_LEN;
1654
+ 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, ptr10, len10, ptr11, len11, ptr12, len12, ptr13, len13, roof_metres);
1562
1655
  if (ret[1]) {
1563
1656
  throw takeFromExternrefTable0(ret[0]);
1564
1657
  }
@@ -1740,6 +1833,17 @@ export class Engine {
1740
1833
  const len0 = WASM_VECTOR_LEN;
1741
1834
  wasm.engine_updateIconAtlas(this.__wbg_ptr, x, y, width, height, ptr0, len0);
1742
1835
  }
1836
+ /**
1837
+ * Uploads a part more of the blocks of tile `key` of a vector tile layer (a large tile's, a part at a time over
1838
+ * several frames); whether some are left. Its blocks are drawn once they are all there
1839
+ * @param {number} id
1840
+ * @param {number} key
1841
+ * @returns {boolean}
1842
+ */
1843
+ uploadVectorTile(id, key) {
1844
+ const ret = wasm.engine_uploadVectorTile(this.__wbg_ptr, id, key);
1845
+ return ret !== 0;
1846
+ }
1743
1847
  /**
1744
1848
  * Vector tiles (512 CSS pixels across at their level, as `MapLibre`'s) for the view of the last frame (else the
1745
1849
  * camera's), levels `min_z` to `max_z`, three numbers per tile (z, x, y), the nearest to the eye first: what a
@@ -1963,6 +2067,12 @@ function __wbg_get_imports() {
1963
2067
  __wbg_bufferData_bad7ce562b6a9eac: function(arg0, arg1, arg2, arg3) {
1964
2068
  arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1965
2069
  },
2070
+ __wbg_bufferSubData_22c4c420e0f67cda: function(arg0, arg1, arg2, arg3) {
2071
+ arg0.bufferSubData(arg1 >>> 0, arg2, arg3);
2072
+ },
2073
+ __wbg_bufferSubData_8609cd8a2c013181: function(arg0, arg1, arg2, arg3) {
2074
+ arg0.bufferSubData(arg1 >>> 0, arg2, arg3);
2075
+ },
1966
2076
  __wbg_byteLength_141bda7c7c28aa72: function(arg0) {
1967
2077
  const ret = arg0.byteLength;
1968
2078
  return ret;
@@ -3019,7 +3129,7 @@ function __wbg_get_imports() {
3019
3129
  return ret;
3020
3130
  },
3021
3131
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
3022
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 218, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3132
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 225, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3023
3133
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
3024
3134
  return ret;
3025
3135
  },
@@ -344,14 +344,18 @@ export class Engine {
344
344
  setExtrusionAnchors(id: number, key: number, anchors: Float32Array): void;
345
345
  /**
346
346
  * Adds or replaces batch `key` of an extrusion layer: polygons as for `addFills`, `feature_count` features (the
347
- * feature style gives each its height and base height as its two sizes, metres)
347
+ * feature style gives each its height and base height as its two sizes, metres), each polygon's roof (`Roofs`)
348
348
  *
349
349
  * # Errors
350
350
  *
351
351
  * Throws (to JavaScript) when a WebGL buffer or vertex array of the batch cannot be created, or when
352
352
  * `feature_count` features need a table texture past the GPU's `MAX_TEXTURE_SIZE`
353
353
  */
354
- setExtrusionBatch(id: number, key: number, points: Float64Array, ring_start: Uint32Array, polygon_start: Uint32Array, feature: Uint32Array, feature_count: number): void;
354
+ setExtrusionBatch(id: number, key: number, points: Float64Array, ring_start: Uint32Array, polygon_start: Uint32Array, feature: Uint32Array, feature_count: number, roofs: Uint8Array, roof_heights: Float32Array, metres: number): void;
355
+ /**
356
+ * Whether the buildings of an extrusion layer, or of a vector tiles layer, show their windows on their walls
357
+ */
358
+ setFacades(id: number, on: boolean): void;
355
359
  /**
356
360
  * Layer-wide style of a feature layer: opacity as zoom stops (four zooms then four values), the zoom range it
357
361
  * shows in (`min_zoom` included, `max_zoom` excluded), whether it shows at all
@@ -554,20 +558,21 @@ export class Engine {
554
558
  setSwipe(x: number, right: boolean, layers: Uint32Array, others: Uint32Array): void;
555
559
  /**
556
560
  * Layer-wide style of a symbol layer: size scale and opacity as zoom stops (four zooms then four values each),
557
- * zoom range, visibility
561
+ * zoom range, visibility, hidden by the buildings
558
562
  */
559
- setSymbolLayer(id: number, size: Float32Array, opacity: Float32Array, min_zoom: number, max_zoom: number, visible: boolean): void;
563
+ setSymbolLayer(id: number, size: Float32Array, opacity: Float32Array, min_zoom: number, max_zoom: number, visible: boolean, occluded: boolean): void;
560
564
  /**
561
565
  * Labels of a symbol layer, shaped by the page: anchors (Mercator, interleaved), their texts' boxes (min x, min y,
562
- * max x, max y, CSS pixels from the anchor), styles (36 floats each, see `LABEL_FLOATS`) and glyph and icon quads
563
- * (11 floats each, see `QUAD_FLOATS`)
566
+ * max x, max y, CSS pixels from the anchor), styles (37 floats each, see `LABEL_FLOATS`), glyph and icon quads
567
+ * (11 floats each, see `QUAD_FLOATS`) and the lines their curved texts follow (`paths`: for each label, its number
568
+ * of points, the index of its anchor among them, then the points, Mercator; 0, 0 and none for the others)
564
569
  *
565
570
  * # Errors
566
571
  *
567
572
  * Throws (to JavaScript) when the labels need a table texture past the GPU's `MAX_TEXTURE_SIZE`, or
568
573
  * when it cannot be created; the layer then keeps its labels
569
574
  */
570
- setSymbols(id: number, anchors: Float64Array, boxes: Float32Array, styles: Float32Array, quads: Float32Array): void;
575
+ setSymbols(id: number, anchors: Float64Array, boxes: Float32Array, styles: Float32Array, quads: Float32Array, paths: Float64Array): void;
571
576
  /**
572
577
  * Relief under the raster layers, from raw altitudes (`image/x-bil;bits=32`, 256 × 256, or the same followed by
573
578
  * the validity mask of an `ArcGIS` raw grid): `url` is a template with `{bbox}` (WMS `GetMap` in EPSG:3857, or in
@@ -584,13 +589,17 @@ export class Engine {
584
589
  */
585
590
  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;
586
591
  /**
587
- * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion), its zoom range
592
+ * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion, 3
593
+ * circle), its zoom range
588
594
  * (two numbers: shown from the first, included, to the second, excluded), whether it shows (0 or 1), its dashes
589
595
  * (four numbers: dash, gap, dash, gap, in line widths; 0: solid), its opacity as zoom stops (four zooms then four
590
596
  * values; missing: opaque), the caps of its lines' ends (0 butt, 1 round, 2 square; missing: round), whether its
591
- * lines glow at night (streets; 0 or 1)
597
+ * lines glow at night (streets; 0 or 1), the joins of its lines (two numbers: 0 round, 1 miter, 2 bevel, then the
598
+ * miter limit in line widths; missing: round), the translation of its fills or lines (three numbers: x and y in CSS
599
+ * pixels, x right and y down, then 0 if it turns with the map, 1 if it stays on the screen; missing: none), whether its
600
+ * fills have patterns (0 or 1)
592
601
  */
593
- setVectorSublayers(id: number, kinds: Uint8Array, zooms: Float64Array, visible: Uint8Array, dashes: Float32Array, opacities: Float32Array, caps: Uint8Array, lit: Uint8Array): void;
602
+ setVectorSublayers(id: number, kinds: Uint8Array, zooms: Float64Array, visible: Uint8Array, dashes: Float32Array, opacities: Float32Array, caps: Uint8Array, lit: Uint8Array, joins: Float32Array, translates: Float32Array, patterned: Uint8Array): void;
594
603
  /**
595
604
  * Adds or replaces tile `key` of a vector tile layer ready for the GPU, as the basemap workers make it (the
596
605
  * tessellation module): its polygons as for `setVectorTile` (picked here; their prisms built here if drawn in
@@ -607,20 +616,30 @@ export class Engine {
607
616
  * created, or when its features or lines need a table texture past the GPU's `MAX_TEXTURE_SIZE`
608
617
  */
609
618
  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;
619
+ /**
620
+ * The points of tile `key` of a vector tile layer, after the tile itself (`setVectorTile`, `setVectorTileMesh`):
621
+ * Mercator, interleaved, each with its feature (styled as a circle's: a color, a radius and a stroke width, then the
622
+ * stroke's color), `start` the first point of each sublayer and the end; the circle sublayers draw theirs
623
+ */
624
+ setVectorTilePoints(id: number, key: number, points: Float64Array, feature: Uint32Array, start: Uint32Array): void;
610
625
  /**
611
626
  * Adds or replaces tile `key` of a vector tile layer: its polygons as for `addFills` (`fill_start`: the first
612
627
  * polygon of each sublayer, and the end; those of an extrusion sublayer raised into blocks), its lines as for
613
628
  * `addLines` (`line_start`: the first line of each sublayer, and the end), `feature_count` features, styled as an
614
629
  * extrusion layer's (`setFeatureStyle` with the key: a color, then a line's width or a block's height and base);
615
630
  * `tile`: the corners of the tile they are cut to (west, north, east, south; empty: none), along whose edges no
616
- * wall of a block rises
631
+ * wall of a block rises; `roofs` and `roof_heights`: per polygon, the shape and height of its block's roof
632
+ * (`shapes::Roofs`: 0 flat, 1 to 5 `RoofShape::number`, 255 generated from its outline; metres, not a number: as
633
+ * its slopes make it; empty: flat), the whole outlines of the buildings the tile cuts (`roof_outlines`, interleaved
634
+ * Mercator points, `roof_outline_start`: where each polygon's starts, and the end), `roof_metres` the metres per
635
+ * Mercator unit at the tile
617
636
  *
618
637
  * # Errors
619
638
  *
620
639
  * Throws (to JavaScript) when a WebGL object of the tile cannot be created, or when its features or lines need a
621
640
  * table texture past the GPU's `MAX_TEXTURE_SIZE`
622
641
  */
623
- 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;
642
+ 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, roofs: Uint8Array, roof_heights: Float32Array, roof_outlines: Float64Array, roof_outline_start: Uint32Array, roof_metres: number): void;
624
643
  /**
625
644
  * Shows what can be seen from points, each within its range: `observers` holds 8 numbers per observer
626
645
  * (16 at most): longitude, latitude (degrees), metres above the ground, range (metres), then to look one way
@@ -680,6 +699,11 @@ export class Engine {
680
699
  * A region of the icon atlas: `width` × `height` RGBA texels (premultiplied) at (`x`, `y`)
681
700
  */
682
701
  updateIconAtlas(x: number, y: number, width: number, height: number, data: Uint8Array): void;
702
+ /**
703
+ * Uploads a part more of the blocks of tile `key` of a vector tile layer (a large tile's, a part at a time over
704
+ * several frames); whether some are left. Its blocks are drawn once they are all there
705
+ */
706
+ uploadVectorTile(id: number, key: number): boolean;
683
707
  /**
684
708
  * Vector tiles (512 CSS pixels across at their level, as `MapLibre`'s) for the view of the last frame (else the
685
709
  * camera's), levels `min_z` to `max_z`, three numbers per tile (z, x, y), the nearest to the eye first: what a
@@ -746,7 +770,8 @@ export interface InitOutput {
746
770
  readonly engine_setCircleAlignment: (a: number, b: number, c: number) => void;
747
771
  readonly engine_setCircles: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
748
772
  readonly engine_setExtrusionAnchors: (a: number, b: number, c: number, d: number, e: number) => [number, number];
749
- readonly engine_setExtrusionBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number];
773
+ readonly engine_setExtrusionBatch: (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) => [number, number];
774
+ readonly engine_setFacades: (a: number, b: number, c: number) => void;
750
775
  readonly engine_setFeatureLayer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
751
776
  readonly engine_setFeatureMask: (a: number, b: number, c: number, d: number, e: number) => void;
752
777
  readonly engine_setFeatureRamp: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
@@ -782,12 +807,13 @@ export interface InitOutput {
782
807
  readonly engine_setSky: (a: number, b: number) => void;
783
808
  readonly engine_setSun: (a: number, b: number, c: number, d: number, e: number) => [number, number];
784
809
  readonly engine_setSwipe: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
785
- readonly engine_setSymbolLayer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
786
- 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];
810
+ readonly engine_setSymbolLayer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
811
+ readonly engine_setSymbols: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number];
787
812
  readonly engine_setTerrain: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
788
- 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;
789
- 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];
813
+ 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, q: number, r: number, s: number, t: number, u: number, v: number) => void;
814
+ 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, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number) => [number, number];
790
815
  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];
816
+ readonly engine_setVectorTilePoints: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
791
817
  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];
792
818
  readonly engine_setZoomRange: (a: number, b: number, c: number) => void;
793
819
  readonly engine_stats: (a: number) => any;
@@ -798,6 +824,7 @@ export interface InitOutput {
798
824
  readonly engine_updateGlyphPage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
799
825
  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];
800
826
  readonly engine_updateIconAtlas: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
827
+ readonly engine_uploadVectorTile: (a: number, b: number, c: number) => number;
801
828
  readonly engine_vectorTilesInView: (a: number, b: number, c: number) => [number, number];
802
829
  readonly engine_wantedTiles: (a: number, b: number) => [number, number];
803
830
  readonly engine_zoomAt: (a: number, b: number, c: number, d: number) => void;