@math.gl/geospatial 5.0.0-beta.9 → 5.0.0-rc.2

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 (559) hide show
  1. package/README.md +3 -3
  2. package/dist/crs/crs-descriptor-types.d.ts +2 -1
  3. package/dist/crs/crs-descriptor-types.d.ts.map +1 -1
  4. package/dist/crs/index.cjs +54 -0
  5. package/dist/crs/index.cjs.map +2 -2
  6. package/dist/crs/index.d.ts +1 -0
  7. package/dist/crs/index.d.ts.map +1 -1
  8. package/dist/crs/index.js +1 -0
  9. package/dist/crs/index.js.map +1 -1
  10. package/dist/crs/spatial-reference-metadata.d.ts +20 -0
  11. package/dist/crs/spatial-reference-metadata.d.ts.map +1 -0
  12. package/dist/crs/spatial-reference-metadata.js +86 -0
  13. package/dist/crs/spatial-reference-metadata.js.map +1 -0
  14. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts +1 -1
  15. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts.map +1 -1
  16. package/dist/ellipsoid-helpers/ellipsoid-transform.js +2 -2
  17. package/dist/ellipsoid-helpers/ellipsoid-transform.js.map +1 -1
  18. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js +1 -1
  19. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js.map +1 -1
  20. package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts +1 -1
  21. package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts.map +1 -1
  22. package/dist/ellipsoid-tangent-plane.d.ts +2 -2
  23. package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
  24. package/dist/ellipsoid-tangent-plane.js +1 -1
  25. package/dist/ellipsoid-tangent-plane.js.map +1 -1
  26. package/dist/ellipsoid-transforms.d.ts +2 -2
  27. package/dist/ellipsoid-transforms.d.ts.map +1 -1
  28. package/dist/ellipsoid-transforms.js +1 -1
  29. package/dist/ellipsoid-transforms.js.map +1 -1
  30. package/dist/ellipsoid.d.ts +2 -2
  31. package/dist/ellipsoid.d.ts.map +1 -1
  32. package/dist/ellipsoid.js +2 -2
  33. package/dist/ellipsoid.js.map +1 -1
  34. package/dist/expressions.d.ts +1 -1
  35. package/dist/expressions.d.ts.map +1 -1
  36. package/dist/expressions.js +1 -1
  37. package/dist/expressions.js.map +1 -1
  38. package/dist/geodesic-buffer.d.ts +1 -1
  39. package/dist/geodesic-buffer.d.ts.map +1 -1
  40. package/dist/geodesic-path.d.ts +1 -1
  41. package/dist/geodesic-path.d.ts.map +1 -1
  42. package/dist/geometry-constructors.d.ts +6 -0
  43. package/dist/geometry-constructors.d.ts.map +1 -0
  44. package/dist/geometry-constructors.js +37 -0
  45. package/dist/geometry-constructors.js.map +1 -0
  46. package/dist/geometry-inspection.d.ts +8 -0
  47. package/dist/geometry-inspection.d.ts.map +1 -0
  48. package/dist/geometry-inspection.js +61 -0
  49. package/dist/geometry-inspection.js.map +1 -0
  50. package/dist/index.cjs +2514 -558
  51. package/dist/index.cjs.map +3 -3
  52. package/dist/index.d.ts +164 -1
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +106 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/line-simplification.d.ts +4 -0
  57. package/dist/line-simplification.d.ts.map +1 -0
  58. package/dist/line-simplification.js +83 -0
  59. package/dist/line-simplification.js.map +1 -0
  60. package/dist/linear-referencing.d.ts +6 -0
  61. package/dist/linear-referencing.d.ts.map +1 -0
  62. package/dist/linear-referencing.js +74 -0
  63. package/dist/linear-referencing.js.map +1 -0
  64. package/dist/lng-lat-rectangle.d.ts +1 -1
  65. package/dist/lng-lat-rectangle.d.ts.map +1 -1
  66. package/dist/lng-lat-rectangle.js +1 -1
  67. package/dist/lng-lat-rectangle.js.map +1 -1
  68. package/dist/local-reference-frame.d.ts +3 -3
  69. package/dist/local-reference-frame.d.ts.map +1 -1
  70. package/dist/local-reference-frame.js +2 -2
  71. package/dist/local-reference-frame.js.map +1 -1
  72. package/dist/make-obb-from-region.d.ts +1 -1
  73. package/dist/make-obb-from-region.d.ts.map +1 -1
  74. package/dist/make-obb-from-region.js +1 -1
  75. package/dist/make-obb-from-region.js.map +1 -1
  76. package/dist/maps/air-ocean-mesh.js +1 -1
  77. package/dist/maps/air-ocean-mesh.js.map +1 -1
  78. package/dist/maps/myriahedral/unfold.d.ts +1 -1
  79. package/dist/maps/myriahedral/unfold.d.ts.map +1 -1
  80. package/dist/maps/myriahedral/unfold.js +1 -1
  81. package/dist/maps/myriahedral/unfold.js.map +1 -1
  82. package/dist/maps/presets.cjs +6 -6
  83. package/dist/maps/presets.cjs.map +2 -2
  84. package/dist/maps.cjs +6 -6
  85. package/dist/maps.cjs.map +2 -2
  86. package/dist/projection/deformation.cjs +5 -5
  87. package/dist/projection/deformation.cjs.map +2 -2
  88. package/dist/projection/experimental/core.cjs +8 -4
  89. package/dist/projection/experimental/core.cjs.map +1 -1
  90. package/dist/projection/experimental/crs/spatial-reference.d.ts.map +1 -1
  91. package/dist/projection/experimental/crs/spatial-reference.js.map +1 -1
  92. package/dist/projection/experimental/crs/types.d.ts +1 -1
  93. package/dist/projection/experimental/crs/types.d.ts.map +1 -1
  94. package/dist/projection/experimental/crs-rendering-scale.d.ts.map +1 -1
  95. package/dist/projection/experimental/crs-rendering-scale.js +13 -2
  96. package/dist/projection/experimental/crs-rendering-scale.js.map +1 -1
  97. package/dist/projection/experimental/datum.js +1 -1
  98. package/dist/projection/experimental/datum.js.map +1 -1
  99. package/dist/projection/experimental/entries/projections/geocent.cjs +3 -3
  100. package/dist/projection/experimental/entries/projections/geocent.cjs.map +1 -1
  101. package/dist/projection/experimental/lazy-projections/aea.cjs +4 -1
  102. package/dist/projection/experimental/lazy-projections/aea.cjs.map +1 -1
  103. package/dist/projection/experimental/lazy-projections/aea.d.ts.map +1 -1
  104. package/dist/projection/experimental/lazy-projections/aea.js +4 -1
  105. package/dist/projection/experimental/lazy-projections/aea.js.map +1 -1
  106. package/dist/projection/experimental/lazy-projections/bonne.cjs +4 -1
  107. package/dist/projection/experimental/lazy-projections/bonne.cjs.map +1 -1
  108. package/dist/projection/experimental/lazy-projections/bonne.d.ts.map +1 -1
  109. package/dist/projection/experimental/lazy-projections/bonne.js +4 -1
  110. package/dist/projection/experimental/lazy-projections/bonne.js.map +1 -1
  111. package/dist/projection/experimental/lazy-projections/cass.cjs +4 -1
  112. package/dist/projection/experimental/lazy-projections/cass.cjs.map +1 -1
  113. package/dist/projection/experimental/lazy-projections/cass.d.ts.map +1 -1
  114. package/dist/projection/experimental/lazy-projections/cass.js +4 -1
  115. package/dist/projection/experimental/lazy-projections/cass.js.map +1 -1
  116. package/dist/projection/experimental/lazy-projections/eck6.cjs +4 -1
  117. package/dist/projection/experimental/lazy-projections/eck6.cjs.map +1 -1
  118. package/dist/projection/experimental/lazy-projections/eck6.d.ts.map +1 -1
  119. package/dist/projection/experimental/lazy-projections/eck6.js +4 -1
  120. package/dist/projection/experimental/lazy-projections/eck6.js.map +1 -1
  121. package/dist/projection/experimental/lazy-projections/eqdc.cjs +4 -1
  122. package/dist/projection/experimental/lazy-projections/eqdc.cjs.map +1 -1
  123. package/dist/projection/experimental/lazy-projections/eqdc.d.ts.map +1 -1
  124. package/dist/projection/experimental/lazy-projections/eqdc.js +4 -1
  125. package/dist/projection/experimental/lazy-projections/eqdc.js.map +1 -1
  126. package/dist/projection/experimental/lazy-projections/eqearth.cjs +4 -1
  127. package/dist/projection/experimental/lazy-projections/eqearth.cjs.map +1 -1
  128. package/dist/projection/experimental/lazy-projections/eqearth.d.ts.map +1 -1
  129. package/dist/projection/experimental/lazy-projections/eqearth.js +4 -1
  130. package/dist/projection/experimental/lazy-projections/eqearth.js.map +1 -1
  131. package/dist/projection/experimental/lazy-projections/equi.cjs +4 -1
  132. package/dist/projection/experimental/lazy-projections/equi.cjs.map +1 -1
  133. package/dist/projection/experimental/lazy-projections/equi.d.ts.map +1 -1
  134. package/dist/projection/experimental/lazy-projections/equi.js +4 -1
  135. package/dist/projection/experimental/lazy-projections/equi.js.map +1 -1
  136. package/dist/projection/experimental/lazy-projections/geocent.cjs +4 -1
  137. package/dist/projection/experimental/lazy-projections/geocent.cjs.map +1 -1
  138. package/dist/projection/experimental/lazy-projections/geocent.d.ts.map +1 -1
  139. package/dist/projection/experimental/lazy-projections/geocent.js +4 -1
  140. package/dist/projection/experimental/lazy-projections/geocent.js.map +1 -1
  141. package/dist/projection/experimental/lazy-projections/geos.cjs +4 -1
  142. package/dist/projection/experimental/lazy-projections/geos.cjs.map +1 -1
  143. package/dist/projection/experimental/lazy-projections/geos.d.ts.map +1 -1
  144. package/dist/projection/experimental/lazy-projections/geos.js +4 -1
  145. package/dist/projection/experimental/lazy-projections/geos.js.map +1 -1
  146. package/dist/projection/experimental/lazy-projections/gnom.cjs +4 -1
  147. package/dist/projection/experimental/lazy-projections/gnom.cjs.map +1 -1
  148. package/dist/projection/experimental/lazy-projections/gnom.d.ts.map +1 -1
  149. package/dist/projection/experimental/lazy-projections/gnom.js +4 -1
  150. package/dist/projection/experimental/lazy-projections/gnom.js.map +1 -1
  151. package/dist/projection/experimental/lazy-projections/index.cjs +100 -27
  152. package/dist/projection/experimental/lazy-projections/index.cjs.map +1 -1
  153. package/dist/projection/experimental/lazy-projections/krovak.cjs +4 -1
  154. package/dist/projection/experimental/lazy-projections/krovak.cjs.map +1 -1
  155. package/dist/projection/experimental/lazy-projections/krovak.d.ts.map +1 -1
  156. package/dist/projection/experimental/lazy-projections/krovak.js +4 -1
  157. package/dist/projection/experimental/lazy-projections/krovak.js.map +1 -1
  158. package/dist/projection/experimental/lazy-projections/merc.cjs +4 -1
  159. package/dist/projection/experimental/lazy-projections/merc.cjs.map +1 -1
  160. package/dist/projection/experimental/lazy-projections/merc.d.ts.map +1 -1
  161. package/dist/projection/experimental/lazy-projections/merc.js +4 -1
  162. package/dist/projection/experimental/lazy-projections/merc.js.map +1 -1
  163. package/dist/projection/experimental/lazy-projections/mill.cjs +4 -1
  164. package/dist/projection/experimental/lazy-projections/mill.cjs.map +1 -1
  165. package/dist/projection/experimental/lazy-projections/mill.d.ts.map +1 -1
  166. package/dist/projection/experimental/lazy-projections/mill.js +4 -1
  167. package/dist/projection/experimental/lazy-projections/mill.js.map +1 -1
  168. package/dist/projection/experimental/lazy-projections/moll.cjs +4 -1
  169. package/dist/projection/experimental/lazy-projections/moll.cjs.map +1 -1
  170. package/dist/projection/experimental/lazy-projections/moll.d.ts.map +1 -1
  171. package/dist/projection/experimental/lazy-projections/moll.js +4 -1
  172. package/dist/projection/experimental/lazy-projections/moll.js.map +1 -1
  173. package/dist/projection/experimental/lazy-projections/nzmg.cjs +4 -1
  174. package/dist/projection/experimental/lazy-projections/nzmg.cjs.map +1 -1
  175. package/dist/projection/experimental/lazy-projections/nzmg.d.ts.map +1 -1
  176. package/dist/projection/experimental/lazy-projections/nzmg.js +4 -1
  177. package/dist/projection/experimental/lazy-projections/nzmg.js.map +1 -1
  178. package/dist/projection/experimental/lazy-projections/omerc.cjs +4 -1
  179. package/dist/projection/experimental/lazy-projections/omerc.cjs.map +1 -1
  180. package/dist/projection/experimental/lazy-projections/omerc.d.ts.map +1 -1
  181. package/dist/projection/experimental/lazy-projections/omerc.js +4 -1
  182. package/dist/projection/experimental/lazy-projections/omerc.js.map +1 -1
  183. package/dist/projection/experimental/lazy-projections/ortho.cjs +4 -1
  184. package/dist/projection/experimental/lazy-projections/ortho.cjs.map +1 -1
  185. package/dist/projection/experimental/lazy-projections/ortho.d.ts.map +1 -1
  186. package/dist/projection/experimental/lazy-projections/ortho.js +4 -1
  187. package/dist/projection/experimental/lazy-projections/ortho.js.map +1 -1
  188. package/dist/projection/experimental/lazy-projections/poly.cjs +4 -1
  189. package/dist/projection/experimental/lazy-projections/poly.cjs.map +1 -1
  190. package/dist/projection/experimental/lazy-projections/poly.d.ts.map +1 -1
  191. package/dist/projection/experimental/lazy-projections/poly.js +4 -1
  192. package/dist/projection/experimental/lazy-projections/poly.js.map +1 -1
  193. package/dist/projection/experimental/lazy-projections/robin.cjs +4 -1
  194. package/dist/projection/experimental/lazy-projections/robin.cjs.map +1 -1
  195. package/dist/projection/experimental/lazy-projections/robin.d.ts.map +1 -1
  196. package/dist/projection/experimental/lazy-projections/robin.js +4 -1
  197. package/dist/projection/experimental/lazy-projections/robin.js.map +1 -1
  198. package/dist/projection/experimental/lazy-projections/sinu.cjs +4 -1
  199. package/dist/projection/experimental/lazy-projections/sinu.cjs.map +1 -1
  200. package/dist/projection/experimental/lazy-projections/sinu.d.ts.map +1 -1
  201. package/dist/projection/experimental/lazy-projections/sinu.js +4 -1
  202. package/dist/projection/experimental/lazy-projections/sinu.js.map +1 -1
  203. package/dist/projection/experimental/lazy-projections/stere.cjs +4 -1
  204. package/dist/projection/experimental/lazy-projections/stere.cjs.map +1 -1
  205. package/dist/projection/experimental/lazy-projections/stere.d.ts.map +1 -1
  206. package/dist/projection/experimental/lazy-projections/stere.js +4 -1
  207. package/dist/projection/experimental/lazy-projections/stere.js.map +1 -1
  208. package/dist/projection/experimental/lazy-projections/tpers.cjs +4 -1
  209. package/dist/projection/experimental/lazy-projections/tpers.cjs.map +1 -1
  210. package/dist/projection/experimental/lazy-projections/tpers.d.ts.map +1 -1
  211. package/dist/projection/experimental/lazy-projections/tpers.js +4 -1
  212. package/dist/projection/experimental/lazy-projections/tpers.js.map +1 -1
  213. package/dist/projection/experimental/lazy-projections/vandg.cjs +4 -1
  214. package/dist/projection/experimental/lazy-projections/vandg.cjs.map +1 -1
  215. package/dist/projection/experimental/lazy-projections/vandg.d.ts.map +1 -1
  216. package/dist/projection/experimental/lazy-projections/vandg.js +4 -1
  217. package/dist/projection/experimental/lazy-projections/vandg.js.map +1 -1
  218. package/dist/projection/experimental/spatial-deformation.js +1 -1
  219. package/dist/projection/experimental/spatial-deformation.js.map +1 -1
  220. package/dist/projection/index.cjs +8 -4
  221. package/dist/projection/index.cjs.map +1 -1
  222. package/dist/projection/index.d.ts.map +1 -1
  223. package/dist/projection/index.js.map +1 -1
  224. package/dist/projection/lib/projection.js.map +1 -1
  225. package/dist/projection/pipeline.cjs +3 -3
  226. package/dist/projection/pipeline.cjs.map +1 -1
  227. package/dist/projection/temporal.cjs +5 -5
  228. package/dist/projection/temporal.cjs.map +2 -2
  229. package/dist/projection/transform-analysis.cjs +3 -3
  230. package/dist/projection/transform-analysis.cjs.map +1 -1
  231. package/dist/rhumb-path.d.ts +1 -1
  232. package/dist/rhumb-path.d.ts.map +1 -1
  233. package/dist/spatial-planar-intersects.d.ts +4 -0
  234. package/dist/spatial-planar-intersects.d.ts.map +1 -0
  235. package/dist/spatial-planar-intersects.js +108 -0
  236. package/dist/spatial-planar-intersects.js.map +1 -0
  237. package/dist/spatial-planar.d.ts +16 -0
  238. package/dist/spatial-planar.d.ts.map +1 -0
  239. package/dist/spatial-planar.js +240 -0
  240. package/dist/spatial-planar.js.map +1 -0
  241. package/dist/spatial-sql.d.ts +45 -0
  242. package/dist/spatial-sql.d.ts.map +1 -0
  243. package/dist/spatial-sql.js +192 -0
  244. package/dist/spatial-sql.js.map +1 -0
  245. package/dist/st-functions.cjs +1616 -0
  246. package/dist/st-functions.cjs.map +6 -0
  247. package/dist/st-functions.d.ts +307 -0
  248. package/dist/st-functions.d.ts.map +1 -0
  249. package/dist/st-functions.js +593 -0
  250. package/dist/st-functions.js.map +1 -0
  251. package/dist/subdivide-globe-mesh.js +1 -1
  252. package/dist/subdivide-globe-mesh.js.map +1 -1
  253. package/dist/tasks/index.cjs +216 -98
  254. package/dist/tasks/index.cjs.map +2 -2
  255. package/dist/tasks/terrain-residency.d.ts +9 -0
  256. package/dist/tasks/terrain-residency.d.ts.map +1 -1
  257. package/dist/tasks/terrain-residency.js +98 -19
  258. package/dist/tasks/terrain-residency.js.map +1 -1
  259. package/dist/terrain/cutout-polygons.d.ts +21 -0
  260. package/dist/terrain/cutout-polygons.d.ts.map +1 -0
  261. package/dist/terrain/cutout-polygons.js +172 -0
  262. package/dist/terrain/cutout-polygons.js.map +1 -0
  263. package/dist/terrain/cutout-region.d.ts +34 -0
  264. package/dist/terrain/cutout-region.d.ts.map +1 -0
  265. package/dist/terrain/cutout-region.js +33 -0
  266. package/dist/terrain/cutout-region.js.map +1 -0
  267. package/dist/terrain/cutout-skirts.d.ts +34 -0
  268. package/dist/terrain/cutout-skirts.d.ts.map +1 -0
  269. package/dist/terrain/cutout-skirts.js +29 -0
  270. package/dist/terrain/cutout-skirts.js.map +1 -0
  271. package/dist/terrain/depression-fill.d.ts +25 -0
  272. package/dist/terrain/depression-fill.d.ts.map +1 -0
  273. package/dist/terrain/depression-fill.js +106 -0
  274. package/dist/terrain/depression-fill.js.map +1 -0
  275. package/dist/terrain/geographic-cutout.d.ts +38 -0
  276. package/dist/terrain/geographic-cutout.d.ts.map +1 -0
  277. package/dist/terrain/geographic-cutout.js +120 -0
  278. package/dist/terrain/geographic-cutout.js.map +1 -0
  279. package/dist/terrain/geographic-lod-seams.d.ts +10 -0
  280. package/dist/terrain/geographic-lod-seams.d.ts.map +1 -0
  281. package/dist/terrain/geographic-lod-seams.js +100 -0
  282. package/dist/terrain/geographic-lod-seams.js.map +1 -0
  283. package/dist/terrain/geographic-neighbor.d.ts +18 -0
  284. package/dist/terrain/geographic-neighbor.d.ts.map +1 -0
  285. package/dist/terrain/geographic-neighbor.js +44 -0
  286. package/dist/terrain/geographic-neighbor.js.map +1 -0
  287. package/dist/terrain/geographic-poles.d.ts +24 -0
  288. package/dist/terrain/geographic-poles.d.ts.map +1 -0
  289. package/dist/terrain/geographic-poles.js +34 -0
  290. package/dist/terrain/geographic-poles.js.map +1 -0
  291. package/dist/terrain/hydrology.d.ts +42 -0
  292. package/dist/terrain/hydrology.d.ts.map +1 -0
  293. package/dist/terrain/hydrology.js +112 -0
  294. package/dist/terrain/hydrology.js.map +1 -0
  295. package/dist/terrain/index.cjs +2135 -161
  296. package/dist/terrain/index.cjs.map +3 -3
  297. package/dist/terrain/index.d.ts +23 -1
  298. package/dist/terrain/index.d.ts.map +1 -1
  299. package/dist/terrain/index.js +21 -0
  300. package/dist/terrain/index.js.map +1 -1
  301. package/dist/terrain/lod-screen-error.d.ts +28 -0
  302. package/dist/terrain/lod-screen-error.d.ts.map +1 -0
  303. package/dist/terrain/lod-screen-error.js +95 -0
  304. package/dist/terrain/lod-screen-error.js.map +1 -0
  305. package/dist/terrain/lod-select.d.ts +26 -10
  306. package/dist/terrain/lod-select.d.ts.map +1 -1
  307. package/dist/terrain/lod-select.js +27 -14
  308. package/dist/terrain/lod-select.js.map +1 -1
  309. package/dist/terrain/lod-stitch.d.ts +2 -0
  310. package/dist/terrain/lod-stitch.d.ts.map +1 -1
  311. package/dist/terrain/lod-stitch.js +21 -6
  312. package/dist/terrain/lod-stitch.js.map +1 -1
  313. package/dist/terrain/mesh-cutout.d.ts +45 -0
  314. package/dist/terrain/mesh-cutout.d.ts.map +1 -0
  315. package/dist/terrain/mesh-cutout.js +336 -0
  316. package/dist/terrain/mesh-cutout.js.map +1 -0
  317. package/dist/terrain/mesh-skirts.d.ts +8 -2
  318. package/dist/terrain/mesh-skirts.d.ts.map +1 -1
  319. package/dist/terrain/mesh-skirts.js +5 -4
  320. package/dist/terrain/mesh-skirts.js.map +1 -1
  321. package/dist/terrain/mixed-halo-update.d.ts.map +1 -1
  322. package/dist/terrain/mixed-halo-update.js +58 -23
  323. package/dist/terrain/mixed-halo-update.js.map +1 -1
  324. package/dist/terrain/mixed-vertex-halos.d.ts +24 -1
  325. package/dist/terrain/mixed-vertex-halos.d.ts.map +1 -1
  326. package/dist/terrain/mixed-vertex-halos.js +75 -58
  327. package/dist/terrain/mixed-vertex-halos.js.map +1 -1
  328. package/dist/terrain/regional-viewshed.d.ts +55 -0
  329. package/dist/terrain/regional-viewshed.d.ts.map +1 -0
  330. package/dist/terrain/regional-viewshed.js +119 -0
  331. package/dist/terrain/regional-viewshed.js.map +1 -0
  332. package/dist/terrain/surface.d.ts +1 -1
  333. package/dist/terrain/surface.d.ts.map +1 -1
  334. package/dist/terrain/surface.js +1 -1
  335. package/dist/terrain/surface.js.map +1 -1
  336. package/dist/terrain/sweep-capsule.d.ts +27 -0
  337. package/dist/terrain/sweep-capsule.d.ts.map +1 -0
  338. package/dist/terrain/sweep-capsule.js +104 -0
  339. package/dist/terrain/sweep-capsule.js.map +1 -0
  340. package/dist/terrain/sweep-cylinder.d.ts +16 -0
  341. package/dist/terrain/sweep-cylinder.d.ts.map +1 -0
  342. package/dist/terrain/sweep-cylinder.js +52 -0
  343. package/dist/terrain/sweep-cylinder.js.map +1 -0
  344. package/dist/terrain/sweep-plane.d.ts +9 -0
  345. package/dist/terrain/sweep-plane.d.ts.map +1 -0
  346. package/dist/terrain/sweep-plane.js +52 -0
  347. package/dist/terrain/sweep-plane.js.map +1 -0
  348. package/dist/terrain/sweep-polytope.d.ts +42 -0
  349. package/dist/terrain/sweep-polytope.d.ts.map +1 -0
  350. package/dist/terrain/sweep-polytope.js +189 -0
  351. package/dist/terrain/sweep-polytope.js.map +1 -0
  352. package/dist/terrain/sweep-rotating-capsule.d.ts +17 -0
  353. package/dist/terrain/sweep-rotating-capsule.d.ts.map +1 -0
  354. package/dist/terrain/sweep-rotating-capsule.js +118 -0
  355. package/dist/terrain/sweep-rotating-capsule.js.map +1 -0
  356. package/dist/terrain/sweep-rotation.d.ts +35 -0
  357. package/dist/terrain/sweep-rotation.d.ts.map +1 -0
  358. package/dist/terrain/sweep-rotation.js +114 -0
  359. package/dist/terrain/sweep-rotation.js.map +1 -0
  360. package/dist/terrain/sweep-sphere.d.ts +27 -0
  361. package/dist/terrain/sweep-sphere.d.ts.map +1 -0
  362. package/dist/terrain/sweep-sphere.js +69 -0
  363. package/dist/terrain/sweep-sphere.js.map +1 -0
  364. package/dist/terrain/tile-cutout-update.d.ts +73 -0
  365. package/dist/terrain/tile-cutout-update.d.ts.map +1 -0
  366. package/dist/terrain/tile-cutout-update.js +181 -0
  367. package/dist/terrain/tile-cutout-update.js.map +1 -0
  368. package/dist/terrain/tile-cutout.d.ts +33 -0
  369. package/dist/terrain/tile-cutout.d.ts.map +1 -0
  370. package/dist/terrain/tile-cutout.js +93 -0
  371. package/dist/terrain/tile-cutout.js.map +1 -0
  372. package/dist/terrain/watershed-accumulation.d.ts +20 -0
  373. package/dist/terrain/watershed-accumulation.d.ts.map +1 -0
  374. package/dist/terrain/watershed-accumulation.js +53 -0
  375. package/dist/terrain/watershed-accumulation.js.map +1 -0
  376. package/dist/triaxial.d.ts +1 -1
  377. package/dist/triaxial.d.ts.map +1 -1
  378. package/dist/turf-expressions.cjs +1997 -0
  379. package/dist/turf-expressions.cjs.map +6 -0
  380. package/dist/turf-expressions.d.ts +3 -0
  381. package/dist/turf-expressions.d.ts.map +1 -0
  382. package/dist/turf-expressions.js +7 -0
  383. package/dist/turf-expressions.js.map +1 -0
  384. package/dist/turf-functions.cjs +743 -0
  385. package/dist/turf-functions.cjs.map +6 -0
  386. package/dist/turf-functions.d.ts +90 -0
  387. package/dist/turf-functions.d.ts.map +1 -0
  388. package/dist/{turf/expressions.js → turf-functions.js} +51 -5
  389. package/dist/turf-functions.js.map +1 -0
  390. package/dist/turf.cjs +25 -25
  391. package/dist/turf.cjs.map +2 -2
  392. package/dist/turf.d.ts +1 -1
  393. package/dist/turf.d.ts.map +1 -1
  394. package/dist/turf.js +2 -2
  395. package/dist/turf.js.map +1 -1
  396. package/dist/type-utils.d.ts +1 -1
  397. package/dist/type-utils.d.ts.map +1 -1
  398. package/dist/type-utils.js +1 -1
  399. package/dist/type-utils.js.map +1 -1
  400. package/dist/web-mercator/assert.d.ts +2 -0
  401. package/dist/web-mercator/assert.d.ts.map +1 -0
  402. package/dist/web-mercator/assert.js +12 -0
  403. package/dist/web-mercator/assert.js.map +1 -0
  404. package/dist/web-mercator/fit-bounds.d.ts +52 -0
  405. package/dist/web-mercator/fit-bounds.d.ts.map +1 -0
  406. package/dist/web-mercator/fit-bounds.js +70 -0
  407. package/dist/web-mercator/fit-bounds.js.map +1 -0
  408. package/dist/web-mercator/fly-to-viewport.d.ts +19 -0
  409. package/dist/web-mercator/fly-to-viewport.d.ts.map +1 -0
  410. package/dist/web-mercator/fly-to-viewport.js +94 -0
  411. package/dist/web-mercator/fly-to-viewport.js.map +1 -0
  412. package/dist/web-mercator/get-bounds.d.ts +3 -0
  413. package/dist/web-mercator/get-bounds.d.ts.map +1 -0
  414. package/dist/web-mercator/get-bounds.js +56 -0
  415. package/dist/web-mercator/get-bounds.js.map +1 -0
  416. package/dist/web-mercator/index.cjs +705 -0
  417. package/dist/web-mercator/index.cjs.map +6 -0
  418. package/dist/web-mercator/index.d.ts +14 -0
  419. package/dist/web-mercator/index.d.ts.map +1 -0
  420. package/dist/web-mercator/index.js +14 -0
  421. package/dist/web-mercator/index.js.map +1 -0
  422. package/dist/web-mercator/math-utils.d.ts +7 -0
  423. package/dist/web-mercator/math-utils.d.ts.map +1 -0
  424. package/dist/web-mercator/math-utils.js +30 -0
  425. package/dist/web-mercator/math-utils.js.map +1 -0
  426. package/dist/web-mercator/mercator-meters.d.ts +29 -0
  427. package/dist/web-mercator/mercator-meters.d.ts.map +1 -0
  428. package/dist/web-mercator/mercator-meters.js +61 -0
  429. package/dist/web-mercator/mercator-meters.js.map +1 -0
  430. package/dist/web-mercator/normalize-viewport-props.d.ts +16 -0
  431. package/dist/web-mercator/normalize-viewport-props.d.ts.map +1 -0
  432. package/dist/web-mercator/normalize-viewport-props.js +45 -0
  433. package/dist/web-mercator/normalize-viewport-props.js.map +1 -0
  434. package/dist/web-mercator/web-mercator-utils.d.ts +192 -0
  435. package/dist/web-mercator/web-mercator-utils.d.ts.map +1 -0
  436. package/dist/web-mercator/web-mercator-utils.js +321 -0
  437. package/dist/web-mercator/web-mercator-utils.js.map +1 -0
  438. package/dist/web-mercator/web-mercator-viewport.d.ts +177 -0
  439. package/dist/web-mercator/web-mercator-viewport.d.ts.map +1 -0
  440. package/dist/web-mercator/web-mercator-viewport.js +276 -0
  441. package/dist/web-mercator/web-mercator-viewport.js.map +1 -0
  442. package/dist/web-mercator.d.ts +1 -1
  443. package/dist/web-mercator.d.ts.map +1 -1
  444. package/dist/web-mercator.js +1 -1
  445. package/dist/web-mercator.js.map +1 -1
  446. package/package.json +34 -462
  447. package/src/crs/crs-descriptor-types.ts +2 -1
  448. package/src/crs/index.ts +7 -0
  449. package/src/crs/spatial-reference-metadata.ts +118 -0
  450. package/src/ellipsoid-helpers/ellipsoid-transform.ts +3 -3
  451. package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +1 -1
  452. package/src/ellipsoid-helpers/tangent-plane-numerics.ts +1 -1
  453. package/src/ellipsoid-tangent-plane.ts +2 -2
  454. package/src/ellipsoid-transforms.ts +2 -2
  455. package/src/ellipsoid.ts +7 -3
  456. package/src/expressions.ts +2 -2
  457. package/src/geodesic-buffer.ts +1 -1
  458. package/src/geodesic-path.ts +1 -1
  459. package/src/geometry-constructors.ts +36 -0
  460. package/src/geometry-inspection.ts +66 -0
  461. package/src/index.ts +271 -4
  462. package/src/line-simplification.ts +97 -0
  463. package/src/linear-referencing.ts +94 -0
  464. package/src/lng-lat-rectangle.ts +1 -1
  465. package/src/local-reference-frame.ts +4 -4
  466. package/src/make-obb-from-region.ts +9 -1
  467. package/src/maps/air-ocean-mesh.ts +1 -1
  468. package/src/maps/myriahedral/unfold.ts +1 -1
  469. package/src/projection/experimental/crs/spatial-reference.ts +1 -6
  470. package/src/projection/experimental/crs/types.ts +2 -2
  471. package/src/projection/experimental/crs/wkt.ts +1 -1
  472. package/src/projection/experimental/crs-descriptor.ts +1 -1
  473. package/src/projection/experimental/crs-rendering-scale.ts +16 -4
  474. package/src/projection/experimental/datum.ts +1 -1
  475. package/src/projection/experimental/lazy-projections/aea.ts +4 -1
  476. package/src/projection/experimental/lazy-projections/bonne.ts +4 -1
  477. package/src/projection/experimental/lazy-projections/cass.ts +4 -1
  478. package/src/projection/experimental/lazy-projections/eck6.ts +4 -1
  479. package/src/projection/experimental/lazy-projections/eqdc.ts +4 -1
  480. package/src/projection/experimental/lazy-projections/eqearth.ts +4 -1
  481. package/src/projection/experimental/lazy-projections/equi.ts +4 -1
  482. package/src/projection/experimental/lazy-projections/geocent.ts +4 -1
  483. package/src/projection/experimental/lazy-projections/geos.ts +4 -1
  484. package/src/projection/experimental/lazy-projections/gnom.ts +4 -1
  485. package/src/projection/experimental/lazy-projections/krovak.ts +4 -1
  486. package/src/projection/experimental/lazy-projections/merc.ts +4 -1
  487. package/src/projection/experimental/lazy-projections/mill.ts +4 -1
  488. package/src/projection/experimental/lazy-projections/moll.ts +4 -1
  489. package/src/projection/experimental/lazy-projections/nzmg.ts +4 -1
  490. package/src/projection/experimental/lazy-projections/omerc.ts +4 -1
  491. package/src/projection/experimental/lazy-projections/ortho.ts +4 -1
  492. package/src/projection/experimental/lazy-projections/poly.ts +4 -1
  493. package/src/projection/experimental/lazy-projections/robin.ts +4 -1
  494. package/src/projection/experimental/lazy-projections/sinu.ts +4 -1
  495. package/src/projection/experimental/lazy-projections/stere.ts +4 -1
  496. package/src/projection/experimental/lazy-projections/tpers.ts +4 -1
  497. package/src/projection/experimental/lazy-projections/vandg.ts +4 -1
  498. package/src/projection/experimental/spatial-deformation.ts +1 -1
  499. package/src/projection/index.ts +1 -1
  500. package/src/projection/lib/projection.ts +1 -1
  501. package/src/rhumb-path.ts +1 -1
  502. package/src/spatial-planar-intersects.ts +134 -0
  503. package/src/spatial-planar.ts +266 -0
  504. package/src/spatial-sql.ts +276 -0
  505. package/src/st-functions.ts +852 -0
  506. package/src/subdivide-globe-mesh.ts +1 -1
  507. package/src/tasks/terrain-residency.ts +120 -24
  508. package/src/terrain/cutout-polygons.ts +202 -0
  509. package/src/terrain/cutout-region.ts +54 -0
  510. package/src/terrain/cutout-skirts.ts +52 -0
  511. package/src/terrain/depression-fill.ts +125 -0
  512. package/src/terrain/geographic-cutout.ts +154 -0
  513. package/src/terrain/geographic-lod-seams.ts +109 -0
  514. package/src/terrain/geographic-neighbor.ts +58 -0
  515. package/src/terrain/geographic-poles.ts +52 -0
  516. package/src/terrain/hydrology.ts +149 -0
  517. package/src/terrain/index.ts +122 -1
  518. package/src/terrain/lod-screen-error.ts +128 -0
  519. package/src/terrain/lod-select.ts +65 -31
  520. package/src/terrain/lod-stitch.ts +25 -7
  521. package/src/terrain/mesh-cutout.ts +420 -0
  522. package/src/terrain/mesh-skirts.ts +10 -7
  523. package/src/terrain/mixed-halo-update.ts +54 -20
  524. package/src/terrain/mixed-vertex-halos.ts +94 -78
  525. package/src/terrain/regional-viewshed.ts +177 -0
  526. package/src/terrain/surface.ts +1 -1
  527. package/src/terrain/sweep-capsule.ts +148 -0
  528. package/src/terrain/sweep-cylinder.ts +64 -0
  529. package/src/terrain/sweep-plane.ts +61 -0
  530. package/src/terrain/sweep-polytope.ts +253 -0
  531. package/src/terrain/sweep-rotating-capsule.ts +139 -0
  532. package/src/terrain/sweep-rotation.ts +149 -0
  533. package/src/terrain/sweep-sphere.ts +100 -0
  534. package/src/terrain/tile-cutout-update.ts +293 -0
  535. package/src/terrain/tile-cutout.ts +123 -0
  536. package/src/terrain/watershed-accumulation.ts +67 -0
  537. package/src/triaxial.ts +1 -1
  538. package/src/turf-expressions.ts +7 -0
  539. package/src/{turf/expressions.ts → turf-functions.ts} +121 -6
  540. package/src/turf.ts +3 -7
  541. package/src/type-utils.ts +2 -2
  542. package/src/web-mercator/assert.ts +11 -0
  543. package/src/web-mercator/fit-bounds.ts +132 -0
  544. package/src/web-mercator/fly-to-viewport.ts +157 -0
  545. package/src/web-mercator/get-bounds.ts +62 -0
  546. package/src/web-mercator/index.ts +49 -0
  547. package/src/web-mercator/math-utils.ts +35 -0
  548. package/src/web-mercator/mercator-meters.ts +83 -0
  549. package/src/web-mercator/normalize-viewport-props.ts +58 -0
  550. package/src/web-mercator/web-mercator-utils.ts +468 -0
  551. package/src/web-mercator/web-mercator-viewport.ts +406 -0
  552. package/src/web-mercator.ts +1 -1
  553. package/dist/projection/experimental/index.cjs +0 -11707
  554. package/dist/projection/experimental/index.cjs.map +0 -6
  555. package/dist/turf/expressions.cjs +0 -87
  556. package/dist/turf/expressions.cjs.map +0 -6
  557. package/dist/turf/expressions.d.ts +0 -24
  558. package/dist/turf/expressions.d.ts.map +0 -1
  559. package/dist/turf/expressions.js.map +0 -1
