isard 1.5.0 → 1.7.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 (159) hide show
  1. package/CHANGELOG.md +213 -1
  2. package/README.md +3 -2
  3. package/dist/basemap/furniture.d.ts +26 -0
  4. package/dist/basemap/furniture.js +95 -0
  5. package/dist/basemap/furniture.js.map +1 -0
  6. package/dist/basemap/meshes.d.ts +21 -0
  7. package/dist/basemap/meshes.js +159 -0
  8. package/dist/basemap/meshes.js.map +1 -0
  9. package/dist/basemap/placed.d.ts +13 -0
  10. package/dist/basemap/placed.js +14 -0
  11. package/dist/basemap/placed.js.map +1 -0
  12. package/dist/basemap/trees.d.ts +25 -8
  13. package/dist/basemap/trees.js +77 -105
  14. package/dist/basemap/trees.js.map +1 -1
  15. package/dist/basemap/vectorstyle.d.ts +9 -3
  16. package/dist/basemap/vectorstyle.js +5 -6
  17. package/dist/basemap/vectorstyle.js.map +1 -1
  18. package/dist/basemap/vectortiles/context.d.ts +7 -2
  19. package/dist/basemap/vectortiles/context.js.map +1 -1
  20. package/dist/basemap/vectortiles/extrusions.d.ts +4 -0
  21. package/dist/basemap/vectortiles/extrusions.js +9 -3
  22. package/dist/basemap/vectortiles/extrusions.js.map +1 -1
  23. package/dist/basemap/vectortiles/furniture.d.ts +19 -0
  24. package/dist/basemap/vectortiles/furniture.js +29 -0
  25. package/dist/basemap/vectortiles/furniture.js.map +1 -0
  26. package/dist/basemap/vectortiles/labels.d.ts +3 -0
  27. package/dist/basemap/vectortiles/labels.js +50 -18
  28. package/dist/basemap/vectortiles/labels.js.map +1 -1
  29. package/dist/basemap/vectortiles/lamps.d.ts +23 -0
  30. package/dist/basemap/vectortiles/lamps.js +25 -0
  31. package/dist/basemap/vectortiles/lamps.js.map +1 -0
  32. package/dist/basemap/vectortiles/placed.d.ts +38 -0
  33. package/dist/basemap/vectortiles/placed.js +143 -0
  34. package/dist/basemap/vectortiles/placed.js.map +1 -0
  35. package/dist/basemap/vectortiles/requests.d.ts +4 -0
  36. package/dist/basemap/vectortiles/requests.js +15 -2
  37. package/dist/basemap/vectortiles/requests.js.map +1 -1
  38. package/dist/basemap/vectortiles/street-wind.js +4 -6
  39. package/dist/basemap/vectortiles/street-wind.js.map +1 -1
  40. package/dist/basemap/vectortiles/trees.d.ts +2 -0
  41. package/dist/basemap/vectortiles/trees.js +40 -86
  42. package/dist/basemap/vectortiles/trees.js.map +1 -1
  43. package/dist/basemap/vectortiles/vectors.d.ts +16 -0
  44. package/dist/basemap/vectortiles/vectors.js +76 -11
  45. package/dist/basemap/vectortiles/vectors.js.map +1 -1
  46. package/dist/basemap/vectortiles.d.ts +37 -7
  47. package/dist/basemap/vectortiles.js +78 -17
  48. package/dist/basemap/vectortiles.js.map +1 -1
  49. package/dist/basemap/wmts.js +2 -2
  50. package/dist/basemap/wmts.js.map +1 -1
  51. package/dist/basemap.worker.js +2 -2
  52. package/dist/basemap.worker.js.map +19 -13
  53. package/dist/bind/layers.js +1 -0
  54. package/dist/bind/layers.js.map +1 -1
  55. package/dist/data/collada.d.ts +19 -0
  56. package/dist/data/collada.js +305 -0
  57. package/dist/data/collada.js.map +1 -0
  58. package/dist/data/crs.js +1 -1
  59. package/dist/data/crs.js.map +1 -1
  60. package/dist/data/ifc.d.ts +100 -0
  61. package/dist/data/ifc.js +371 -0
  62. package/dist/data/ifc.js.map +1 -0
  63. package/dist/decoder.worker.js +5 -5
  64. package/dist/decoder.worker.js.map +3 -3
  65. package/dist/formats.d.ts +7 -2
  66. package/dist/formats.js +7 -2
  67. package/dist/formats.js.map +1 -1
  68. package/dist/geoplateforme.d.ts +14 -2
  69. package/dist/geoplateforme.js +24 -2
  70. package/dist/geoplateforme.js.map +1 -1
  71. package/dist/index.d.ts +11 -3
  72. package/dist/index.js +8 -3
  73. package/dist/index.js.map +1 -1
  74. package/dist/isard_bg.wasm +0 -0
  75. package/dist/isard_core_bg.wasm +0 -0
  76. package/dist/isard_grid_bg.wasm +0 -0
  77. package/dist/isard_tess_bg.wasm +0 -0
  78. package/dist/layers/extrusions.d.ts +10 -0
  79. package/dist/layers/extrusions.js +33 -6
  80. package/dist/layers/extrusions.js.map +1 -1
  81. package/dist/layers/features.d.ts +0 -2
  82. package/dist/layers/features.js +5 -6
  83. package/dist/layers/features.js.map +1 -1
  84. package/dist/layers/layers.d.ts +14 -0
  85. package/dist/layers/layers.js +55 -1
  86. package/dist/layers/layers.js.map +1 -1
  87. package/dist/layers/panoramas.d.ts +32 -10
  88. package/dist/layers/panoramas.js +55 -28
  89. package/dist/layers/panoramas.js.map +1 -1
  90. package/dist/layers/photos.d.ts +48 -0
  91. package/dist/layers/photos.js +139 -0
  92. package/dist/layers/photos.js.map +1 -0
  93. package/dist/layers/symbols.d.ts +5 -1
  94. package/dist/layers/symbols.js +111 -32
  95. package/dist/layers/symbols.js.map +1 -1
  96. package/dist/layers/trees.d.ts +28 -0
  97. package/dist/layers/trees.js +51 -0
  98. package/dist/layers/trees.js.map +1 -0
  99. package/dist/layers/vectors.d.ts +29 -2
  100. package/dist/layers/vectors.js +98 -9
  101. package/dist/layers/vectors.js.map +1 -1
  102. package/dist/map/frame-loop.d.ts +2 -0
  103. package/dist/map/frame-loop.js +3 -3
  104. package/dist/map/frame-loop.js.map +1 -1
  105. package/dist/map/layer-spec.d.ts +3 -0
  106. package/dist/map/layer-spec.js +2 -0
  107. package/dist/map/layer-spec.js.map +1 -1
  108. package/dist/map.d.ts +8 -0
  109. package/dist/map.js +32 -2
  110. package/dist/map.js.map +1 -1
  111. package/dist/panoramax.d.ts +55 -0
  112. package/dist/panoramax.js +97 -0
  113. package/dist/panoramax.js.map +1 -0
  114. package/dist/react/Layer.d.ts +1 -0
  115. package/dist/react/Layer.js.map +1 -1
  116. package/dist/react/VectorGeometry.d.ts +22 -8
  117. package/dist/react/VectorGeometry.js +36 -14
  118. package/dist/react/VectorGeometry.js.map +1 -1
  119. package/dist/react/VectorTiles.d.ts +65 -0
  120. package/dist/react/VectorTiles.js +112 -0
  121. package/dist/react/VectorTiles.js.map +1 -0
  122. package/dist/react/context.d.ts +9 -0
  123. package/dist/react/context.js +32 -0
  124. package/dist/react/context.js.map +1 -1
  125. package/dist/react/index.d.ts +7 -1
  126. package/dist/react/index.js +7 -1
  127. package/dist/react/index.js.map +1 -1
  128. package/dist/types.d.ts +2 -0
  129. package/dist/types.js.map +1 -1
  130. package/dist/util/geo.d.ts +8 -0
  131. package/dist/util/geo.js +8 -0
  132. package/dist/util/geo.js.map +1 -1
  133. package/dist/util/gltf.d.ts +26 -0
  134. package/dist/util/gltf.js +52 -0
  135. package/dist/util/gltf.js.map +1 -0
  136. package/dist/util/roofs.d.ts +18 -0
  137. package/dist/util/roofs.js +44 -0
  138. package/dist/util/roofs.js.map +1 -0
  139. package/dist/util/style-floats.d.ts +33 -0
  140. package/dist/util/style-floats.js +34 -0
  141. package/dist/util/style-floats.js.map +1 -0
  142. package/dist/util/sun.js +1 -1
  143. package/dist/util/sun.js.map +1 -1
  144. package/dist/wasm/isard.d.ts +56 -17
  145. package/dist/wasm/isard.js +128 -18
  146. package/dist/wasm/isard_core.d.ts +44 -17
  147. package/dist/wasm/isard_core.js +104 -18
  148. package/dist/wasm/isard_tess.d.ts +6 -3
  149. package/dist/wasm/isard_tess.js +27 -4
  150. package/dist/workers/basemap/furniture.d.ts +13 -0
  151. package/dist/workers/basemap/geometry.d.ts +35 -22
  152. package/dist/workers/basemap/labels.d.ts +18 -2
  153. package/dist/workers/basemap/lamps.d.ts +10 -0
  154. package/dist/workers/basemap/tiles.d.ts +2 -0
  155. package/dist/workers/basemap/trees.d.ts +6 -1
  156. package/dist/workers/basemap.worker.d.ts +58 -2
  157. package/dist/workers/basemap.worker.js +26 -3
  158. package/dist/workers/basemap.worker.js.map +1 -1
  159. package/package.json +1 -1