@@ -0,0 +1,27 @@
1
+ import type { TerrainSegmentHit, TerrainSurface } from "./surface.js";
2
+ import type { TerrainSphereSweepOptions } from "./sweep-sphere.js";
3
+ type Point = readonly [number, number, number];
4
+ export type TerrainCapsuleSweepResult = {
5
+ status: 'miss' | 'incomplete';
6
+ work: number;
7
+ } | {
8
+ status: 'hit';
9
+ work: number;
10
+ fraction: number;
11
+ lowerFraction: number;
12
+ contact: TerrainSegmentHit;
13
+ };
14
+ /**
15
+ * Bracket the first contact of a translating capsule against the active triangle sheet.
16
+ * The axis direction and length stay fixed. Clearance changes by at most the distance
17
+ * traveled. Intervals that cannot be separated within the tolerance return incomplete
18
+ * when no contact witness is available, including unresolved tangencies.
19
+ */
20
+ export declare function sweepTerrainCapsule(surface: Pick<TerrainSurface, 'nearestSegmentQuery'>, start: Point, end: Point, translation: Point, radius: number, { fractionTolerance, maxWork }?: TerrainSphereSweepOptions): TerrainCapsuleSweepResult;
21
+ /**
22
+ * Bracket the impact of the convex hull of two endpoint spheres with potentially
23
+ * different radii. Constant-radius inner and outer capsules bound the hull.
24
+ */
25
+ export declare function sweepTerrainTaperedCapsule(surface: Pick<TerrainSurface, 'nearestSegmentQuery'>, start: Point, end: Point, translation: Point, radiusStart: number, radiusEnd: number, { maxWork, fractionTolerance }?: TerrainSphereSweepOptions): TerrainCapsuleSweepResult;
26
+ export {};
27
+ //# sourceMappingURL=sweep-capsule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-capsule.d.ts","sourceRoot":"","sources":["../../src/terrain/sweep-capsule.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,cAAc,EAAC,qBAAkB;AACjE,OAAO,KAAK,EAAC,yBAAyB,EAAC,0BAAuB;AAE9D,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,yBAAyB,GACjC;IAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAC7C;IACE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEN;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,KAAK,EAClB,MAAM,EAAE,MAAM,EACd,EAAC,iBAAwB,EAAE,OAAiB,EAAC,GAAE,yBAA8B,GAC5E,yBAAyB,CAuE3B;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,KAAK,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,EAAC,OAAiB,EAAE,iBAAiB,EAAC,GAAE,yBAA8B,GACrE,yBAAyB,CA8B3B"}
@@ -0,0 +1,104 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ /**
5
+ * Bracket the first contact of a translating capsule against the active triangle sheet.
6
+ * The axis direction and length stay fixed. Clearance changes by at most the distance
7
+ * traveled. Intervals that cannot be separated within the tolerance return incomplete
8
+ * when no contact witness is available, including unresolved tangencies.
9
+ */
10
+ export function sweepTerrainCapsule(surface, start, end, translation, radius, { fractionTolerance = 1e-6, maxWork = 100000 } = {}) {
11
+ const speed = Math.hypot(...translation);
12
+ if (![start, end, translation].every(point => point.length === 3 && point.every(Number.isFinite)) ||
13
+ !Number.isFinite(speed) ||
14
+ !Number.isFinite(radius) ||
15
+ radius < 0 ||
16
+ !(fractionTolerance >= Number.EPSILON && fractionTolerance <= 1) ||
17
+ !Number.isSafeInteger(maxWork) ||
18
+ maxWork < 0)
19
+ throw new RangeError('Invalid terrain capsule sweep');
20
+ let work = 0;
21
+ const probe = (fraction) => {
22
+ if (work >= maxWork)
23
+ return null;
24
+ // Count the probe itself even if the index is empty.
25
+ work++;
26
+ const move = (point) => [
27
+ point[0] + translation[0] * fraction,
28
+ point[1] + translation[1] * fraction,
29
+ point[2] + translation[2] * fraction
30
+ ];
31
+ const query = surface.nearestSegmentQuery(move(start), move(end), { maxWork: maxWork - work });
32
+ work += query.work;
33
+ return query;
34
+ };
35
+ const initial = probe(0);
36
+ if (initial?.result && initial.result.distance <= radius)
37
+ return { status: 'hit', work, fraction: 0, lowerFraction: 0, contact: initial.result };
38
+ if (!initial?.complete)
39
+ return { status: 'incomplete', work };
40
+ if (!initial.result || speed === 0)
41
+ return { status: 'miss', work };
42
+ let clearUntil = 0;
43
+ let witness;
44
+ const pending = [[0, 1]];
45
+ while (pending.length) {
46
+ const [lower, upper] = pending.pop();
47
+ if (witness && witness.fraction - clearUntil <= fractionTolerance)
48
+ return { status: 'hit', work, lowerFraction: clearUntil, ...witness };
49
+ const middle = lower + (upper - lower) / 2;
50
+ const query = probe(middle);
51
+ if (!query)
52
+ return { status: 'incomplete', work };
53
+ const hit = query.result;
54
+ if (hit && hit.distance <= radius) {
55
+ witness = { fraction: middle, contact: hit };
56
+ if (middle - clearUntil <= fractionTolerance)
57
+ return { status: 'hit', work, lowerFraction: clearUntil, ...witness };
58
+ pending.push([lower, middle]);
59
+ continue;
60
+ }
61
+ if (!query.complete)
62
+ return { status: 'incomplete', work };
63
+ const travel = speed * Math.max(middle - lower, upper - middle);
64
+ const allowance = 8 * Number.EPSILON * Math.max(hit?.distance ?? 0, radius, travel);
65
+ if (!hit || hit.distance - radius > travel + allowance) {
66
+ clearUntil = upper;
67
+ continue;
68
+ }
69
+ if (upper - lower <= fractionTolerance) {
70
+ // Check the right endpoint for impacts at the end of motion.
71
+ const final = probe(upper)?.result;
72
+ if (final && final.distance <= radius && upper - clearUntil <= fractionTolerance)
73
+ return { status: 'hit', work, fraction: upper, lowerFraction: clearUntil, contact: final };
74
+ return { status: 'incomplete', work };
75
+ }
76
+ pending.push([middle, upper], [lower, middle]);
77
+ }
78
+ return witness
79
+ ? { status: 'hit', work, lowerFraction: clearUntil, ...witness }
80
+ : { status: 'miss', work };
81
+ }
82
+ /**
83
+ * Bracket the impact of the convex hull of two endpoint spheres with potentially
84
+ * different radii. Constant-radius inner and outer capsules bound the hull.
85
+ */
86
+ export function sweepTerrainTaperedCapsule(surface, start, end, translation, radiusStart, radiusEnd, { maxWork = 100000, fractionTolerance } = {}) {
87
+ if (![radiusStart, radiusEnd].every(radius => Number.isFinite(radius) && radius >= 0))
88
+ throw new RangeError('Invalid terrain tapered capsule radii');
89
+ const outer = sweepTerrainCapsule(surface, start, end, translation, Math.max(radiusStart, radiusEnd), {
90
+ maxWork,
91
+ fractionTolerance
92
+ });
93
+ if (outer.status !== 'hit' || radiusStart === radiusEnd)
94
+ return outer;
95
+ const inner = sweepTerrainCapsule(surface, start, end, translation, Math.min(radiusStart, radiusEnd), {
96
+ maxWork: maxWork - outer.work,
97
+ fractionTolerance
98
+ });
99
+ const work = outer.work + inner.work;
100
+ return inner.status === 'hit' && outer.lowerFraction <= inner.fraction
101
+ ? { ...inner, lowerFraction: outer.lowerFraction, work }
102
+ : { status: 'incomplete', work };
103
+ }
104
+ //# sourceMappingURL=sweep-capsule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-capsule.js","sourceRoot":"","sources":["../../src/terrain/sweep-capsule.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAiB5D;;;;;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AAK,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtE,MAAM,KAAK,GAAG,mBAAmB,CAC/B,OAAO,EACP,KAAK,EACL,GAAG,EACH,WAAW,EACX,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,EAChC;QACE,OAAO,EAAE,OAAO,GAAG,KAAK,CAAC,IAAI;QAC7B,iBAAiB;KAClB,CACF,CAAC;IACF,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACrC,OAAO,KAAK,CAAC,MAAM,KAAK,KAAK,IAAI,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,QAAQ;QACpE,CAAC,CAAC,EAAC,GAAG,KAAK,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC;QACtD,CAAC,CAAC,EAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type TerrainPolytopeSweepResult } from "./sweep-polytope.js";
2
+ import type { TerrainSurface } from "./surface.js";
3
+ type Point = readonly [number, number, number];
4
+ /**
5
+ * Sweep a fixed +Z cylinder or conical frustum. Inscribed and circumscribed
6
+ * polygonal bounds bracket contact. A hit reports the inner witness and a
7
+ * conservative outer lower fraction. An outer-only contact is incomplete.
8
+ */
9
+ export declare function sweepTerrainCylinder(surface: Pick<TerrainSurface, 'copyData' | 'origin'>, center: Point, height: number, radiusBottom: number, radiusTop: number, translation: Point, { sides, maxWork }?: {
10
+ sides?: number;
11
+ maxWork?: number;
12
+ }): TerrainPolytopeSweepResult & {
13
+ lowerFraction?: number;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=sweep-cylinder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-cylinder.d.ts","sourceRoot":"","sources":["../../src/terrain/sweep-cylinder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,0BAA0B,EAAC,4BAAyB;AACvF,OAAO,KAAK,EAAC,cAAc,EAAC,qBAAkB;AAE9C,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,QAAQ,CAAC,EACpD,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,KAAK,EAClB,EAAC,KAAU,EAAE,OAAiB,EAAC,GAAE;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAM,GACvE,0BAA0B,GAAG;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,CAyCvD"}
@@ -0,0 +1,52 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { sweepTerrainPolytope } from "./sweep-polytope.js";
5
+ /**
6
+ * Sweep a fixed +Z cylinder or conical frustum. Inscribed and circumscribed
7
+ * polygonal bounds bracket contact. A hit reports the inner witness and a
8
+ * conservative outer lower fraction. An outer-only contact is incomplete.
9
+ */
10
+ export function sweepTerrainCylinder(surface, center, height, radiusBottom, radiusTop, translation, { sides = 16, maxWork = 100000 } = {}) {
11
+ if (center.length !== 3 ||
12
+ !center.every(Number.isFinite) ||
13
+ ![height, radiusBottom, radiusTop].every(value => Number.isFinite(value) && value > 0) ||
14
+ !Number.isInteger(sides) ||
15
+ sides < 3 ||
16
+ sides > 128)
17
+ throw new RangeError('Invalid terrain cylinder sweep');
18
+ const faces = [];
19
+ for (let i = 0; i < sides; i++) {
20
+ const next = (i + 1) % sides;
21
+ faces.push([i, next, next + sides], [i, next + sides, i + sides]);
22
+ if (i > 0 && i < sides - 1)
23
+ faces.push([0, i + 1, i], [sides, sides + i, sides + i + 1]);
24
+ }
25
+ const hull = (scale) => ({
26
+ faces,
27
+ vertices: Array.from({ length: 2 * sides }, (_, i) => {
28
+ const top = i >= sides;
29
+ const angle = (2 * Math.PI * (i % sides)) / sides;
30
+ const radius = (top ? radiusTop : radiusBottom) * scale;
31
+ return [
32
+ center[0] + radius * Math.cos(angle),
33
+ center[1] + radius * Math.sin(angle),
34
+ center[2] + (top ? height : -height) / 2
35
+ ];
36
+ })
37
+ });
38
+ const outer = sweepTerrainPolytope(surface, hull(1 / Math.cos(Math.PI / sides)), translation, {
39
+ maxWork
40
+ });
41
+ if (outer.status !== 'hit')
42
+ return outer;
43
+ const inner = sweepTerrainPolytope(surface, hull(1), translation, {
44
+ maxWork: maxWork - outer.work
45
+ });
46
+ const work = outer.work + inner.work;
47
+ if (inner.status !== 'hit' || inner.fraction < outer.fraction)
48
+ return { status: 'incomplete', work };
49
+ // A polygonal witness does not establish the smooth cylinder's entry normal.
50
+ return { ...inner, normal: null, lowerFraction: outer.fraction, work };
51
+ }
52
+ //# sourceMappingURL=sweep-cylinder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-cylinder.js","sourceRoot":"","sources":["../../src/terrain/sweep-cylinder.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,oBAAoB,EAAkC,4BAAyB;AAKvF;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAoD,EACpD,MAAa,EACb,MAAc,EACd,YAAoB,EACpB,SAAiB,EACjB,WAAkB,EAClB,EAAC,KAAK,GAAG,EAAE,EAAE,OAAO,GAAG,MAAO,KAAwC,EAAE;IAExE,IACE,MAAM,CAAC,MAAM,KAAK,CAAC;QACnB,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC9B,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,K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vE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { TerrainPolytopeSweepResult } from "./sweep-polytope.js";
2
+ import type { TerrainSurface } from "./surface.js";
3
+ type Point = readonly [number, number, number];
4
+ /** Sweep an infinite two-sided plane under translation. Work counts active triangles. */
5
+ export declare function sweepTerrainPlane(surface: Pick<TerrainSurface, 'copyData' | 'origin'>, point: Point, normal: Point, translation: Point, { maxWork }?: {
6
+ maxWork?: number;
7
+ }): TerrainPolytopeSweepResult;
8
+ export {};
9
+ //# sourceMappingURL=sweep-plane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-plane.d.ts","sourceRoot":"","sources":["../../src/terrain/sweep-plane.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,0BAA0B,EAAC,4BAAyB;AACjE,OAAO,KAAK,EAAC,cAAc,EAAC,qBAAkB;AAE9C,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,yFAAyF;AACzF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,QAAQ,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,KAAK,EAClB,EAAC,OAAiB,EAAC,GAAE;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAM,GAC3C,0BAA0B,CA4C5B"}
@@ -0,0 +1,52 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ /** Sweep an infinite two-sided plane under translation. Work counts active triangles. */
5
+ export function sweepTerrainPlane(surface, point, normal, translation, { maxWork = 100000 } = {}) {
6
+ const length = Math.hypot(...normal);
7
+ if (![point, normal, translation].every(v => v.length === 3 && v.every(Number.isFinite)) ||
8
+ !(length > 0 && Number.isFinite(length)) ||
9
+ !Number.isSafeInteger(maxWork) ||
10
+ maxWork < 0)
11
+ throw new RangeError('Invalid terrain plane sweep');
12
+ const unit = [normal[0] / length, normal[1] / length, normal[2] / length];
13
+ const velocity = translation[0] * unit[0] + translation[1] * unit[1] + translation[2] * unit[2];
14
+ if (!Number.isFinite(velocity))
15
+ throw new RangeError('Terrain plane velocity overflow');
16
+ const { positions, indices, triangleValidity } = surface.copyData();
17
+ const local = point.map((value, axis) => value - surface.origin[axis]);
18
+ let work = 0;
19
+ let fraction = Infinity;
20
+ let triangleIndex = -1;
21
+ for (let i = 0; i < triangleValidity.length; i++) {
22
+ if (!triangleValidity[i])
23
+ continue;
24
+ if (work >= maxWork)
25
+ return { status: 'incomplete', work };
26
+ work++;
27
+ let min = Infinity;
28
+ let max = -Infinity;
29
+ for (let j = 0; j < 3; j++) {
30
+ const k = indices[3 * i + j] * 3;
31
+ const distance = (positions[k] - local[0]) * unit[0] +
32
+ (positions[k + 1] - local[1]) * unit[1] +
33
+ (positions[k + 2] - local[2]) * unit[2];
34
+ if (!Number.isFinite(distance))
35
+ throw new RangeError('Terrain plane projection overflow');
36
+ min = Math.min(min, distance);
37
+ max = Math.max(max, distance);
38
+ }
39
+ if (min <= 0 && max >= 0)
40
+ return { status: 'hit', fraction: 0, triangleIndex: i, normal: null, work };
41
+ const entry = velocity > 0 ? min / velocity : max / velocity;
42
+ if (velocity !== 0 && entry > 0 && entry <= 1 && entry < fraction) {
43
+ triangleIndex = i;
44
+ fraction = entry;
45
+ }
46
+ }
47
+ if (triangleIndex < 0)
48
+ return { status: 'miss', work };
49
+ const entryNormal = velocity < 0 ? unit : [-unit[0], -unit[1], -unit[2]];
50
+ return { status: 'hit', fraction, triangleIndex, normal: entryNormal, work };
51
+ }
52
+ //# sourceMappingURL=sweep-plane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-plane.js","sourceRoot":"","sources":["../../src/terrain/sweep-plane.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAO5D,yFAAyF;A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,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC9B,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAChC,CAAC;QACD,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACtB,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;QAC5E,MAAM,KAAK,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC;QAC7D,IAAI,QAAQ,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;YAClE,aAAa,GAAG,CAAC,CAAC;YAClB,QAAQ,GAAG,KAAK,CAAC;QACnB,CAAC;IACH,CAAC;IACD,IAAI,aAAa,GAAG,CAAC;QAAE,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;IACrD,MAAM,WAAW,GAAU,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { TerrainSurface } from "./surface.js";
2
+ type Point = readonly [number, number, number];
3
+ export type TerrainPolytope = {
4
+ /** Local Cartesian vertices in the same world frame as the sweep. */
5
+ vertices: readonly Point[];
6
+ /** Triangulated closed convex boundary. */
7
+ faces: readonly (readonly [number, number, number])[];
8
+ };
9
+ export type TerrainPolytopeSweepResult = {
10
+ status: 'miss' | 'incomplete';
11
+ work: number;
12
+ } | {
13
+ status: 'hit';
14
+ fraction: number;
15
+ triangleIndex: number;
16
+ normal: Point | null;
17
+ work: number;
18
+ };
19
+ /**
20
+ * Sweep a closed convex polytope under translation against active terrain triangles.
21
+ * Uses continuous separating-axis tests. The caller supplies a convex triangulated
22
+ * boundary in a numerically well-conditioned Cartesian frame. Initial overlap has
23
+ * no unique entry normal. Work counts tested axes across all active triangles.
24
+ */
25
+ export declare function sweepTerrainPolytope(surface: Pick<TerrainSurface, 'copyData' | 'origin'>, collider: TerrainPolytope, translation: Point, { maxWork }?: {
26
+ maxWork?: number;
27
+ }): TerrainPolytopeSweepResult;
28
+ /** @internal Test a conservative projection expansion along each separating axis. */
29
+ export declare function queryTerrainPolytope(data: ReturnType<TerrainSurface['copyData']>, origin: Point, collider: TerrainPolytope, translation: Point, maxWork: number, padding?: number): TerrainPolytopeSweepResult;
30
+ /** Sweep a two-sided triangle mesh under translation. A finite plane can be
31
+ * represented by two coplanar triangles. Work is shared across moving faces. */
32
+ export declare function sweepTerrainTriangleMesh(surface: Pick<TerrainSurface, 'copyData' | 'origin'>, collider: TerrainPolytope, translation: Point, { maxWork }?: {
33
+ maxWork?: number;
34
+ }): TerrainPolytopeSweepResult;
35
+ /** Sweep an axis-aligned box with positive half extents. */
36
+ export declare function sweepTerrainBox(surface: Pick<TerrainSurface, 'copyData' | 'origin'>, center: Point, halfExtents: Point, translation: Point, options?: {
37
+ maxWork?: number;
38
+ }): TerrainPolytopeSweepResult;
39
+ /** @internal */
40
+ export declare function createSweepBox(center: Point, halfExtents: Point): TerrainPolytope;
41
+ export {};
42
+ //# sourceMappingURL=sweep-polytope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-polytope.d.ts","sourceRoot":"","sources":["../../src/terrain/sweep-polytope.ts"],"names":[],"mappings":"AAIA,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,eAAe,EACzB,WAAW,EAAE,KAAK,EAClB,EAAC,OAAiB,EAAC,GAAE;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAM,GAC3C,0BAA0B,CA0C5B;AA6ED,4DAA4D;AAC5D,wBAAgB,eAAe,CAC7B,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,QAAQ,CAAC,EACpD,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,KAAK,EAClB,WAAW,EAAE,KAAK,EAClB,OAAO,CAAC,EAAE;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAC3B,0BAA0B,CAE5B;AAED,gBAAgB;AAChB,wBAAgB,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,GAAG,eAAe,CA4BjF"}
@@ -0,0 +1,189 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ const sub = (a, b) => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
5
+ const cross = (a, b) => [
6
+ a[1] * b[2] - a[2] * b[1],
7
+ a[2] * b[0] - a[0] * b[2],
8
+ a[0] * b[1] - a[1] * b[0]
9
+ ];
10
+ const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
11
+ const edges = ([a, b, c]) => [sub(b, a), sub(c, b), sub(a, c)];
12
+ /**
13
+ * Sweep a closed convex polytope under translation against active terrain triangles.
14
+ * Uses continuous separating-axis tests. The caller supplies a convex triangulated
15
+ * boundary in a numerically well-conditioned Cartesian frame. Initial overlap has
16
+ * no unique entry normal. Work counts tested axes across all active triangles.
17
+ */
18
+ export function sweepTerrainPolytope(surface, collider, translation, { maxWork = 100000 } = {}) {
19
+ return queryTerrainPolytope(surface.copyData(), surface.origin, collider, translation, maxWork);
20
+ }
21
+ /** @internal Test a conservative projection expansion along each separating axis. */
22
+ export function queryTerrainPolytope(data, origin, collider, translation, maxWork, padding = 0) {
23
+ if (!Number.isSafeInteger(maxWork) ||
24
+ maxWork < 0 ||
25
+ translation.length !== 3 ||
26
+ !translation.every(Number.isFinite) ||
27
+ collider.vertices.length < 4 ||
28
+ collider.faces.length < 4 ||
29
+ collider.vertices.some(point => point.length !== 3 || !point.every(Number.isFinite)))
30
+ throw new RangeError('Invalid terrain polytope sweep');
31
+ const vertices = collider.vertices.map(point => sub(point, origin));
32
+ const normals = [];
33
+ const directions = [];
34
+ for (const face of collider.faces) {
35
+ if (face.length !== 3 || face.some(i => !Number.isSafeInteger(i) || !vertices[i]))
36
+ throw new RangeError('Invalid terrain polytope face');
37
+ const side = edges([vertices[face[0]], vertices[face[1]], vertices[face[2]]]);
38
+ const normal = cross(side[0], side[1]);
39
+ if (!normal.every(Number.isFinite) || !normal.some(Boolean))
40
+ throw new RangeError('Degenerate terrain polytope face');
41
+ normals.push(normal);
42
+ directions.push(...side);
43
+ }
44
+ return sweepTriangles(data, vertices, normals, directions, translation, maxWork, undefined, padding);
45
+ }
46
+ /** Sweep a two-sided triangle mesh under translation. A finite plane can be
47
+ * represented by two coplanar triangles. Work is shared across moving faces. */
48
+ export function sweepTerrainTriangleMesh(surface, collider, translation, { maxWork = 100000 } = {}) {
49
+ if (!Number.isSafeInteger(maxWork) ||
50
+ maxWork < 0 ||
51
+ translation.length !== 3 ||
52
+ !translation.every(Number.isFinite))
53
+ throw new RangeError('Invalid terrain triangle mesh sweep');
54
+ const data = surface.copyData();
55
+ let work = 0;
56
+ let best;
57
+ for (const face of collider.faces) {
58
+ if (face.length !== 3)
59
+ throw new RangeError('Invalid terrain sweep mesh face');
60
+ const vertices = face.map(index => {
61
+ const point = collider.vertices[index];
62
+ if (!Number.isSafeInteger(index) ||
63
+ !point ||
64
+ point.length !== 3 ||
65
+ !point.every(Number.isFinite))
66
+ throw new RangeError('Invalid terrain sweep mesh vertex');
67
+ return sub(point, surface.origin);
68
+ });
69
+ const directions = edges(vertices);
70
+ const normal = cross(directions[0], directions[1]);
71
+ if (!normal.every(Number.isFinite) || !normal.some(Boolean))
72
+ throw new RangeError('Degenerate terrain sweep mesh face');
73
+ const result = sweepTriangles(data, vertices, [normal], directions, translation, maxWork - work, normal);
74
+ work += result.work;
75
+ if (result.status === 'incomplete')
76
+ return { status: 'incomplete', work };
77
+ if (result.status === 'hit' && (!best || result.fraction < best.fraction))
78
+ best = result;
79
+ }
80
+ return best ? { ...best, work } : { status: 'miss', work };
81
+ }
82
+ function sweepTriangles(data, vertices, normals, directions, translation, maxWork, movingTriangleNormal, padding = 0) {
83
+ let work = 0;
84
+ let best;
85
+ const vertex = (index) => {
86
+ const i = 3 * data.indices[index];
87
+ return [data.positions[i], data.positions[i + 1], data.positions[i + 2]];
88
+ };
89
+ for (let i = 0; i < data.triangleValidity.length; i++) {
90
+ if (!data.triangleValidity[i])
91
+ continue;
92
+ const triangle = [vertex(3 * i), vertex(3 * i + 1), vertex(3 * i + 2)];
93
+ const sides = edges(triangle);
94
+ let enter = 0;
95
+ let exit = best?.fraction ?? 1;
96
+ let normal = null;
97
+ function* axes() {
98
+ const terrainNormal = cross(sides[0], sides[1]);
99
+ yield terrainNormal;
100
+ if (movingTriangleNormal) {
101
+ for (const side of sides)
102
+ yield cross(terrainNormal, side);
103
+ for (const direction of directions)
104
+ yield cross(movingTriangleNormal, direction);
105
+ }
106
+ yield* normals;
107
+ for (const side of sides)
108
+ for (const direction of directions)
109
+ yield cross(side, direction);
110
+ }
111
+ for (const axis of axes()) {
112
+ if (work >= maxWork)
113
+ return { status: 'incomplete', work };
114
+ work++;
115
+ const length = Math.hypot(...axis);
116
+ if (length === 0)
117
+ continue;
118
+ const unit = [axis[0] / length, axis[1] / length, axis[2] / length];
119
+ const low = Math.min(...triangle.map(point => dot(point, unit)));
120
+ const high = Math.max(...triangle.map(point => dot(point, unit)));
121
+ let min = Infinity;
122
+ let max = -Infinity;
123
+ for (const point of vertices) {
124
+ const projection = dot(point, unit);
125
+ min = Math.min(min, projection);
126
+ max = Math.max(max, projection);
127
+ }
128
+ min -= padding;
129
+ max += padding;
130
+ const speed = dot(translation, unit);
131
+ if (![low, high, min, max, speed, length].every(Number.isFinite))
132
+ throw new RangeError('Terrain polytope projection overflow');
133
+ if (speed === 0) {
134
+ if (min > high || max < low)
135
+ exit = -1;
136
+ }
137
+ else {
138
+ const first = (low - max) / speed;
139
+ const last = (high - min) / speed;
140
+ const entry = Math.min(first, last);
141
+ if (entry > enter) {
142
+ enter = entry;
143
+ normal = speed < 0 ? unit : [-unit[0], -unit[1], -unit[2]];
144
+ }
145
+ exit = Math.min(exit, Math.max(first, last));
146
+ }
147
+ if (enter > exit)
148
+ break;
149
+ }
150
+ if (enter <= exit && (!best || enter < best.fraction)) {
151
+ best = { status: 'hit', fraction: enter, triangleIndex: i, normal, work };
152
+ if (enter === 0)
153
+ break;
154
+ }
155
+ }
156
+ return best ? { ...best, work } : { status: 'miss', work };
157
+ }
158
+ /** Sweep an axis-aligned box with positive half extents. */
159
+ export function sweepTerrainBox(surface, center, halfExtents, translation, options) {
160
+ return sweepTerrainPolytope(surface, createSweepBox(center, halfExtents), translation, options);
161
+ }
162
+ /** @internal */
163
+ export function createSweepBox(center, halfExtents) {
164
+ if (halfExtents.length !== 3 || halfExtents.some(value => !(value > 0)))
165
+ throw new RangeError('Terrain box half extents must be positive');
166
+ const vertices = Array.from({ length: 8 }, (_, i) => [
167
+ center[0] + (i & 1 ? 1 : -1) * halfExtents[0],
168
+ center[1] + (i & 2 ? 1 : -1) * halfExtents[1],
169
+ center[2] + (i & 4 ? 1 : -1) * halfExtents[2]
170
+ ]);
171
+ return {
172
+ vertices,
173
+ faces: [
174
+ [0, 1, 3],
175
+ [0, 3, 2],
176
+ [4, 6, 7],
177
+ [4, 7, 5],
178
+ [0, 4, 5],
179
+ [0, 5, 1],
180
+ [2, 3, 7],
181
+ [2, 7, 6],
182
+ [0, 2, 6],
183
+ [0, 6, 4],
184
+ [1, 5, 7],
185
+ [1, 7, 3]
186
+ ]
187
+ };
188
+ }
189
+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,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACT,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACV;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type TerrainCapsuleSweepResult } from "./sweep-capsule.js";
2
+ import type { TerrainRigidMotion } from "./sweep-rotation.js";
3
+ import type { TerrainSphereSweepOptions } from "./sweep-sphere.js";
4
+ import type { TerrainSurface } from "./surface.js";
5
+ /** Cartesian point in the terrain surface frame. */
6
+ type Point = readonly [number, number, number];
7
+ /**
8
+ * Bracket first contact for a capsule under linear pivot translation and shortest-arc
9
+ * rotation. Coincident axis endpoints describe a sphere, including an off-pivot
10
+ * sphere whose center follows a curved path. Unresolved tangency returns incomplete.
11
+ * The witness is an axis/triangle pair within the radius at the upper fraction.
12
+ */
13
+ export declare function sweepTerrainRotatingCapsule(surface: Pick<TerrainSurface, 'nearestSegmentQuery'>, start: Point, end: Point, radius: number, { pivot, translation, rotation }: TerrainRigidMotion, { maxWork, fractionTolerance }?: TerrainSphereSweepOptions): TerrainCapsuleSweepResult;
14
+ /** Sweep a sphere whose center may orbit an offset rigid-motion pivot. */
15
+ export declare function sweepTerrainRotatingSphere(surface: Pick<TerrainSurface, 'nearestSegmentQuery'>, center: Point, radius: number, motion: TerrainRigidMotion, options?: TerrainSphereSweepOptions): TerrainCapsuleSweepResult;
16
+ export {};
17
+ //# sourceMappingURL=sweep-rotating-capsule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-rotating-capsule.d.ts","sourceRoot":"","sources":["../../src/terrain/sweep-rotating-capsule.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,yBAAyB,EAAC,2BAAwB;AACpF,OAAO,KAAK,EAAC,kBAAkB,EAAC,4BAAyB;AACzD,OAAO,KAAK,EAAC,yBAAyB,EAAC,0BAAuB;AAC9D,OAAO,KAAK,EAAoB,cAAc,EAAC,qBAAkB;AAEjE,oDAAoD;AACpD,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,KAAK,EACV,MAAM,EAAE,MAAM,EACd,EAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAC,EAAE,kBAAkB,EAClD,EAAC,OAAiB,EAAE,iBAAwB,EAAC,GAAE,yBAA8B,GAC5E,yBAAyB,CAsG3B;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,EACpD,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,yBAAyB,GAClC,yBAAyB,CAE3B"}