@@ -632,7 +632,7 @@ export class Engine {
632
632
  }
633
633
  /**
634
634
  * Adds or replaces batch `key` of an extrusion layer: polygons as for `addFills`, `feature_count` features (the
635
- * feature style gives each its height and base height as its two sizes, metres)
635
+ * feature style gives each its height and base height as its two sizes, metres), each polygon's roof (`Roofs`)
636
636
  *
637
637
  * # Errors
638
638
  *
@@ -645,8 +645,11 @@ export class Engine {
645
645
  * @param {Uint32Array} polygon_start
646
646
  * @param {Uint32Array} feature
647
647
  * @param {number} feature_count
648
+ * @param {Uint8Array} roofs
649
+ * @param {Float32Array} roof_heights
650
+ * @param {number} metres
648
651
  */
649
- setExtrusionBatch(id, key, points, ring_start, polygon_start, feature, feature_count) {
652
+ setExtrusionBatch(id, key, points, ring_start, polygon_start, feature, feature_count, roofs, roof_heights, metres) {
650
653
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
651
654
  const len0 = WASM_VECTOR_LEN;
652
655
  const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
@@ -655,11 +658,23 @@ export class Engine {
655
658
  const len2 = WASM_VECTOR_LEN;
656
659
  const ptr3 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
657
660
  const len3 = WASM_VECTOR_LEN;
658
- const ret = wasm.engine_setExtrusionBatch(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, feature_count);
661
+ const ptr4 = passArray8ToWasm0(roofs, wasm.__wbindgen_malloc);
662
+ const len4 = WASM_VECTOR_LEN;
663
+ const ptr5 = passArrayF32ToWasm0(roof_heights, wasm.__wbindgen_malloc);
664
+ const len5 = WASM_VECTOR_LEN;
665
+ 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);
659
666
  if (ret[1]) {
660
667
  throw takeFromExternrefTable0(ret[0]);
661
668
  }
662
669
  }
670
+ /**
671
+ * Whether the buildings of an extrusion layer, or of a vector tiles layer, show their windows on their walls
672
+ * @param {number} id
673
+ * @param {boolean} on
674
+ */
675
+ setFacades(id, on) {
676
+ wasm.engine_setFacades(this.__wbg_ptr, id, on);
677
+ }
663
678
  /**
664
679
  * Layer-wide style of a feature layer: opacity as zoom stops (four zooms then four values), the zoom range it
665
680
  * shows in (`min_zoom` included, `max_zoom` excluded), whether it shows at all
@@ -1138,25 +1153,27 @@ export class Engine {
1138
1153
  }
1139
1154
  /**
1140
1155
  * Layer-wide style of a symbol layer: size scale and opacity as zoom stops (four zooms then four values each),
1141
- * zoom range, visibility
1156
+ * zoom range, visibility, hidden by the buildings
1142
1157
  * @param {number} id
1143
1158
  * @param {Float32Array} size
1144
1159
  * @param {Float32Array} opacity
1145
1160
  * @param {number} min_zoom
1146
1161
  * @param {number} max_zoom
1147
1162
  * @param {boolean} visible
1163
+ * @param {boolean} occluded
1148
1164
  */
1149
- setSymbolLayer(id, size, opacity, min_zoom, max_zoom, visible) {
1165
+ setSymbolLayer(id, size, opacity, min_zoom, max_zoom, visible, occluded) {
1150
1166
  const ptr0 = passArrayF32ToWasm0(size, wasm.__wbindgen_malloc);
1151
1167
  const len0 = WASM_VECTOR_LEN;
1152
1168
  const ptr1 = passArrayF32ToWasm0(opacity, wasm.__wbindgen_malloc);
1153
1169
  const len1 = WASM_VECTOR_LEN;
1154
- wasm.engine_setSymbolLayer(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, min_zoom, max_zoom, visible);
1170
+ wasm.engine_setSymbolLayer(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, min_zoom, max_zoom, visible, occluded);
1155
1171
  }
1156
1172
  /**
1157
1173
  * Labels of a symbol layer, shaped by the page: anchors (Mercator, interleaved), their texts' boxes (min x, min y,
1158
- * max x, max y, CSS pixels from the anchor), styles (36 floats each, see `LABEL_FLOATS`) and glyph and icon quads
1159
- * (11 floats each, see `QUAD_FLOATS`)
1174
+ * max x, max y, CSS pixels from the anchor), styles (37 floats each, see `LABEL_FLOATS`), glyph and icon quads
1175
+ * (11 floats each, see `QUAD_FLOATS`) and the lines their curved texts follow (`paths`: for each label, its number
1176
+ * of points, the index of its anchor among them, then the points, Mercator; 0, 0 and none for the others)
1160
1177
  *
1161
1178
  * # Errors
1162
1179
  *
@@ -1167,8 +1184,9 @@ export class Engine {
1167
1184
  * @param {Float32Array} boxes
1168
1185
  * @param {Float32Array} styles
1169
1186
  * @param {Float32Array} quads
1187
+ * @param {Float64Array} paths
1170
1188
  */
1171
- setSymbols(id, anchors, boxes, styles, quads) {
1189
+ setSymbols(id, anchors, boxes, styles, quads, paths) {
1172
1190
  const ptr0 = passArrayF64ToWasm0(anchors, wasm.__wbindgen_malloc);
1173
1191
  const len0 = WASM_VECTOR_LEN;
1174
1192
  const ptr1 = passArrayF32ToWasm0(boxes, wasm.__wbindgen_malloc);
@@ -1177,7 +1195,9 @@ export class Engine {
1177
1195
  const len2 = WASM_VECTOR_LEN;
1178
1196
  const ptr3 = passArrayF32ToWasm0(quads, wasm.__wbindgen_malloc);
1179
1197
  const len3 = WASM_VECTOR_LEN;
1180
- const ret = wasm.engine_setSymbols(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1198
+ const ptr4 = passArrayF64ToWasm0(paths, wasm.__wbindgen_malloc);
1199
+ const len4 = WASM_VECTOR_LEN;
1200
+ const ret = wasm.engine_setSymbols(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
1181
1201
  if (ret[1]) {
1182
1202
  throw takeFromExternrefTable0(ret[0]);
1183
1203
  }
@@ -1210,11 +1230,15 @@ export class Engine {
1210
1230
  }
1211
1231
  }
1212
1232
  /**
1213
- * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion), its zoom range
1233
+ * The style layers of a vector tile layer, in drawing order: per layer, its kind (0 fill, 1 line, 2 extrusion, 3
1234
+ * circle), its zoom range
1214
1235
  * (two numbers: shown from the first, included, to the second, excluded), whether it shows (0 or 1), its dashes
1215
1236
  * (four numbers: dash, gap, dash, gap, in line widths; 0: solid), its opacity as zoom stops (four zooms then four
1216
1237
  * values; missing: opaque), the caps of its lines' ends (0 butt, 1 round, 2 square; missing: round), whether its
1217
- * lines glow at night (streets; 0 or 1)
1238
+ * lines glow at night (streets; 0 or 1), the joins of its lines (two numbers: 0 round, 1 miter, 2 bevel, then the
1239
+ * miter limit in line widths; missing: round), the translation of its fills or lines (three numbers: x and y in CSS
1240
+ * 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
1241
+ * fills have patterns (0 or 1)
1218
1242
  * @param {number} id
1219
1243
  * @param {Uint8Array} kinds
1220
1244
  * @param {Float64Array} zooms
@@ -1223,8 +1247,11 @@ export class Engine {
1223
1247
  * @param {Float32Array} opacities
1224
1248
  * @param {Uint8Array} caps
1225
1249
  * @param {Uint8Array} lit
1250
+ * @param {Float32Array} joins
1251
+ * @param {Float32Array} translates
1252
+ * @param {Uint8Array} patterned
1226
1253
  */
1227
- setVectorSublayers(id, kinds, zooms, visible, dashes, opacities, caps, lit) {
1254
+ setVectorSublayers(id, kinds, zooms, visible, dashes, opacities, caps, lit, joins, translates, patterned) {
1228
1255
  const ptr0 = passArray8ToWasm0(kinds, wasm.__wbindgen_malloc);
1229
1256
  const len0 = WASM_VECTOR_LEN;
1230
1257
  const ptr1 = passArrayF64ToWasm0(zooms, wasm.__wbindgen_malloc);
@@ -1239,7 +1266,13 @@ export class Engine {
1239
1266
  const len5 = WASM_VECTOR_LEN;
1240
1267
  const ptr6 = passArray8ToWasm0(lit, wasm.__wbindgen_malloc);
1241
1268
  const len6 = WASM_VECTOR_LEN;
1242
- wasm.engine_setVectorSublayers(this.__wbg_ptr, id, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
1269
+ const ptr7 = passArrayF32ToWasm0(joins, wasm.__wbindgen_malloc);
1270
+ const len7 = WASM_VECTOR_LEN;
1271
+ const ptr8 = passArrayF32ToWasm0(translates, wasm.__wbindgen_malloc);
1272
+ const len8 = WASM_VECTOR_LEN;
1273
+ const ptr9 = passArray8ToWasm0(patterned, wasm.__wbindgen_malloc);
1274
+ const len9 = WASM_VECTOR_LEN;
1275
+ 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);
1243
1276
  }
1244
1277
  /**
1245
1278
  * Adds or replaces tile `key` of a vector tile layer ready for the GPU, as the basemap workers make it (the
@@ -1311,13 +1344,36 @@ export class Engine {
1311
1344
  throw takeFromExternrefTable0(ret[0]);
1312
1345
  }
1313
1346
  }
1347
+ /**
1348
+ * The points of tile `key` of a vector tile layer, after the tile itself (`setVectorTile`, `setVectorTileMesh`):
1349
+ * Mercator, interleaved, each with its feature (styled as a circle's: a color, a radius and a stroke width, then the
1350
+ * stroke's color), `start` the first point of each sublayer and the end; the circle sublayers draw theirs
1351
+ * @param {number} id
1352
+ * @param {number} key
1353
+ * @param {Float64Array} points
1354
+ * @param {Uint32Array} feature
1355
+ * @param {Uint32Array} start
1356
+ */
1357
+ setVectorTilePoints(id, key, points, feature, start) {
1358
+ const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1359
+ const len0 = WASM_VECTOR_LEN;
1360
+ const ptr1 = passArray32ToWasm0(feature, wasm.__wbindgen_malloc);
1361
+ const len1 = WASM_VECTOR_LEN;
1362
+ const ptr2 = passArray32ToWasm0(start, wasm.__wbindgen_malloc);
1363
+ const len2 = WASM_VECTOR_LEN;
1364
+ wasm.engine_setVectorTilePoints(this.__wbg_ptr, id, key, ptr0, len0, ptr1, len1, ptr2, len2);
1365
+ }
1314
1366
  /**
1315
1367
  * Adds or replaces tile `key` of a vector tile layer: its polygons as for `addFills` (`fill_start`: the first
1316
1368
  * polygon of each sublayer, and the end; those of an extrusion sublayer raised into blocks), its lines as for
1317
1369
  * `addLines` (`line_start`: the first line of each sublayer, and the end), `feature_count` features, styled as an
1318
1370
  * extrusion layer's (`setFeatureStyle` with the key: a color, then a line's width or a block's height and base);
1319
1371
  * `tile`: the corners of the tile they are cut to (west, north, east, south; empty: none), along whose edges no
1320
- * wall of a block rises
1372
+ * wall of a block rises; `roofs` and `roof_heights`: per polygon, the shape and height of its block's roof
1373
+ * (`shapes::Roofs`: 0 flat, 1 to 5 `RoofShape::number`, 255 generated from its outline; metres, not a number: as
1374
+ * its slopes make it; empty: flat), the whole outlines of the buildings the tile cuts (`roof_outlines`, interleaved
1375
+ * Mercator points, `roof_outline_start`: where each polygon's starts, and the end), `roof_metres` the metres per
1376
+ * Mercator unit at the tile
1321
1377
  *
1322
1378
  * # Errors
1323
1379
  *
@@ -1336,8 +1392,13 @@ export class Engine {
1336
1392
  * @param {Uint32Array} line_start
1337
1393
  * @param {number} feature_count
1338
1394
  * @param {Float64Array} tile
1395
+ * @param {Uint8Array} roofs
1396
+ * @param {Float32Array} roof_heights
1397
+ * @param {Float64Array} roof_outlines
1398
+ * @param {Uint32Array} roof_outline_start
1399
+ * @param {number} roof_metres
1339
1400
  */
1340
- setVectorTile(id, key, points, ring_start, polygon_start, polygon_feature, fill_start, line_points, line_first, line_feature, line_start, feature_count, tile) {
1401
+ 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) {
1341
1402
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
1342
1403
  const len0 = WASM_VECTOR_LEN;
1343
1404
  const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
@@ -1358,7 +1419,15 @@ export class Engine {
1358
1419
  const len8 = WASM_VECTOR_LEN;
1359
1420
  const ptr9 = passArrayF64ToWasm0(tile, wasm.__wbindgen_malloc);
1360
1421
  const len9 = WASM_VECTOR_LEN;
1361
- 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);
1422
+ const ptr10 = passArray8ToWasm0(roofs, wasm.__wbindgen_malloc);
1423
+ const len10 = WASM_VECTOR_LEN;
1424
+ const ptr11 = passArrayF32ToWasm0(roof_heights, wasm.__wbindgen_malloc);
1425
+ const len11 = WASM_VECTOR_LEN;
1426
+ const ptr12 = passArrayF64ToWasm0(roof_outlines, wasm.__wbindgen_malloc);
1427
+ const len12 = WASM_VECTOR_LEN;
1428
+ const ptr13 = passArray32ToWasm0(roof_outline_start, wasm.__wbindgen_malloc);
1429
+ const len13 = WASM_VECTOR_LEN;
1430
+ 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);
1362
1431
  if (ret[1]) {
1363
1432
  throw takeFromExternrefTable0(ret[0]);
1364
1433
  }
@@ -1511,6 +1580,17 @@ export class Engine {
1511
1580
  const len0 = WASM_VECTOR_LEN;
1512
1581
  wasm.engine_updateIconAtlas(this.__wbg_ptr, x, y, width, height, ptr0, len0);
1513
1582
  }
1583
+ /**
1584
+ * 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
1585
+ * several frames); whether some are left. Its blocks are drawn once they are all there
1586
+ * @param {number} id
1587
+ * @param {number} key
1588
+ * @returns {boolean}
1589
+ */
1590
+ uploadVectorTile(id, key) {
1591
+ const ret = wasm.engine_uploadVectorTile(this.__wbg_ptr, id, key);
1592
+ return ret !== 0;
1593
+ }
1514
1594
  /**
1515
1595
  * Vector tiles (512 CSS pixels across at their level, as `MapLibre`'s) for the view of the last frame (else the
1516
1596
  * camera's), levels `min_z` to `max_z`, three numbers per tile (z, x, y), the nearest to the eye first: what a
@@ -1682,6 +1762,12 @@ function __wbg_get_imports() {
1682
1762
  __wbg_bufferData_bad7ce562b6a9eac: function(arg0, arg1, arg2, arg3) {
1683
1763
  arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1684
1764
  },
1765
+ __wbg_bufferSubData_22c4c420e0f67cda: function(arg0, arg1, arg2, arg3) {
1766
+ arg0.bufferSubData(arg1 >>> 0, arg2, arg3);
1767
+ },
1768
+ __wbg_bufferSubData_8609cd8a2c013181: function(arg0, arg1, arg2, arg3) {
1769
+ arg0.bufferSubData(arg1 >>> 0, arg2, arg3);
1770
+ },
1685
1771
  __wbg_byteLength_27689b065d089962: function(arg0) {
1686
1772
  const ret = arg0.byteLength;
1687
1773
  return ret;
@@ -2550,7 +2636,7 @@ function __wbg_get_imports() {
2550
2636
  return ret;
2551
2637
  },
2552
2638
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
2553
- // 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`.
2639
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 116, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2554
2640
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
2555
2641
  return ret;
2556
2642
  },
@@ -58,17 +58,20 @@ export class TessellatedTile {
58
58
  * (interleaved points, `ring_start`, `polygon_start`, the feature of each, `fill_start`: the first polygon of each
59
59
  * sublayer and the end), its lines (interleaved points, `line_first`: the first point of each, the feature of each,
60
60
  * `line_start`: the first line of each sublayer and the end); `raised`: per sublayer, whether its polygons are extruded
61
- * into blocks rather than filled; `prism`: with the prisms the fills need over the relief; `tile`: the corners of the
61
+ * into blocks rather than filled; `roofs` and `roof_heights`: per polygon, the shape and height of its block's roof
62
+ * (`shapes::Roofs`; empty: flat), the whole outlines of the buildings the tile cuts (`roof_outlines`, interleaved
63
+ * Mercator points, `roof_outline_start`: where each polygon's starts, and the end), `roof_metres` the metres per
64
+ * Mercator unit at the tile; `prism`: with the prisms the fills need over the relief; `tile`: the corners of the
62
65
  * tile they are cut to (west, north, east, south, Mercator; empty: none), along whose edges no wall of a block rises
63
66
  */
64
- export function tessellateVectorTile(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, raised: Uint8Array, prism: boolean, tile: Float64Array): TessellatedTile;
67
+ export function tessellateVectorTile(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, raised: Uint8Array, roofs: Uint8Array, roof_heights: Float32Array, roof_outlines: Float64Array, roof_outline_start: Uint32Array, roof_metres: number, prism: boolean, tile: Float64Array): TessellatedTile;
65
68
 
66
69
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
67
70
 
68
71
  export interface InitOutput {
69
72
  readonly memory: WebAssembly.Memory;
70
73
  readonly __wbg_tessellatedtile_free: (a: number, b: number) => void;
71
- readonly tessellateVectorTile: (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) => number;
74
+ readonly tessellateVectorTile: (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) => number;
72
75
  readonly tessellatedtile_blockIndices: (a: number) => any;
73
76
  readonly tessellatedtile_blockRanges: (a: number) => [number, number];
74
77
  readonly tessellatedtile_blocks: (a: number) => any;
@@ -124,7 +124,10 @@ if (Symbol.dispose) TessellatedTile.prototype[Symbol.dispose] = TessellatedTile.
124
124
  * (interleaved points, `ring_start`, `polygon_start`, the feature of each, `fill_start`: the first polygon of each
125
125
  * sublayer and the end), its lines (interleaved points, `line_first`: the first point of each, the feature of each,
126
126
  * `line_start`: the first line of each sublayer and the end); `raised`: per sublayer, whether its polygons are extruded
127
- * into blocks rather than filled; `prism`: with the prisms the fills need over the relief; `tile`: the corners of the
127
+ * into blocks rather than filled; `roofs` and `roof_heights`: per polygon, the shape and height of its block's roof
128
+ * (`shapes::Roofs`; empty: flat), the whole outlines of the buildings the tile cuts (`roof_outlines`, interleaved
129
+ * Mercator points, `roof_outline_start`: where each polygon's starts, and the end), `roof_metres` the metres per
130
+ * Mercator unit at the tile; `prism`: with the prisms the fills need over the relief; `tile`: the corners of the
128
131
  * tile they are cut to (west, north, east, south, Mercator; empty: none), along whose edges no wall of a block rises
129
132
  * @param {Float64Array} points
130
133
  * @param {Uint32Array} ring_start
@@ -136,11 +139,16 @@ if (Symbol.dispose) TessellatedTile.prototype[Symbol.dispose] = TessellatedTile.
136
139
  * @param {Uint32Array} line_feature
137
140
  * @param {Uint32Array} line_start
138
141
  * @param {Uint8Array} raised
142
+ * @param {Uint8Array} roofs
143
+ * @param {Float32Array} roof_heights
144
+ * @param {Float64Array} roof_outlines
145
+ * @param {Uint32Array} roof_outline_start
146
+ * @param {number} roof_metres
139
147
  * @param {boolean} prism
140
148
  * @param {Float64Array} tile
141
149
  * @returns {TessellatedTile}
142
150
  */
143
- export function tessellateVectorTile(points, ring_start, polygon_start, polygon_feature, fill_start, line_points, line_first, line_feature, line_start, raised, prism, tile) {
151
+ export function tessellateVectorTile(points, ring_start, polygon_start, polygon_feature, fill_start, line_points, line_first, line_feature, line_start, raised, roofs, roof_heights, roof_outlines, roof_outline_start, roof_metres, prism, tile) {
144
152
  const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
145
153
  const len0 = WASM_VECTOR_LEN;
146
154
  const ptr1 = passArray32ToWasm0(ring_start, wasm.__wbindgen_malloc);
@@ -161,9 +169,17 @@ export function tessellateVectorTile(points, ring_start, polygon_start, polygon_
161
169
  const len8 = WASM_VECTOR_LEN;
162
170
  const ptr9 = passArray8ToWasm0(raised, wasm.__wbindgen_malloc);
163
171
  const len9 = WASM_VECTOR_LEN;
164
- const ptr10 = passArrayF64ToWasm0(tile, wasm.__wbindgen_malloc);
172
+ const ptr10 = passArray8ToWasm0(roofs, wasm.__wbindgen_malloc);
165
173
  const len10 = WASM_VECTOR_LEN;
166
- const ret = wasm.tessellateVectorTile(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, ptr9, len9, prism, ptr10, len10);
174
+ const ptr11 = passArrayF32ToWasm0(roof_heights, wasm.__wbindgen_malloc);
175
+ const len11 = WASM_VECTOR_LEN;
176
+ const ptr12 = passArrayF64ToWasm0(roof_outlines, wasm.__wbindgen_malloc);
177
+ const len12 = WASM_VECTOR_LEN;
178
+ const ptr13 = passArray32ToWasm0(roof_outline_start, wasm.__wbindgen_malloc);
179
+ const len13 = WASM_VECTOR_LEN;
180
+ const ptr14 = passArrayF64ToWasm0(tile, wasm.__wbindgen_malloc);
181
+ const len14 = WASM_VECTOR_LEN;
182
+ const ret = wasm.tessellateVectorTile(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, ptr9, len9, ptr10, len10, ptr11, len11, ptr12, len12, ptr13, len13, roof_metres, prism, ptr14, len14);
167
183
  return TessellatedTile.__wrap(ret);
168
184
  }
169
185
  function __wbg_get_imports() {
@@ -274,6 +290,13 @@ function passArray8ToWasm0(arg, malloc) {
274
290
  return ptr;
275
291
  }
276
292
 
293
+ function passArrayF32ToWasm0(arg, malloc) {
294
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
295
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
296
+ WASM_VECTOR_LEN = arg.length;
297
+ return ptr;
298
+ }
299
+
277
300
  function passArrayF64ToWasm0(arg, malloc) {
278
301
  const ptr = malloc(arg.length * 8, 8) >>> 0;
279
302
  getFloat64ArrayMemory0().set(arg, ptr / 8);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The street furniture of a tile, from OpenMapTiles' layers: its points of interest of the street where they stand
3
+ * (bus stops' shelters, waste baskets, post boxes, drinking fountains, bicycle racks), each facing the nearest street;
4
+ * benches along the pedestrian streets and the paths of the parks and gardens. The same each time the tile is cut
5
+ */
6
+ import type { Priority } from '../basemap.worker.ts';
7
+ import { type Renderer } from './tiles.ts';
8
+ /**
9
+ * The street furniture of a tile: longitude, latitude, scale, heading (degrees, facing its street or path), rank (in
10
+ * [0, 1): the page keeps the lowest far from the view) and kind (`FURNITURE`' index) of each, as things placed
11
+ * (`PLACED_NUMBERS`); past `maxObjects`, thinned evenly
12
+ */
13
+ export declare const furniture: (r: Renderer, z: number, x: number, y: number, id: number, maxObjects: number, priority?: Priority) => Promise<Float64Array<ArrayBufferLike> | undefined>;
@@ -1,7 +1,9 @@
1
1
  /** A vector tile cut into geometry for the engine: the polygons of the extrusions, the fills, lines and buildings of
2
2
  * `vectors()` with their style per feature, made ready for the GPU by the tessellation module */
3
- import type { Value } from '../../basemap/mvt.ts';
4
- import type { Priority, TileMesh, TileVectors } from '../basemap.worker.ts';
3
+ import type { TileFeature, Value } from '../../basemap/mvt.ts';
4
+ import { type StyleLayer } from '../../basemap/vectorstyle.ts';
5
+ import { type RoofMode } from '../../util/roofs.ts';
6
+ import type { Priority, TileMesh, TileStyles, TileVectors } from '../basemap.worker.ts';
5
7
  import { type Renderer } from './tiles.ts';
6
8
  /**
7
9
  * The polygons of a tile's features in the renderer's fill layers (each feature once, whichever layers keep it), in
@@ -17,11 +19,39 @@ export declare const polygons: (r: Renderer, z: number, x: number, y: number, id
17
19
  };
18
20
  properties: Record<string, Value>[];
19
21
  } | undefined>;
22
+ /** The landmarks of a tile: its points of interest of `LANDMARKS` (x, y interleaved, tile units) */
23
+ export declare const landmarksOf: (layers: Map<string, {
24
+ features: TileFeature[];
25
+ }> | undefined) => number[];
26
+ /** Whether a building's rings (tile units) hold one of the landmarks' points */
27
+ export declare const holdsLandmark: (rings: readonly (readonly number[])[], points: readonly number[]) => boolean;
28
+ /**
29
+ * The buildings of a layer that are landmarks: those holding a landmark's point (`holdsLandmark`), and the parts of
30
+ * those (a building whose middle is inside one of them, or that holds one's middle: the stage tower, the dome). Their
31
+ * walls along each other drawn alike, not one floodlit fighting a dark one as the view moves; a neighbour against a
32
+ * landmark's wall, its middle outside, is none
33
+ */
34
+ export declare const landmarkBuildings: (features: readonly TileFeature[], points: readonly number[]) => Set<TileFeature>;
35
+ /** A building's roof for the engine: its shape's number (`roofShapeOf`; 0 none) and height (`roofHeightOf`) */
36
+ export declare const roofOf: (properties: Record<string, Value>, mode: RoofMode) => [number, number];
37
+ /**
38
+ * The zooms a feature shows over by its layer's filter, as MapLibre evaluates a filter (at the whole zoom under the
39
+ * camera's): its filter at each whole zoom of the range a tile of level `z` is drawn over (`z - 1` to `last`), from
40
+ * the first where it holds to past the last (open at the ends of the range, `[0, 0]` for a filter that does not read
41
+ * the zoom); undefined if it holds at none
42
+ */
43
+ export declare const filterZooms: (layer: StyleLayer, feature: TileFeature, z: number, last: number) => [number, number] | undefined;
20
44
  /**
21
45
  * A ring cut to the square [0, `extent`] (Sutherland–Hodgman), its points interleaved, unclosed: a polygon lying
22
46
  * across the tile's edge keeps its part in the tile, along the edge
23
47
  */
24
48
  export declare const clipRing: (ring: readonly number[], extent: number) => number[];
49
+ /**
50
+ * A line with the points dropped that lie within `tolerance` of the line through their neighbours kept (Douglas–
51
+ * Peucker): a sequence of photos every few metres (Panoramax's) drawn as many pieces under a pixel, each as wide as the
52
+ * line, covered a pixel ten times over
53
+ */
54
+ export declare const simplifyLine: (line: readonly number[], tolerance: number) => number[];
25
55
  /** A line cut to the square [0, `extent`] (Liang–Barsky per segment): its runs inside, each two points at least */
26
56
  export declare const clipLine: (line: readonly number[], extent: number) => number[][];
27
57
  /**
@@ -36,30 +66,13 @@ export declare const overzoomed: (geometry: readonly (readonly number[])[], exte
36
66
  * zooms over the range the tile is drawn at); with `stylesOnly`, the styles alone. Patterns, outlines and circles are
37
67
  * left to the raster path
38
68
  */
39
- export declare const vectors: (r: Renderer, { z, x, y, deepest }: {
69
+ export declare const vectors: (r: Renderer, { z, x, y, deepest, roofs: roofMode, }: {
40
70
  z: number;
41
71
  x: number;
42
72
  y: number;
43
73
  deepest?: number;
44
- }, id: number, stylesOnly: boolean, priority?: Priority) => Promise<Float32Array<ArrayBuffer> | {
45
- fills: {
46
- points: Float64Array<ArrayBuffer>;
47
- ringStart: Uint32Array<ArrayBuffer>;
48
- polygonStart: Uint32Array<ArrayBuffer>;
49
- feature: Uint32Array<ArrayBuffer>;
50
- fillStart: Uint32Array<ArrayBuffer>;
51
- };
52
- lines: {
53
- points: Float64Array<ArrayBuffer>;
54
- start: Uint32Array<ArrayBuffer>;
55
- feature: Uint32Array<ArrayBuffer>;
56
- lineStart: Uint32Array<ArrayBuffer>;
57
- };
58
- styles: Float32Array<ArrayBuffer>;
59
- tile: Float64Array<ArrayBuffer>;
60
- properties: Record<string, Value>[];
61
- sublayer: Uint16Array<ArrayBuffer>;
62
- } | undefined>;
74
+ roofs?: RoofMode;
75
+ }, id: number, stylesOnly: boolean, priority?: Priority) => Promise<TileVectors | TileStyles | undefined>;
63
76
  /** The tessellation module: where it is, and once loaded whether it works (false: the main thread does its work) */
64
77
  export declare const tess: {
65
78
  url?: string;
@@ -1,8 +1,24 @@
1
1
  /** The label candidates of a tile: the texts and icons of the style's symbol layers, for the page to shape and place */
2
+ import type { TileFeature } from '../../basemap/mvt.ts';
2
3
  import { type LabelCandidate } from '../../basemap/vectorstyle.ts';
3
4
  import type { Priority } from '../basemap.worker.ts';
4
5
  import { type Renderer } from './tiles.ts';
5
6
  /** Points every `spacing` along a line (tile units, x and y interleaved), the first half a spacing in (the middle of a
6
- * shorter line): each point and the segment it lies on (x, y, x0, y0, x1, y1) */
7
+ * shorter line): each point, the segment it lies on and how far along the line it is (x, y, x0, y0, x1, y1, the
8
+ * distance) */
7
9
  export declare const lineAnchors: (line: readonly number[], spacing: number) => number[][];
8
- export declare const labels: (r: Renderer, z: number, x: number, y: number, id: number, priority?: Priority, zoom?: number) => Promise<LabelCandidate[]>;
10
+ /** The point `offset` (tile units) beside a line's anchor (`lineAnchors`), the `k`th anchor's on one side of the line,
11
+ * the next one's on the other: x, y and its heading facing the line (degrees; y towards the south in the tile) */
12
+ export declare const besideLine: (anchor: readonly number[], k: number, offset: number) => [x: number, y: number, heading: number];
13
+ /** The part of a line (tile units, interleaved) from `from` to `to` along it (distances from its start) */
14
+ export declare const lineBetween: (line: readonly number[], from: number, to: number) => number[];
15
+ /**
16
+ * The height of the building under a point of a tile (its units), the highest if several: the buildings of the
17
+ * style's `fill-extrusion` layers shown at `zoom`, at their `fill-extrusion-height`; undefined outside them. A label
18
+ * there stands on its roof, not hidden by its walls. The buildings found through a grid of the tile's squares
19
+ */
20
+ export declare const roofsOf: (r: Renderer, layers: Map<string, {
21
+ extent: number;
22
+ features: TileFeature[];
23
+ }>, zoom: number) => ((px: number, py: number) => number | undefined);
24
+ export declare const labels: (r: Renderer, z: number, x: number, y: number, id: number, priority?: Priority, zoom?: number, roofs?: boolean) => Promise<LabelCandidate[]>;
@@ -0,0 +1,10 @@
1
+ /** The street lamps of a tile: points along its streets, on one side then the other, the same each time the tile is cut */
2
+ import type { Priority } from '../basemap.worker.ts';
3
+ import { type Renderer } from './tiles.ts';
4
+ /**
5
+ * Lamps along the lines of the renderer's layers in a tile, `spacing` metres apart along each street, every other
6
+ * one on its other side, as far from its middle as its class says (`SIDE_METRES`): longitude, latitude, scale, heading
7
+ * (degrees, facing the street) and rank (in [0, 1): the page keeps the lowest far from the view) of each, as things
8
+ * placed (`PLACED_NUMBERS`, the kind 0); past `maxLamps`, thinned evenly. A street in several layers has its lamps once
9
+ */
10
+ export declare const lamps: (r: Renderer, z: number, x: number, y: number, id: number, spacing: number, maxLamps: number, priority?: Priority) => Promise<Float64Array<ArrayBufferLike> | undefined>;
@@ -47,6 +47,8 @@ export declare const aborted: Set<number>;
47
47
  export declare const image: (url: string, priority?: Priority) => Promise<ImageBitmap | undefined>;
48
48
  /** A vector tile, decoded (shared by every renderer of its URL); the first request's priority fetches it */
49
49
  export declare const tile: (url: string, priority?: Priority) => Promise<Map<string, TileLayer> | undefined>;
50
+ /** A tile's URL from its source's template */
51
+ export declare const tileUrl: (template: string, z: number, x: number, y: number) => string;
50
52
  /** The vector tile to draw a raster tile from, and where the raster tile lies in it (tile units) */
51
53
  export declare const source: (r: Renderer, z: number, x: number, y: number) => {
52
54
  url: string;
@@ -1,6 +1,9 @@
1
1
  /** The trees of a tile: points scattered over the woods of its polygons, the same each time the tile is cut */
2
2
  import type { Priority } from '../basemap.worker.ts';
3
3
  import { type Renderer } from './tiles.ts';
4
+ /** Things placed (`PLACED_NUMBERS` each), past `max` thinned evenly by their rank: one in so many kept, the
5
+ * same ones each time */
6
+ export declare const thinned: (found: readonly number[], max: number) => Float64Array;
4
7
  /** A number in [0, 1) from four integers, the same for the same ones: where a tree stands in its cell, its size */
5
8
  export declare const treeHash: (a: number, b: number, c: number, d: number) => number;
6
9
  /** Whether a point lies in rings (interleaved points, unclosed or closed), even-odd: the holes cut out */
@@ -14,6 +17,8 @@ export declare const inRings: (rings: readonly (readonly number[])[], px: number
14
17
  export declare const scatter: (rings: readonly (readonly number[])[], extent: number, spacing: number, seed: [number, number, number], maxCells?: number) => [x: number, y: number, k: number][];
15
18
  /**
16
19
  * Trees over the polygons of the renderer's layers in a tile: longitude, latitude, scale (0.75 to 1.25), heading
17
- * (degrees) and rank (in [0, 1): the page keeps the lowest far from the view) of each, `spacing[s]` metres apart in layer `s` on a jittered grid; past `maxTrees`, thinned evenly
20
+ * (degrees), rank (in [0, 1): the page keeps the lowest far from the view) and kind (1 a conifer, as many as its wood's
21
+ * `coniferShare`, else 0) of each, `spacing[s]` metres apart in layer `s` on a jittered grid; past `maxTrees`, thinned
22
+ * evenly
18
23
  */
19
24
  export declare const trees: (r: Renderer, z: number, x: number, y: number, id: number, spacing: number[], maxTrees: number, priority?: Priority) => Promise<Float64Array<ArrayBuffer> | undefined>;
@@ -20,6 +20,7 @@ import { type PngEncoding } from '../basemap/terrain.ts';
20
20
  import { type LabelCandidate, type RasterSource, type StyleLayer } from '../basemap/vectorstyle.ts';
21
21
  import { type HeaderRules } from '../engine/requests.ts';
22
22
  import { type GridDescription, type StreetFlows } from '../grid-module.ts';
23
+ import type { RoofMode } from '../util/roofs.ts';
23
24
  import { type StreetWork } from './basemap/street.ts';
24
25
  import { type Sprite } from './basemap/tiles.ts';
25
26
  export type { LabelCandidate, RasterSource, Sprite };
@@ -44,6 +45,8 @@ export type BasemapWork = {
44
45
  x: number;
45
46
  y: number;
46
47
  zoom?: number;
48
+ /** The labels in a building given its height (they stand on its roof) */
49
+ roofs?: boolean;
47
50
  priority?: Priority;
48
51
  }
49
52
  /** The polygons of the renderer's layers (buildings), for extrusions */
@@ -67,6 +70,29 @@ export type BasemapWork = {
67
70
  maxTrees: number;
68
71
  priority?: Priority;
69
72
  }
73
+ /** The street furniture of the tile (OpenMapTiles' points of interest of the street, benches along the pedestrian
74
+ * streets and the parks' paths), at most `maxObjects` */
75
+ | {
76
+ type: 'furniture';
77
+ key: string;
78
+ z: number;
79
+ x: number;
80
+ y: number;
81
+ maxObjects: number;
82
+ priority?: Priority;
83
+ }
84
+ /** Street lamps along the lines of the renderer's layers, `spacing` metres apart along each street, at most
85
+ * `maxLamps` */
86
+ | {
87
+ type: 'lamps';
88
+ key: string;
89
+ z: number;
90
+ x: number;
91
+ y: number;
92
+ spacing: number;
93
+ maxLamps: number;
94
+ priority?: Priority;
95
+ }
70
96
  /** The fills and lines of the renderer's layers cut to the tile, for the engine to draw as geometry; `styles`: their
71
97
  * style only, the layers' paint changed (the same features, in the same order). A tile past the source's deepest
72
98
  * level is cut from its tile of that level (overzoom); `deepest`, the deepest level asked for (default the
@@ -78,6 +104,8 @@ export type BasemapWork = {
78
104
  x: number;
79
105
  y: number;
80
106
  deepest?: number;
107
+ /** How the buildings' roofs are made (`RoofMode`) */
108
+ roofs?: RoofMode;
81
109
  styles?: boolean;
82
110
  /** With the prisms of the fills (a relief under them) */
83
111
  prism?: boolean;
@@ -158,11 +186,16 @@ export type BasemapResponse = {
158
186
  trees: Float64Array;
159
187
  } | {
160
188
  id: number;
161
- vectors: TileVectors;
189
+ lamps: Float64Array;
162
190
  } | {
163
191
  id: number;
164
- styles: Float32Array;
192
+ furniture: Float64Array;
165
193
  } | {
194
+ id: number;
195
+ vectors: TileVectors;
196
+ } | ({
197
+ id: number;
198
+ } & TileStyles) | {
166
199
  id: number;
167
200
  heights: Float32Array;
168
201
  } | {
@@ -196,6 +229,15 @@ export interface TileVectors {
196
229
  polygonStart: Uint32Array;
197
230
  feature: Uint32Array;
198
231
  fillStart: Uint32Array;
232
+ /** Per polygon, its block's roof: its shape's number (`RoofShape::number`, 255 generated) and height (metres) */
233
+ roofs?: Uint8Array;
234
+ roofHeights?: Float32Array;
235
+ /** The whole outlines of the buildings the tile cuts (Mercator, interleaved), where each polygon's starts (and the
236
+ * end; an empty one: whole) */
237
+ roofOutlines?: Float64Array;
238
+ roofOutlineStart?: Uint32Array;
239
+ /** Metres per Mercator unit at the tile */
240
+ roofMetres?: number;
199
241
  };
200
242
  lines: {
201
243
  points: Float64Array;
@@ -203,8 +245,17 @@ export interface TileVectors {
203
245
  feature: Uint32Array;
204
246
  lineStart: Uint32Array;
205
247
  };
248
+ /** The points of the circle sublayers (Mercator), each with its styled feature, and the first of each sublayer (and
249
+ * the end) */
250
+ circles?: {
251
+ points: Float64Array;
252
+ feature: Uint32Array;
253
+ circleStart: Uint32Array;
254
+ };
206
255
  /** The style of each styled feature, `FLOATS` (32) each, as the engine's line layers take it */
207
256
  styles: Float32Array;
257
+ /** The names of the fills' patterns its styles point at (`resolvePatterns`) */
258
+ patterns?: string[];
208
259
  /** The tile's corners (west, north, east, south, Mercator): no wall of a building along its edges, where one cut
209
260
  * there goes on in the next tile */
210
261
  tile?: Float64Array;
@@ -215,6 +266,11 @@ export interface TileVectors {
215
266
  * the engine does that on the main thread */
216
267
  mesh?: TileMesh;
217
268
  }
269
+ /** The styles alone of a vector tile's features, restyled (as `TileVectors`'s) */
270
+ export interface TileStyles {
271
+ styles: Float32Array;
272
+ patterns: string[];
273
+ }
218
274
  /** A vector tile ready for the GPU, as the tessellation module makes it (`TessellatedTile`) */
219
275
  export interface TileMesh {
220
276
  /** Fill vertices, as bytes */