@math.gl/geometry 5.0.0-alpha.9 → 5.0.0-beta.10

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 (457) hide show
  1. package/LICENSE +97 -49
  2. package/README.md +77 -1
  3. package/THIRD-PARTY-NOTICES.md +18 -0
  4. package/dist/color/color-lut-types.d.ts +16 -0
  5. package/dist/color/color-lut-types.d.ts.map +1 -0
  6. package/dist/color/color-lut-types.js +5 -0
  7. package/dist/color/color-lut-types.js.map +1 -0
  8. package/dist/color/index.cjs +132 -0
  9. package/dist/color/index.cjs.map +6 -0
  10. package/dist/color/index.d.ts +4 -0
  11. package/dist/color/index.d.ts.map +1 -0
  12. package/dist/color/index.js +5 -0
  13. package/dist/color/index.js.map +1 -0
  14. package/dist/color/sample-lut.d.ts +13 -0
  15. package/dist/color/sample-lut.d.ts.map +1 -0
  16. package/dist/color/sample-lut.js +132 -0
  17. package/dist/color/sample-lut.js.map +1 -0
  18. package/dist/culling/bounds.d.ts +20 -0
  19. package/dist/culling/bounds.d.ts.map +1 -0
  20. package/dist/culling/bounds.js +121 -0
  21. package/dist/culling/bounds.js.map +1 -0
  22. package/dist/culling/constants.d.ts +3 -0
  23. package/dist/culling/constants.d.ts.map +1 -0
  24. package/dist/culling/constants.js +5 -0
  25. package/dist/culling/constants.js.map +1 -0
  26. package/dist/culling/frustum-planes.d.ts +5 -0
  27. package/dist/culling/frustum-planes.d.ts.map +1 -0
  28. package/dist/culling/frustum-planes.js +37 -0
  29. package/dist/culling/frustum-planes.js.map +1 -0
  30. package/dist/culling/geometric-queries.d.ts +34 -0
  31. package/dist/culling/geometric-queries.d.ts.map +1 -0
  32. package/dist/culling/geometric-queries.js +208 -0
  33. package/dist/culling/geometric-queries.js.map +1 -0
  34. package/dist/culling/index.cjs +2560 -0
  35. package/dist/culling/index.cjs.map +6 -0
  36. package/dist/culling/index.d.ts +37 -0
  37. package/dist/culling/index.d.ts.map +1 -0
  38. package/dist/culling/index.js +29 -0
  39. package/dist/culling/index.js.map +1 -0
  40. package/dist/culling/lib/algorithms/bounding-box-from-points.d.ts +15 -0
  41. package/dist/culling/lib/algorithms/bounding-box-from-points.d.ts.map +1 -0
  42. package/dist/culling/lib/algorithms/bounding-box-from-points.js +137 -0
  43. package/dist/culling/lib/algorithms/bounding-box-from-points.js.map +1 -0
  44. package/dist/culling/lib/algorithms/bounding-sphere-from-points.d.ts +14 -0
  45. package/dist/culling/lib/algorithms/bounding-sphere-from-points.d.ts.map +1 -0
  46. package/dist/culling/lib/algorithms/bounding-sphere-from-points.js +146 -0
  47. package/dist/culling/lib/algorithms/bounding-sphere-from-points.js.map +1 -0
  48. package/dist/culling/lib/algorithms/compute-eigen-decomposition.d.ts +37 -0
  49. package/dist/culling/lib/algorithms/compute-eigen-decomposition.d.ts.map +1 -0
  50. package/dist/culling/lib/algorithms/compute-eigen-decomposition.js +137 -0
  51. package/dist/culling/lib/algorithms/compute-eigen-decomposition.js.map +1 -0
  52. package/dist/culling/lib/algorithms/oriented-bounding-box-quaternion.d.ts +7 -0
  53. package/dist/culling/lib/algorithms/oriented-bounding-box-quaternion.d.ts.map +1 -0
  54. package/dist/culling/lib/algorithms/oriented-bounding-box-quaternion.js +26 -0
  55. package/dist/culling/lib/algorithms/oriented-bounding-box-quaternion.js.map +1 -0
  56. package/dist/culling/lib/bounding-volumes/axis-aligned-bounding-box.d.ts +56 -0
  57. package/dist/culling/lib/bounding-volumes/axis-aligned-bounding-box.d.ts.map +1 -0
  58. package/dist/culling/lib/bounding-volumes/axis-aligned-bounding-box.js +133 -0
  59. package/dist/culling/lib/bounding-volumes/axis-aligned-bounding-box.js.map +1 -0
  60. package/dist/culling/lib/bounding-volumes/bounding-sphere.d.ts +40 -0
  61. package/dist/culling/lib/bounding-volumes/bounding-sphere.d.ts.map +1 -0
  62. package/dist/culling/lib/bounding-volumes/bounding-sphere.js +123 -0
  63. package/dist/culling/lib/bounding-volumes/bounding-sphere.js.map +1 -0
  64. package/dist/culling/lib/bounding-volumes/bounding-volume.d.ts +30 -0
  65. package/dist/culling/lib/bounding-volumes/bounding-volume.d.ts.map +1 -0
  66. package/dist/culling/lib/bounding-volumes/bounding-volume.js +7 -0
  67. package/dist/culling/lib/bounding-volumes/bounding-volume.js.map +1 -0
  68. package/dist/culling/lib/bounding-volumes/oriented-bounding-box.d.ts +62 -0
  69. package/dist/culling/lib/bounding-volumes/oriented-bounding-box.d.ts.map +1 -0
  70. package/dist/culling/lib/bounding-volumes/oriented-bounding-box.js +230 -0
  71. package/dist/culling/lib/bounding-volumes/oriented-bounding-box.js.map +1 -0
  72. package/dist/culling/lib/culling-volume.d.ts +49 -0
  73. package/dist/culling/lib/culling-volume.d.ts.map +1 -0
  74. package/dist/culling/lib/culling-volume.js +133 -0
  75. package/dist/culling/lib/culling-volume.js.map +1 -0
  76. package/dist/culling/lib/perspective-frustum.d.ts +153 -0
  77. package/dist/culling/lib/perspective-frustum.d.ts.map +1 -0
  78. package/dist/culling/lib/perspective-frustum.js +191 -0
  79. package/dist/culling/lib/perspective-frustum.js.map +1 -0
  80. package/dist/culling/lib/perspective-off-center-frustum.d.ts +158 -0
  81. package/dist/culling/lib/perspective-off-center-frustum.d.ts.map +1 -0
  82. package/dist/culling/lib/perspective-off-center-frustum.js +276 -0
  83. package/dist/culling/lib/perspective-off-center-frustum.js.map +1 -0
  84. package/dist/culling/lib/plane.d.ts +35 -0
  85. package/dist/culling/lib/plane.d.ts.map +1 -0
  86. package/dist/culling/lib/plane.js +90 -0
  87. package/dist/culling/lib/plane.js.map +1 -0
  88. package/dist/culling/lib/ray.d.ts +18 -0
  89. package/dist/culling/lib/ray.d.ts.map +1 -0
  90. package/dist/culling/lib/ray.js +51 -0
  91. package/dist/culling/lib/ray.js.map +1 -0
  92. package/dist/culling/lib/shapes/box-shape.d.ts +19 -0
  93. package/dist/culling/lib/shapes/box-shape.d.ts.map +1 -0
  94. package/dist/culling/lib/shapes/box-shape.js +69 -0
  95. package/dist/culling/lib/shapes/box-shape.js.map +1 -0
  96. package/dist/culling/lib/shapes/capsule-shape.d.ts +23 -0
  97. package/dist/culling/lib/shapes/capsule-shape.d.ts.map +1 -0
  98. package/dist/culling/lib/shapes/capsule-shape.js +151 -0
  99. package/dist/culling/lib/shapes/capsule-shape.js.map +1 -0
  100. package/dist/culling/lib/shapes/cylinder-shape.d.ts +22 -0
  101. package/dist/culling/lib/shapes/cylinder-shape.d.ts.map +1 -0
  102. package/dist/culling/lib/shapes/cylinder-shape.js +99 -0
  103. package/dist/culling/lib/shapes/cylinder-shape.js.map +1 -0
  104. package/dist/culling/lib/shapes/implicit-shape.d.ts +56 -0
  105. package/dist/culling/lib/shapes/implicit-shape.d.ts.map +1 -0
  106. package/dist/culling/lib/shapes/implicit-shape.js +142 -0
  107. package/dist/culling/lib/shapes/implicit-shape.js.map +1 -0
  108. package/dist/culling/lib/shapes/plane-shape.d.ts +27 -0
  109. package/dist/culling/lib/shapes/plane-shape.d.ts.map +1 -0
  110. package/dist/culling/lib/shapes/plane-shape.js +71 -0
  111. package/dist/culling/lib/shapes/plane-shape.js.map +1 -0
  112. package/dist/culling/lib/shapes/sphere-shape.d.ts +18 -0
  113. package/dist/culling/lib/shapes/sphere-shape.d.ts.map +1 -0
  114. package/dist/culling/lib/shapes/sphere-shape.js +43 -0
  115. package/dist/culling/lib/shapes/sphere-shape.js.map +1 -0
  116. package/dist/culling/oriented-box-2d.d.ts +22 -0
  117. package/dist/culling/oriented-box-2d.d.ts.map +1 -0
  118. package/dist/culling/oriented-box-2d.js +86 -0
  119. package/dist/culling/oriented-box-2d.js.map +1 -0
  120. package/dist/culling/queries.d.ts +44 -0
  121. package/dist/culling/queries.d.ts.map +1 -0
  122. package/dist/culling/queries.js +259 -0
  123. package/dist/culling/queries.js.map +1 -0
  124. package/dist/culling/screen-ray.d.ts +22 -0
  125. package/dist/culling/screen-ray.d.ts.map +1 -0
  126. package/dist/culling/screen-ray.js +55 -0
  127. package/dist/culling/screen-ray.js.map +1 -0
  128. package/dist/curves/adaptive-sampling.d.ts +16 -0
  129. package/dist/curves/adaptive-sampling.d.ts.map +1 -0
  130. package/dist/curves/adaptive-sampling.js +59 -0
  131. package/dist/curves/adaptive-sampling.js.map +1 -0
  132. package/dist/curves/bezier-curves.d.ts +18 -0
  133. package/dist/curves/bezier-curves.d.ts.map +1 -0
  134. package/dist/curves/bezier-curves.js +54 -0
  135. package/dist/curves/bezier-curves.js.map +1 -0
  136. package/dist/curves/catmull-rom-curve.d.ts +15 -0
  137. package/dist/curves/catmull-rom-curve.d.ts.map +1 -0
  138. package/dist/curves/catmull-rom-curve.js +77 -0
  139. package/dist/curves/catmull-rom-curve.js.map +1 -0
  140. package/dist/curves/curve-arc-length.d.ts +17 -0
  141. package/dist/curves/curve-arc-length.d.ts.map +1 -0
  142. package/dist/curves/curve-arc-length.js +58 -0
  143. package/dist/curves/curve-arc-length.js.map +1 -0
  144. package/dist/curves/curve.d.ts +23 -0
  145. package/dist/curves/curve.d.ts.map +1 -0
  146. package/dist/curves/curve.js +77 -0
  147. package/dist/curves/curve.js.map +1 -0
  148. package/dist/curves/hermite-curve.d.ts +9 -0
  149. package/dist/curves/hermite-curve.d.ts.map +1 -0
  150. package/dist/curves/hermite-curve.js +24 -0
  151. package/dist/curves/hermite-curve.js.map +1 -0
  152. package/dist/curves/index.d.ts +12 -0
  153. package/dist/curves/index.d.ts.map +1 -0
  154. package/dist/curves/index.js +11 -0
  155. package/dist/curves/index.js.map +1 -0
  156. package/dist/curves/parallel-transport.d.ts +12 -0
  157. package/dist/curves/parallel-transport.d.ts.map +1 -0
  158. package/dist/curves/parallel-transport.js +83 -0
  159. package/dist/curves/parallel-transport.js.map +1 -0
  160. package/dist/geometries/box-geometry.js +1 -1
  161. package/dist/geometries/box-geometry.js.map +1 -1
  162. package/dist/geometries/capsule-geometry.js +1 -1
  163. package/dist/geometries/capsule-geometry.js.map +1 -1
  164. package/dist/geometries/cylinder-geometry.js +1 -1
  165. package/dist/geometries/cylinder-geometry.js.map +1 -1
  166. package/dist/geometries/geometry-helpers.js +1 -1
  167. package/dist/geometries/geometry-helpers.js.map +1 -1
  168. package/dist/geometries/ico-sphere-geometry.js +1 -1
  169. package/dist/geometries/ico-sphere-geometry.js.map +1 -1
  170. package/dist/geometries/plane-geometry.js +1 -1
  171. package/dist/geometries/plane-geometry.js.map +1 -1
  172. package/dist/geometries/primitive-mesh-builder.d.ts +24 -0
  173. package/dist/geometries/primitive-mesh-builder.d.ts.map +1 -0
  174. package/dist/geometries/primitive-mesh-builder.js +74 -0
  175. package/dist/geometries/primitive-mesh-builder.js.map +1 -0
  176. package/dist/geometries/prism-geometry.d.ts +13 -0
  177. package/dist/geometries/prism-geometry.d.ts.map +1 -0
  178. package/dist/geometries/prism-geometry.js +34 -0
  179. package/dist/geometries/prism-geometry.js.map +1 -0
  180. package/dist/geometries/ring-geometry.d.ts +15 -0
  181. package/dist/geometries/ring-geometry.d.ts.map +1 -0
  182. package/dist/geometries/ring-geometry.js +64 -0
  183. package/dist/geometries/ring-geometry.js.map +1 -0
  184. package/dist/geometries/sphere-geometry.js +1 -1
  185. package/dist/geometries/sphere-geometry.js.map +1 -1
  186. package/dist/geometries/surface-of-revolution.js +1 -1
  187. package/dist/geometries/surface-of-revolution.js.map +1 -1
  188. package/dist/geometries/truncated-cone-geometry.js +1 -1
  189. package/dist/geometries/truncated-cone-geometry.js.map +1 -1
  190. package/dist/index.cjs +6993 -37
  191. package/dist/index.cjs.map +3 -3
  192. package/dist/index.d.ts +35 -0
  193. package/dist/index.d.ts.map +1 -1
  194. package/dist/index.js +20 -1
  195. package/dist/index.js.map +1 -1
  196. package/dist/lib/geometry-utils.js +1 -1
  197. package/dist/lib/geometry-utils.js.map +1 -1
  198. package/dist/lib/geometry.d.ts +1 -1
  199. package/dist/lib/geometry.d.ts.map +1 -1
  200. package/dist/lib/geometry.js +1 -1
  201. package/dist/lib/geometry.js.map +1 -1
  202. package/dist/lib/hinge-tree.d.ts +33 -0
  203. package/dist/lib/hinge-tree.d.ts.map +1 -0
  204. package/dist/lib/hinge-tree.js +144 -0
  205. package/dist/lib/hinge-tree.js.map +1 -0
  206. package/dist/lighting/index.cjs +175 -0
  207. package/dist/lighting/index.cjs.map +6 -0
  208. package/dist/lighting/index.d.ts +4 -0
  209. package/dist/lighting/index.d.ts.map +1 -0
  210. package/dist/lighting/index.js +5 -0
  211. package/dist/lighting/index.js.map +1 -0
  212. package/dist/lighting/lighting-types.d.ts +16 -0
  213. package/dist/lighting/lighting-types.d.ts.map +1 -0
  214. package/dist/lighting/lighting-types.js +5 -0
  215. package/dist/lighting/lighting-types.js.map +1 -0
  216. package/dist/lighting/photometry.d.ts +36 -0
  217. package/dist/lighting/photometry.d.ts.map +1 -0
  218. package/dist/lighting/photometry.js +181 -0
  219. package/dist/lighting/photometry.js.map +1 -0
  220. package/dist/parametric/lathe-geometry.d.ts +14 -0
  221. package/dist/parametric/lathe-geometry.d.ts.map +1 -0
  222. package/dist/parametric/lathe-geometry.js +48 -0
  223. package/dist/parametric/lathe-geometry.js.map +1 -0
  224. package/dist/parametric/parametric-geometry.d.ts +20 -0
  225. package/dist/parametric/parametric-geometry.d.ts.map +1 -0
  226. package/dist/parametric/parametric-geometry.js +88 -0
  227. package/dist/parametric/parametric-geometry.js.map +1 -0
  228. package/dist/parametric/torus-geometry.d.ts +19 -0
  229. package/dist/parametric/torus-geometry.d.ts.map +1 -0
  230. package/dist/parametric/torus-geometry.js +89 -0
  231. package/dist/parametric/torus-geometry.js.map +1 -0
  232. package/dist/parametric.d.ts +7 -0
  233. package/dist/parametric.d.ts.map +1 -0
  234. package/dist/parametric.js +7 -0
  235. package/dist/parametric.js.map +1 -0
  236. package/dist/polygon/clip-triangle-mesh.d.ts +41 -0
  237. package/dist/polygon/clip-triangle-mesh.d.ts.map +1 -0
  238. package/dist/polygon/clip-triangle-mesh.js +155 -0
  239. package/dist/polygon/clip-triangle-mesh.js.map +1 -0
  240. package/dist/polygon/cut-by-grid.d.ts +24 -0
  241. package/dist/polygon/cut-by-grid.d.ts.map +1 -0
  242. package/dist/polygon/cut-by-grid.js +221 -0
  243. package/dist/polygon/cut-by-grid.js.map +1 -0
  244. package/dist/polygon/cut-by-mercator-bounds.d.ts +17 -0
  245. package/dist/polygon/cut-by-mercator-bounds.d.ts.map +1 -0
  246. package/dist/polygon/cut-by-mercator-bounds.js +149 -0
  247. package/dist/polygon/cut-by-mercator-bounds.js.map +1 -0
  248. package/dist/polygon/earcut.d.ts +13 -0
  249. package/dist/polygon/earcut.d.ts.map +1 -0
  250. package/dist/polygon/earcut.js +693 -0
  251. package/dist/polygon/earcut.js.map +1 -0
  252. package/dist/polygon/index.d.ts +16 -0
  253. package/dist/polygon/index.d.ts.map +1 -0
  254. package/dist/polygon/index.js +14 -0
  255. package/dist/polygon/index.js.map +1 -0
  256. package/dist/polygon/lineclip.d.ts +31 -0
  257. package/dist/polygon/lineclip.d.ts.map +1 -0
  258. package/dist/polygon/lineclip.js +184 -0
  259. package/dist/polygon/lineclip.js.map +1 -0
  260. package/dist/polygon/pole-of-inaccessibility.d.ts +21 -0
  261. package/dist/polygon/pole-of-inaccessibility.d.ts.map +1 -0
  262. package/dist/polygon/pole-of-inaccessibility.js +285 -0
  263. package/dist/polygon/pole-of-inaccessibility.js.map +1 -0
  264. package/dist/polygon/polygon-utils.d.ts +103 -0
  265. package/dist/polygon/polygon-utils.d.ts.map +1 -0
  266. package/dist/polygon/polygon-utils.js +155 -0
  267. package/dist/polygon/polygon-utils.js.map +1 -0
  268. package/dist/polygon/polygon.d.ts +41 -0
  269. package/dist/polygon/polygon.d.ts.map +1 -0
  270. package/dist/polygon/polygon.js +76 -0
  271. package/dist/polygon/polygon.js.map +1 -0
  272. package/dist/polygon/subdivide-polyline.d.ts +56 -0
  273. package/dist/polygon/subdivide-polyline.d.ts.map +1 -0
  274. package/dist/polygon/subdivide-polyline.js +141 -0
  275. package/dist/polygon/subdivide-polyline.js.map +1 -0
  276. package/dist/polygon/subdivide-triangle-mesh.d.ts +78 -0
  277. package/dist/polygon/subdivide-triangle-mesh.d.ts.map +1 -0
  278. package/dist/polygon/subdivide-triangle-mesh.js +238 -0
  279. package/dist/polygon/subdivide-triangle-mesh.js.map +1 -0
  280. package/dist/polygon/utils.d.ts +5 -0
  281. package/dist/polygon/utils.d.ts.map +1 -0
  282. package/dist/polygon/utils.js +38 -0
  283. package/dist/polygon/utils.js.map +1 -0
  284. package/dist/spatial-index/box-index.d.ts +86 -0
  285. package/dist/spatial-index/box-index.d.ts.map +1 -0
  286. package/dist/spatial-index/box-index.js +335 -0
  287. package/dist/spatial-index/box-index.js.map +1 -0
  288. package/dist/spatial-index/index.d.ts +7 -0
  289. package/dist/spatial-index/index.d.ts.map +1 -0
  290. package/dist/spatial-index/index.js +6 -0
  291. package/dist/spatial-index/index.js.map +1 -0
  292. package/dist/spatial-index/triangle-bvh.d.ts +74 -0
  293. package/dist/spatial-index/triangle-bvh.d.ts.map +1 -0
  294. package/dist/spatial-index/triangle-bvh.js +221 -0
  295. package/dist/spatial-index/triangle-bvh.js.map +1 -0
  296. package/dist/utils/attribute-compression.d.ts +50 -0
  297. package/dist/utils/attribute-compression.d.ts.map +1 -0
  298. package/dist/utils/attribute-compression.js +186 -0
  299. package/dist/utils/attribute-compression.js.map +1 -0
  300. package/dist/utils/attribute-iterator.d.ts +8 -0
  301. package/dist/utils/attribute-iterator.d.ts.map +1 -0
  302. package/dist/utils/attribute-iterator.js +25 -0
  303. package/dist/utils/attribute-iterator.js.map +1 -0
  304. package/dist/utils/compose-attribute-provenance.d.ts +13 -0
  305. package/dist/utils/compose-attribute-provenance.d.ts.map +1 -0
  306. package/dist/utils/compose-attribute-provenance.js +63 -0
  307. package/dist/utils/compose-attribute-provenance.js.map +1 -0
  308. package/dist/utils/compute-vertex-normals.d.ts +4 -0
  309. package/dist/utils/compute-vertex-normals.d.ts.map +1 -0
  310. package/dist/utils/compute-vertex-normals.js +54 -0
  311. package/dist/utils/compute-vertex-normals.js.map +1 -0
  312. package/dist/utils/constants.d.ts +52 -0
  313. package/dist/utils/constants.d.ts.map +1 -0
  314. package/dist/utils/constants.js +39 -0
  315. package/dist/utils/constants.js.map +1 -0
  316. package/dist/utils/coordinates.d.ts +3 -0
  317. package/dist/utils/coordinates.d.ts.map +1 -0
  318. package/dist/utils/coordinates.js +8 -0
  319. package/dist/utils/coordinates.js.map +1 -0
  320. package/dist/utils/geometry.d.ts +20 -0
  321. package/dist/utils/geometry.d.ts.map +1 -0
  322. package/dist/utils/geometry.js +31 -0
  323. package/dist/utils/geometry.js.map +1 -0
  324. package/dist/utils/gl-type.d.ts +17 -0
  325. package/dist/utils/gl-type.d.ts.map +1 -0
  326. package/dist/utils/gl-type.js +69 -0
  327. package/dist/utils/gl-type.js.map +1 -0
  328. package/dist/utils/index.d.ts +18 -0
  329. package/dist/utils/index.d.ts.map +1 -0
  330. package/dist/utils/index.js +16 -0
  331. package/dist/utils/index.js.map +1 -0
  332. package/dist/utils/interpolate-packed-attributes.d.ts +43 -0
  333. package/dist/utils/interpolate-packed-attributes.d.ts.map +1 -0
  334. package/dist/utils/interpolate-packed-attributes.js +192 -0
  335. package/dist/utils/interpolate-packed-attributes.js.map +1 -0
  336. package/dist/utils/mesh-processing.d.ts +18 -0
  337. package/dist/utils/mesh-processing.d.ts.map +1 -0
  338. package/dist/utils/mesh-processing.js +300 -0
  339. package/dist/utils/mesh-processing.js.map +1 -0
  340. package/dist/utils/primitive-iterator.d.ts +21 -0
  341. package/dist/utils/primitive-iterator.d.ts.map +1 -0
  342. package/dist/utils/primitive-iterator.js +117 -0
  343. package/dist/utils/primitive-iterator.js.map +1 -0
  344. package/dist/utils/project-bounds.d.ts +44 -0
  345. package/dist/utils/project-bounds.d.ts.map +1 -0
  346. package/dist/utils/project-bounds.js +93 -0
  347. package/dist/utils/project-bounds.js.map +1 -0
  348. package/dist/utils/project-texture-coordinates.d.ts +19 -0
  349. package/dist/utils/project-texture-coordinates.d.ts.map +1 -0
  350. package/dist/utils/project-texture-coordinates.js +49 -0
  351. package/dist/utils/project-texture-coordinates.js.map +1 -0
  352. package/dist/utils/qualify-surface-transition.d.ts +21 -0
  353. package/dist/utils/qualify-surface-transition.d.ts.map +1 -0
  354. package/dist/utils/qualify-surface-transition.js +140 -0
  355. package/dist/utils/qualify-surface-transition.js.map +1 -0
  356. package/dist/utils/rgb565.d.ts +5 -0
  357. package/dist/utils/rgb565.d.ts.map +1 -0
  358. package/dist/utils/rgb565.js +24 -0
  359. package/dist/utils/rgb565.js.map +1 -0
  360. package/dist/utils/typed-array-utils.d.ts +3 -0
  361. package/dist/utils/typed-array-utils.d.ts.map +1 -0
  362. package/dist/utils/typed-array-utils.js +16 -0
  363. package/dist/utils/typed-array-utils.js.map +1 -0
  364. package/package.json +24 -4
  365. package/src/color/color-lut-types.ts +19 -0
  366. package/src/color/index.ts +6 -0
  367. package/src/color/sample-lut.ts +175 -0
  368. package/src/culling/bounds.ts +152 -0
  369. package/src/culling/constants.ts +6 -0
  370. package/src/culling/frustum-planes.ts +41 -0
  371. package/src/culling/geometric-queries.ts +299 -0
  372. package/src/culling/index.ts +93 -0
  373. package/src/culling/lib/algorithms/bounding-box-from-points.ts +174 -0
  374. package/src/culling/lib/algorithms/bounding-sphere-from-points.ts +175 -0
  375. package/src/culling/lib/algorithms/compute-eigen-decomposition.ts +171 -0
  376. package/src/culling/lib/algorithms/oriented-bounding-box-quaternion.ts +32 -0
  377. package/src/culling/lib/bounding-volumes/axis-aligned-bounding-box.ts +171 -0
  378. package/src/culling/lib/bounding-volumes/bounding-sphere.ts +154 -0
  379. package/src/culling/lib/bounding-volumes/bounding-volume.ts +38 -0
  380. package/src/culling/lib/bounding-volumes/oriented-bounding-box.ts +320 -0
  381. package/src/culling/lib/culling-volume.ts +171 -0
  382. package/src/culling/lib/perspective-frustum.ts +288 -0
  383. package/src/culling/lib/perspective-off-center-frustum.ts +381 -0
  384. package/src/culling/lib/plane.ts +118 -0
  385. package/src/culling/lib/ray.ts +54 -0
  386. package/src/culling/lib/shapes/box-shape.ts +78 -0
  387. package/src/culling/lib/shapes/capsule-shape.ts +232 -0
  388. package/src/culling/lib/shapes/cylinder-shape.ts +133 -0
  389. package/src/culling/lib/shapes/implicit-shape.ts +209 -0
  390. package/src/culling/lib/shapes/plane-shape.ts +78 -0
  391. package/src/culling/lib/shapes/sphere-shape.ts +60 -0
  392. package/src/culling/oriented-box-2d.ts +165 -0
  393. package/src/culling/queries.ts +332 -0
  394. package/src/culling/screen-ray.ts +75 -0
  395. package/src/curves/adaptive-sampling.ts +85 -0
  396. package/src/curves/bezier-curves.ts +62 -0
  397. package/src/curves/catmull-rom-curve.ts +89 -0
  398. package/src/curves/curve-arc-length.ts +70 -0
  399. package/src/curves/curve.ts +96 -0
  400. package/src/curves/hermite-curve.ts +34 -0
  401. package/src/curves/index.ts +19 -0
  402. package/src/curves/parallel-transport.ts +104 -0
  403. package/src/geometries/box-geometry.ts +1 -1
  404. package/src/geometries/capsule-geometry.ts +1 -1
  405. package/src/geometries/cylinder-geometry.ts +1 -1
  406. package/src/geometries/geometry-helpers.ts +1 -1
  407. package/src/geometries/ico-sphere-geometry.ts +1 -1
  408. package/src/geometries/plane-geometry.ts +1 -1
  409. package/src/geometries/primitive-mesh-builder.ts +84 -0
  410. package/src/geometries/prism-geometry.ts +57 -0
  411. package/src/geometries/ring-geometry.ts +102 -0
  412. package/src/geometries/sphere-geometry.ts +1 -1
  413. package/src/geometries/surface-of-revolution.ts +1 -1
  414. package/src/geometries/truncated-cone-geometry.ts +1 -1
  415. package/src/index.ts +226 -1
  416. package/src/lib/geometry-utils.ts +2 -2
  417. package/src/lib/geometry.ts +2 -2
  418. package/src/lib/hinge-tree.ts +170 -0
  419. package/src/lighting/index.ts +10 -0
  420. package/src/lighting/lighting-types.ts +20 -0
  421. package/src/lighting/photometry.ts +264 -0
  422. package/src/parametric/lathe-geometry.ts +70 -0
  423. package/src/parametric/parametric-geometry.ts +118 -0
  424. package/src/parametric/torus-geometry.ts +118 -0
  425. package/src/parametric.ts +9 -0
  426. package/src/polygon/clip-triangle-mesh.ts +218 -0
  427. package/src/polygon/cut-by-grid.ts +313 -0
  428. package/src/polygon/cut-by-mercator-bounds.ts +204 -0
  429. package/src/polygon/earcut.ts +859 -0
  430. package/src/polygon/index.ts +48 -0
  431. package/src/polygon/lineclip.ts +218 -0
  432. package/src/polygon/pole-of-inaccessibility.ts +330 -0
  433. package/src/polygon/polygon-utils.ts +273 -0
  434. package/src/polygon/polygon.ts +105 -0
  435. package/src/polygon/subdivide-polyline.ts +223 -0
  436. package/src/polygon/subdivide-triangle-mesh.ts +342 -0
  437. package/src/polygon/utils.ts +50 -0
  438. package/src/spatial-index/box-index.ts +452 -0
  439. package/src/spatial-index/index.ts +20 -0
  440. package/src/spatial-index/triangle-bvh.ts +345 -0
  441. package/src/utils/attribute-compression.ts +234 -0
  442. package/src/utils/attribute-iterator.ts +28 -0
  443. package/src/utils/compose-attribute-provenance.ts +74 -0
  444. package/src/utils/compute-vertex-normals.ts +63 -0
  445. package/src/utils/constants.ts +42 -0
  446. package/src/utils/coordinates.ts +8 -0
  447. package/src/utils/geometry.ts +49 -0
  448. package/src/utils/gl-type.ts +87 -0
  449. package/src/utils/index.ts +55 -0
  450. package/src/utils/interpolate-packed-attributes.ts +284 -0
  451. package/src/utils/mesh-processing.ts +377 -0
  452. package/src/utils/primitive-iterator.ts +145 -0
  453. package/src/utils/project-bounds.ts +154 -0
  454. package/src/utils/project-texture-coordinates.ts +67 -0
  455. package/src/utils/qualify-surface-transition.ts +169 -0
  456. package/src/utils/rgb565.ts +26 -0
  457. package/src/utils/typed-array-utils.ts +16 -0
@@ -0,0 +1,276 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // SPDX-FileCopyrightText: Copyright 2011-2018 CesiumJS Contributors
4
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
5
+ // SPDX-FileComment: Derived from Cesium. See the repository LICENSE for upstream attribution and Apache-2.0 terms.
6
+ // This file is derived from the Cesium math library under Apache 2 license
7
+ // See ../../../LICENSE for the retained Cesium notice and Apache-2.0 terms.
8
+ // Note: This class is still an experimental export, mainly used by other test cases
9
+ // - It has not been fully adapted to math.gl conventions
10
+ // - Documentation has not been ported
11
+ import { Vector3, Matrix4, assert } from '@math.gl/core';
12
+ import { CullingVolume } from "./culling-volume.js";
13
+ import { Plane } from "./plane.js";
14
+ const scratchPlaneUpVector = new Vector3();
15
+ const scratchPlaneRightVector = new Vector3();
16
+ const scratchPlaneNearCenter = new Vector3();
17
+ const scratchPlaneFarCenter = new Vector3();
18
+ const scratchPlaneNormal = new Vector3();
19
+ export class PerspectiveOffCenterFrustum {
20
+ /**
21
+ * The viewing frustum is defined by 6 planes.
22
+ * Each plane is represented by a {@link Vector4} object, where the x, y, and z components
23
+ * define the unit vector normal to the plane, and the w component is the distance of the
24
+ * plane from the origin/camera position.
25
+ *
26
+ * @alias PerspectiveOffCenterFrustum
27
+ *
28
+ * @example
29
+ * const frustum = new PerspectiveOffCenterFrustum({
30
+ * left : -1.0,
31
+ * right : 1.0,
32
+ * top : 1.0,
33
+ * bottom : -1.0,
34
+ * near : 1.0,
35
+ * far : 100.0
36
+ * });
37
+ *
38
+ * @see PerspectiveFrustum
39
+ */
40
+ constructor(options = {}) {
41
+ this._cullingVolume = new CullingVolume([
42
+ new Plane(),
43
+ new Plane(),
44
+ new Plane(),
45
+ new Plane(),
46
+ new Plane(),
47
+ new Plane()
48
+ ]);
49
+ this._perspectiveMatrix = new Matrix4();
50
+ this._infinitePerspective = new Matrix4();
51
+ const { near = 1.0, far = 500000000.0 } = options;
52
+ this.left = options.left;
53
+ this._left = undefined;
54
+ this.right = options.right;
55
+ this._right = undefined;
56
+ this.top = options.top;
57
+ this._top = undefined;
58
+ this.bottom = options.bottom;
59
+ this._bottom = undefined;
60
+ this.near = near;
61
+ this._near = near;
62
+ this.far = far;
63
+ this._far = far;
64
+ }
65
+ /**
66
+ * Returns a duplicate of a PerspectiveOffCenterFrustum instance.
67
+ * @returns {PerspectiveOffCenterFrustum} A new PerspectiveFrustum instance.
68
+ * */
69
+ clone() {
70
+ return new PerspectiveOffCenterFrustum({
71
+ right: this.right,
72
+ left: this.left,
73
+ top: this.top,
74
+ bottom: this.bottom,
75
+ near: this.near,
76
+ far: this.far
77
+ });
78
+ }
79
+ /**
80
+ * Compares the provided PerspectiveOffCenterFrustum componentwise and returns
81
+ * <code>true</code> if they are equal, <code>false</code> otherwise.
82
+ *
83
+ * @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
84
+ */
85
+ equals(other) {
86
+ return (other &&
87
+ other instanceof PerspectiveOffCenterFrustum &&
88
+ this.right === other.right &&
89
+ this.left === other.left &&
90
+ this.top === other.top &&
91
+ this.bottom === other.bottom &&
92
+ this.near === other.near &&
93
+ this.far === other.far);
94
+ }
95
+ /**
96
+ * Gets the perspective projection matrix computed from the view frustum.
97
+ * @memberof PerspectiveOffCenterFrustum.prototype
98
+ * @type {Matrix4}
99
+ *
100
+ * @see PerspectiveOffCenterFrustum#infiniteProjectionMatrix
101
+ */
102
+ get projectionMatrix() {
103
+ this._update();
104
+ return this._perspectiveMatrix;
105
+ }
106
+ /**
107
+ * Gets the perspective projection matrix computed from the view frustum with an infinite far plane.
108
+ * @memberof PerspectiveOffCenterFrustum.prototype
109
+ * @type {Matrix4}
110
+ *
111
+ * @see PerspectiveOffCenterFrustum#projectionMatrix
112
+ */
113
+ get infiniteProjectionMatrix() {
114
+ this._update();
115
+ return this._infinitePerspective;
116
+ }
117
+ /**
118
+ * Creates a culling volume for this frustum.
119
+ * @returns {CullingVolume} A culling volume at the given position and orientation.
120
+ *
121
+ * @example
122
+ * // Check if a bounding volume intersects the frustum.
123
+ * const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
124
+ * const intersect = cullingVolume.computeVisibility(boundingVolume);
125
+ */
126
+ // eslint-disable-next-line complexity, max-statements
127
+ computeCullingVolume(
128
+ /** A Vector3 defines the eye position. */
129
+ position,
130
+ /** A Vector3 defines the view direction. */
131
+ direction,
132
+ /** A Vector3 defines the up direction. */
133
+ up) {
134
+ assert(position, 'position is required.');
135
+ assert(direction, 'direction is required.');
136
+ assert(up, 'up is required.');
137
+ const planes = this._cullingVolume.planes;
138
+ up = scratchPlaneUpVector.copy(up).normalize();
139
+ const right = scratchPlaneRightVector.copy(direction).cross(up).normalize();
140
+ const nearCenter = scratchPlaneNearCenter
141
+ .copy(direction)
142
+ .multiplyByScalar(this.near)
143
+ .add(position);
144
+ const farCenter = scratchPlaneFarCenter
145
+ .copy(direction)
146
+ .multiplyByScalar(this.far)
147
+ .add(position);
148
+ let normal = scratchPlaneNormal;
149
+ // Left plane computation
150
+ normal.copy(right).multiplyByScalar(this.left).add(nearCenter).subtract(position).cross(up);
151
+ planes[0].fromPointNormal(position, normal);
152
+ // Right plane computation
153
+ normal
154
+ .copy(right)
155
+ .multiplyByScalar(this.right)
156
+ .add(nearCenter)
157
+ .subtract(position)
158
+ .cross(up)
159
+ .negate();
160
+ planes[1].fromPointNormal(position, normal);
161
+ // Bottom plane computation
162
+ normal
163
+ .copy(up)
164
+ .multiplyByScalar(this.bottom)
165
+ .add(nearCenter)
166
+ .subtract(position)
167
+ .cross(right)
168
+ .negate();
169
+ planes[2].fromPointNormal(position, normal);
170
+ // Top plane computation
171
+ normal.copy(up).multiplyByScalar(this.top).add(nearCenter).subtract(position).cross(right);
172
+ planes[3].fromPointNormal(position, normal);
173
+ normal = new Vector3().copy(direction);
174
+ // Near plane computation
175
+ planes[4].fromPointNormal(nearCenter, normal);
176
+ // Far plane computation
177
+ normal.negate();
178
+ planes[5].fromPointNormal(farCenter, normal);
179
+ return this._cullingVolume;
180
+ }
181
+ /**
182
+ * Returns the pixel's width and height in meters.
183
+ *
184
+ * @returns {Vector2} The modified result parameter or a new instance of {@link Vector2} with the pixel's width and height in the x and y properties, respectively.
185
+ *
186
+ * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
187
+ * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
188
+ *
189
+ * @example
190
+ * // Example 1
191
+ * // Get the width and height of a pixel.
192
+ * const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, new Vector2());
193
+ *
194
+ * @example
195
+ * // Example 2
196
+ * // Get the width and height of a pixel if the near plane was set to 'distance'.
197
+ * // For example, get the size of a pixel of an image on a billboard.
198
+ * const position = camera.position;
199
+ * const direction = camera.direction;
200
+ * const toCenter = Vector3.subtract(primitive.boundingVolume.center, position, new Vector3()); // vector from camera to a primitive
201
+ * const toCenterProj = Vector3.multiplyByScalar(direction, Vector3.dot(direction, toCenter), new Vector3()); // project vector onto camera direction vector
202
+ * const distance = Vector3.magnitude(toCenterProj);
203
+ * const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, new Vector2());
204
+ */
205
+ getPixelDimensions(
206
+ /** The width of the drawing buffer. */
207
+ drawingBufferWidth,
208
+ /** The height of the drawing buffer. */
209
+ drawingBufferHeight,
210
+ /** The distance to the near plane in meters. */
211
+ distance,
212
+ /** The object onto which to store the result. */
213
+ result) {
214
+ this._update();
215
+ assert(Number.isFinite(drawingBufferWidth) && Number.isFinite(drawingBufferHeight));
216
+ // 'Both drawingBufferWidth and drawingBufferHeight are required.'
217
+ assert(drawingBufferWidth > 0);
218
+ // 'drawingBufferWidth must be greater than zero.'
219
+ assert(drawingBufferHeight > 0);
220
+ // 'drawingBufferHeight must be greater than zero.'
221
+ assert(distance > 0);
222
+ // 'distance is required.');
223
+ assert(result);
224
+ // 'A result object is required.');
225
+ const inverseNear = 1.0 / this.near;
226
+ let tanTheta = this.top * inverseNear;
227
+ const pixelHeight = (2.0 * distance * tanTheta) / drawingBufferHeight;
228
+ tanTheta = this.right * inverseNear;
229
+ const pixelWidth = (2.0 * distance * tanTheta) / drawingBufferWidth;
230
+ result.x = pixelWidth;
231
+ result.y = pixelHeight;
232
+ return result;
233
+ }
234
+ // eslint-disable-next-line complexity, max-statements
235
+ _update() {
236
+ assert(Number.isFinite(this.right) &&
237
+ Number.isFinite(this.left) &&
238
+ Number.isFinite(this.top) &&
239
+ Number.isFinite(this.bottom) &&
240
+ Number.isFinite(this.near) &&
241
+ Number.isFinite(this.far));
242
+ // throw new DeveloperError('right, left, top, bottom, near, or far parameters are not set.');
243
+ const { top, bottom, right, left, near, far } = this;
244
+ if (top !== this._top ||
245
+ bottom !== this._bottom ||
246
+ left !== this._left ||
247
+ right !== this._right ||
248
+ near !== this._near ||
249
+ far !== this._far) {
250
+ assert(this.near > 0 && this.near < this.far, 'near must be greater than zero and less than far.');
251
+ this._left = left;
252
+ this._right = right;
253
+ this._top = top;
254
+ this._bottom = bottom;
255
+ this._near = near;
256
+ this._far = far;
257
+ this._perspectiveMatrix = new Matrix4().frustum({
258
+ left,
259
+ right,
260
+ bottom,
261
+ top,
262
+ near,
263
+ far
264
+ });
265
+ this._infinitePerspective = new Matrix4().frustum({
266
+ left,
267
+ right,
268
+ bottom,
269
+ top,
270
+ near,
271
+ far: Infinity
272
+ });
273
+ }
274
+ }
275
+ }
276
+ //# sourceMappingURL=perspective-off-center-frustum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"perspective-off-center-frustum.js","sourceRoot":"","sources":["../../../src/culling/lib/perspective-off-center-frustum.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,8CAA8C;AAC9C,oEAAoE;AACpE,4DAA4D;AAC5D,mHAAmH;AAEnH,2EAA2E;AAC3E,4EAA4E;AAE5E,oFAAoF;AACpF,yDAAyD;AACzD,sCAAsC;AAEtC,OAAO,EAAC,OAAO,EAAW,OAAO,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,KAAK,EAAC,mBAAgB;AAE9B,MAAM,oBAAoB,GAAG,IAAI,OAAO,EAAE,CAAC;AAC3C,MAAM,uBAAuB,GA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MAAM,KAAK,IAAI,CAAC,OAAO;YACvB,IAAI,KAAK,IAAI,CAAC,KAAK;YACnB,KAAK,KAAK,IAAI,CAAC,MAAM;YACrB,IAAI,KAAK,IAAI,CAAC,KAAK;YACnB,GAAG,KAAK,IAAI,CAAC,IAAI,EACjB,CAAC;YACD,MAAM,CACJ,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,EACrC,mDAAmD,CACpD,CAAC;YAEF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;YAChB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;YAChB,IAAI,CAAC,kBAAkB,GAAG,IAAI,OAAO,EAAE,CAAC,OAAO,CAAC;gBAC9C,IAAI;gBACJ,KAAK;gBACL,MAAM;gBACN,GAAG;gBACH,IAAI;gBACJ,GAAG;aACJ,CAAC,CAAC;YACH,IAAI,CAAC,oBAAoB,GAAG,IAAI,OAAO,EAAE,CAAC,OAAO,CAAC;gBAChD,IAAI;gBACJ,KAAK;gBACL,MAAM;gBACN,GAAG;gBACH,IAAI;gBACJ,GAAG,EAAE,QAAQ;aACd,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,35 @@
1
+ import { Vector3, NumericArray } from '@math.gl/core';
2
+ import { Ray } from "./ray.js";
3
+ export declare class Plane {
4
+ readonly normal: Vector3;
5
+ distance: number;
6
+ constructor(normal?: Readonly<NumericArray>, distance?: number);
7
+ /** Creates a plane from a normal and a distance from the origin. */
8
+ fromNormalDistance(normal: Readonly<NumericArray>, distance: number): this;
9
+ /** Creates a plane from a normal and a point on the plane. */
10
+ fromPointNormal(point: Readonly<NumericArray>, normal: Readonly<NumericArray>): this;
11
+ /** Creates a plane from the general equation */
12
+ fromCoefficients(a: number, b: number, c: number, d: number): this;
13
+ /** Duplicates a Plane instance. */
14
+ clone(): Plane;
15
+ /** Compares the provided Planes by normal and distance */
16
+ equals(right: Plane): boolean;
17
+ /** Computes the signed shortest distance of a point to a plane.
18
+ * The sign of the distance determines which side of the plane the point is on.
19
+ */
20
+ getPointDistance(point: Readonly<NumericArray>): number;
21
+ /** Transforms the plane by the given transformation matrix. */
22
+ transform(matrix4: Readonly<NumericArray>): this;
23
+ /** Projects a point onto the plane. */
24
+ projectPointOntoPlane(point: Readonly<NumericArray>, result: Vector3): Vector3;
25
+ projectPointOntoPlane(point: Readonly<NumericArray>, result?: readonly number[]): readonly number[];
26
+ /**
27
+ * Computes the intersection of a ray and this plane.
28
+ *
29
+ * @param {Ray} ray The ray.
30
+ * @param {Vector3} [result] The object onto which to store the result.
31
+ * @returns {Vector3} The intersection point or undefined if there is no intersection.
32
+ */
33
+ intersectWithRay(ray: Ray, result?: Vector3): Vector3 | undefined;
34
+ }
35
+ //# sourceMappingURL=plane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plane.d.ts","sourceRoot":"","sources":["../../../src/culling/lib/plane.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,OAAO,EAAkB,YAAY,EAAa,MAAM,eAAe,CAAC;AAChF,OAAO,EAAC,GAAG,EAAC,iBAAc;AAM1B,qBAAa,KAAK;IAChB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;gBAEL,MAAM,GAAE,QAAQ,CAAC,YAAY,CAAa,EAAE,QAAQ,GAAE,MAAU;IAM5E,oEAAoE;IACpE,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAO1E,8DAA8D;IAC9D,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI;IAQpF,gDAAgD;IAChD,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAOlE,mCAAmC;IACnC,KAAK,IAAI,KAAK;IAId,0DAA0D;IAC1D,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAI7B;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,MAAM;IAIvD,+DAA+D;IAC/D,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI;IAMhD,uCAAuC;IACvC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO;IAC9E,qBAAqB,CACnB,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC7B,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GACzB,SAAS,MAAM,EAAE;IAWpB;;;;;;OAMG;IACH,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,GAAE,OAAuB,GAAG,OAAO,GAAG,SAAS;CAkBjF"}
@@ -0,0 +1,90 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // SPDX-FileCopyrightText: Copyright 2011-2018 CesiumJS Contributors
4
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
5
+ // SPDX-FileComment: Derived from Cesium. See the repository LICENSE for upstream attribution and Apache-2.0 terms.
6
+ // This file is derived from the Cesium math library under Apache 2 license
7
+ // See ../../../LICENSE for the retained Cesium notice and Apache-2.0 terms.
8
+ /* eslint-disable */
9
+ import { Vector3, equals, assert, _MathUtils } from '@math.gl/core';
10
+ const scratchPosition = new Vector3();
11
+ const scratchNormal = new Vector3();
12
+ // A plane in Hessian Normal Form
13
+ export class Plane {
14
+ constructor(normal = [0, 0, 1], distance = 0) {
15
+ this.normal = new Vector3();
16
+ this.distance = -0;
17
+ this.fromNormalDistance(normal, distance);
18
+ }
19
+ /** Creates a plane from a normal and a distance from the origin. */
20
+ fromNormalDistance(normal, distance) {
21
+ assert(Number.isFinite(distance));
22
+ this.normal.from(normal).normalize();
23
+ this.distance = distance;
24
+ return this;
25
+ }
26
+ /** Creates a plane from a normal and a point on the plane. */
27
+ fromPointNormal(point, normal) {
28
+ point = scratchPosition.from(point);
29
+ this.normal.from(normal).normalize();
30
+ const distance = -this.normal.dot(point);
31
+ this.distance = distance;
32
+ return this;
33
+ }
34
+ /** Creates a plane from the general equation */
35
+ fromCoefficients(a, b, c, d) {
36
+ this.normal.set(a, b, c);
37
+ assert(equals(this.normal.len(), 1));
38
+ this.distance = d;
39
+ return this;
40
+ }
41
+ /** Duplicates a Plane instance. */
42
+ clone() {
43
+ return new Plane(this.normal, this.distance);
44
+ }
45
+ /** Compares the provided Planes by normal and distance */
46
+ equals(right) {
47
+ return equals(this.distance, right.distance) && equals(this.normal, right.normal);
48
+ }
49
+ /** Computes the signed shortest distance of a point to a plane.
50
+ * The sign of the distance determines which side of the plane the point is on.
51
+ */
52
+ getPointDistance(point) {
53
+ return this.normal.dot(point) + this.distance;
54
+ }
55
+ /** Transforms the plane by the given transformation matrix. */
56
+ transform(matrix4) {
57
+ const normal = scratchNormal.copy(this.normal).transformAsVector(matrix4).normalize();
58
+ const point = this.normal.scale(-this.distance).transform(matrix4);
59
+ return this.fromPointNormal(point, normal);
60
+ }
61
+ projectPointOntoPlane(point, result = [0, 0, 0]) {
62
+ const scratchPoint = scratchPosition.from(point);
63
+ // projectedPoint = point - (normal.point + scale) * normal
64
+ const pointDistance = this.getPointDistance(scratchPoint);
65
+ const scaledNormal = scratchNormal.copy(this.normal).scale(pointDistance);
66
+ return scratchPoint.subtract(scaledNormal).to(result);
67
+ }
68
+ /**
69
+ * Computes the intersection of a ray and this plane.
70
+ *
71
+ * @param {Ray} ray The ray.
72
+ * @param {Vector3} [result] The object onto which to store the result.
73
+ * @returns {Vector3} The intersection point or undefined if there is no intersection.
74
+ */
75
+ intersectWithRay(ray, result = new Vector3()) {
76
+ const origin = ray.origin;
77
+ const direction = ray.direction;
78
+ const normal = this.normal;
79
+ const denominator = normal.dot(direction);
80
+ if (Math.abs(denominator) < _MathUtils.EPSILON15) {
81
+ return undefined;
82
+ }
83
+ const t = (-this.distance - normal.dot(origin)) / denominator;
84
+ if (t < 0) {
85
+ return undefined;
86
+ }
87
+ return result.copy(direction).multiplyByScalar(t).add(origin);
88
+ }
89
+ }
90
+ //# sourceMappingURL=plane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plane.js","sourceRoot":"","sources":["../../../src/culling/lib/plane.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,8CAA8C;AAC9C,oEAAoE;AACpE,4DAA4D;AAC5D,mHAAmH;AAEnH,2EAA2E;AAC3E,4EAA4E;AAE5E,oBAAoB;AACpB,OAAO,EAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAgB,UAAU,EAAC,MAAM,eAAe,CAAC;AAGhF,MAAM,eAAe,GAAG,IAAI,OAAO,EAAE,CAAC;AACtC,MAAM,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC;AAEpC,iCAAiC;AACjC,MAAM,OAAO,KAAK;IAIhB,YAAY,SAAiC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,WAAmB,CAAC;QAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACnB,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED,oEAAoE;IACpE,kBAAkB,CAAC,MAA8B,EAAE,QAAgB;QACjE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CA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AC,WAAW,CAAC,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;YACjD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,WAAW,CAAC;QAE9D,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACV,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import { Vector3 } from '@math.gl/core';
2
+ export declare class Ray {
3
+ origin: Vector3;
4
+ direction: Vector3;
5
+ /**
6
+ * Creates a new ray that extends infinitely from the provided origin in the provided direction.
7
+ *
8
+ * @param [origin=Vector3] The origin of the ray.
9
+ * @param [direction=Vector3] The direction of the ray.
10
+ */
11
+ constructor(origin?: Vector3, direction?: Vector3);
12
+ at(t: number, result?: Vector3): Vector3;
13
+ closestPointTo(point: readonly number[], result?: Vector3): Vector3;
14
+ distanceTo(point: readonly number[]): number;
15
+ /** Transform and renormalize: subsequent parameters are distances in the new space. */
16
+ transform(matrix: readonly number[]): this;
17
+ }
18
+ //# sourceMappingURL=ray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ray.d.ts","sourceRoot":"","sources":["../../../src/culling/lib/ray.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAKtC,qBAAa,GAAG;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;gBACS,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO;IAUjD,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,UAAgB,GAAG,OAAO;IAI9C,cAAc,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,UAAgB,GAAG,OAAO;IAIzE,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM;IAG5C,uFAAuF;IACvF,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;CAO3C"}
@@ -0,0 +1,51 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT AND Apache-2.0
3
+ // SPDX-FileCopyrightText: Copyright 2011-2018 CesiumJS Contributors
4
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
5
+ // SPDX-FileComment: Derived from Cesium. See the repository LICENSE for upstream attribution and Apache-2.0 terms.
6
+ // This file is derived from the Cesium library under Apache 2 license
7
+ // See ../../../LICENSE for the retained Cesium notice and Apache-2.0 terms.
8
+ import { Vector3 } from '@math.gl/core';
9
+ import { normalizeQueryDirection } from "../queries.js";
10
+ import { getRayPoint, getClosestPointOnRay, distanceToRay, transformRay } from "../geometric-queries.js";
11
+ /* Represents a ray that extends infinitely from the provided origin in the provided direction. */
12
+ export class Ray {
13
+ /**
14
+ * Creates a new ray that extends infinitely from the provided origin in the provided direction.
15
+ *
16
+ * @param [origin=Vector3] The origin of the ray.
17
+ * @param [direction=Vector3] The direction of the ray.
18
+ */
19
+ constructor(origin, direction) {
20
+ if (origin)
21
+ origin = origin.clone();
22
+ else
23
+ origin = new Vector3();
24
+ if (direction)
25
+ direction = direction.clone().normalize();
26
+ else
27
+ direction = new Vector3();
28
+ this.origin = origin;
29
+ this.direction = direction;
30
+ }
31
+ at(t, result = new Vector3()) {
32
+ getRayPoint(this.origin, this.direction, t, result);
33
+ return result;
34
+ }
35
+ closestPointTo(point, result = new Vector3()) {
36
+ getClosestPointOnRay(point, this.origin, this.direction, result);
37
+ return result;
38
+ }
39
+ distanceTo(point) {
40
+ return distanceToRay(point, this.origin, this.direction);
41
+ }
42
+ /** Transform and renormalize: subsequent parameters are distances in the new space. */
43
+ transform(matrix) {
44
+ const ray = transformRay(this.origin, this.direction, matrix);
45
+ const normalized = normalizeQueryDirection(ray.direction, 3);
46
+ this.origin.copy(ray.origin);
47
+ this.direction.copy(normalized);
48
+ return this;
49
+ }
50
+ }
51
+ //# sourceMappingURL=ray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ray.js","sourceRoot":"","sources":["../../../src/culling/lib/ray.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,8CAA8C;AAC9C,oEAAoE;AACpE,4DAA4D;AAC5D,mHAAmH;AAEnH,sEAAsE;AACtE,4EAA4E;AAE5E,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EAAC,uBAAuB,EAAC,sBAAmB;AACnD,OAAO,EAAC,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,YAAY,EAAC,gCAA6B;AAEpG,kGAAkG;AAClG,MAAM,OAAO,GAAG;IAId;;;;;OAKG;IACH,YAAY,MAAgB,EAAE,SAAmB;QAC/C,IAAI,MAAM;YAAE,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;;YAC/B,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAE5B,IAAI,SAAS;YAAE,SAAS,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,CAAC;;YACpD,SAAS,GAAG,IAAI,OAAO,EAAE,CAAC;QAE/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IACD,EAAE,CAAC,CAAS,EAAE,MAAM,GAAG,IAAI,OAAO,EAAE;QAClC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,cAAc,CAAC,KAAwB,EAAE,MAAM,GAAG,IAAI,OAAO,EAAE;QAC7D,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACjE,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,UAAU,CAAC,KAAwB;QACjC,OAAO,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;IACD,uFAAuF;IACvF,SAAS,CAAC,MAAyB;QACjC,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC9D,MAAM,UAAU,GAAG,uBAAuB,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import { ImplicitShapeBase, type ImplicitShape, type LocalRayIntersection } from "./implicit-shape.js";
2
+ export type BoxShapeProps = {
3
+ size?: readonly [number, number, number];
4
+ matrix?: readonly number[];
5
+ };
6
+ /** Analytic glTF box shape. */
7
+ export declare class BoxShape extends ImplicitShapeBase {
8
+ readonly type: "box";
9
+ readonly size: readonly [number, number, number];
10
+ private readonly halfSize;
11
+ constructor(props?: BoxShapeProps);
12
+ clone(): BoxShape;
13
+ equals(shape: ImplicitShape): boolean;
14
+ containsLocalPoint(point: readonly number[]): boolean;
15
+ distanceToLocalPoint(point: readonly number[]): number;
16
+ supportLocal(direction: readonly number[]): readonly number[];
17
+ intersectLocalRay(origin: readonly number[], direction: readonly number[]): LocalRayIntersection | undefined;
18
+ }
19
+ //# sourceMappingURL=box-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-shape.d.ts","sourceRoot":"","sources":["../../../../src/culling/lib/shapes/box-shape.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,iBAAiB,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAC,4BAAyB;AAIlG,MAAM,MAAM,aAAa,GAAG;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAC,CAAC;AAEnG,+BAA+B;AAC/B,qBAAa,QAAS,SAAQ,iBAAiB;IAC7C,QAAQ,CAAC,IAAI,EAAG,KAAK,CAAU;IAC/B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoC;gBAEjD,KAAK,GAAE,aAAkB;IAQrC,KAAK,IAAI,QAAQ;IAGR,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAO9C,kBAAkB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAGrD,oBAAoB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM;IAGtD,YAAY,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE;IAG7D,iBAAiB,CACf,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,oBAAoB,GAAG,SAAS;CA+BpC"}
@@ -0,0 +1,69 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { ImplicitShapeBase } from "./implicit-shape.js";
5
+ const EPSILON = 1e-6;
6
+ /** Analytic glTF box shape. */
7
+ export class BoxShape extends ImplicitShapeBase {
8
+ constructor(props = {}) {
9
+ super(props.matrix);
10
+ this.type = 'box';
11
+ this.size = props.size ? [...props.size] : [1, 1, 1];
12
+ if (this.size.some(value => !Number.isFinite(value) || value <= 0))
13
+ throw new Error('Box size values must be greater than zero');
14
+ this.halfSize = [this.size[0] / 2, this.size[1] / 2, this.size[2] / 2];
15
+ }
16
+ clone() {
17
+ return new BoxShape({ size: this.size, matrix: this.matrix });
18
+ }
19
+ equals(shape) {
20
+ return (shape instanceof BoxShape &&
21
+ super.equals(shape) &&
22
+ this.size.every((value, i) => value === shape.size[i]));
23
+ }
24
+ containsLocalPoint(point) {
25
+ return point.every((value, i) => Math.abs(value) <= this.halfSize[i] + EPSILON);
26
+ }
27
+ distanceToLocalPoint(point) {
28
+ return Math.hypot(...point.map((value, i) => Math.max(0, Math.abs(value) - this.halfSize[i])));
29
+ }
30
+ supportLocal(direction) {
31
+ return direction.map((value, i) => (value < 0 ? -this.halfSize[i] : this.halfSize[i]));
32
+ }
33
+ intersectLocalRay(origin, direction) {
34
+ let near = -Infinity;
35
+ let far = Infinity;
36
+ let nearAxis = 0;
37
+ let farAxis = 0;
38
+ for (let axis = 0; axis < 3; axis++) {
39
+ if (Math.abs(direction[axis]) < 1e-15) {
40
+ if (Math.abs(origin[axis]) > this.halfSize[axis])
41
+ return undefined;
42
+ continue;
43
+ }
44
+ let t1 = (-this.halfSize[axis] - origin[axis]) / direction[axis];
45
+ let t2 = (this.halfSize[axis] - origin[axis]) / direction[axis];
46
+ if (t1 > t2)
47
+ [t1, t2] = [t2, t1];
48
+ if (t1 > near) {
49
+ near = t1;
50
+ nearAxis = axis;
51
+ }
52
+ if (t2 < far) {
53
+ far = t2;
54
+ farAxis = axis;
55
+ }
56
+ if (near > far)
57
+ return undefined;
58
+ }
59
+ const distance = near >= 0 ? near : far;
60
+ if (distance < 0 || !Number.isFinite(distance))
61
+ return undefined;
62
+ const axis = near >= 0 ? nearAxis : farAxis;
63
+ const pointCoordinate = origin[axis] + distance * direction[axis];
64
+ const normal = [0, 0, 0];
65
+ normal[axis] = pointCoordinate < 0 ? -1 : 1;
66
+ return { distance, normal };
67
+ }
68
+ }
69
+ //# sourceMappingURL=box-shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-shape.js","sourceRoot":"","sources":["../../../../src/culling/lib/shapes/box-shape.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,iBAAiB,EAAgD,4BAAyB;AAElG,MAAM,OAAO,GAAG,IAAI,CAAC;AAIrB,+BAA+B;AAC/B,MAAM,OAAO,QAAS,SAAQ,iBAAiB;IAK7C,YAAY,QAAuB,EAAE;QACnC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QALb,SAAI,GAAG,KAAc,CAAC;QAM7B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACrD,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,KAAK;QACH,OAAO,IAAI,QAAQ,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;IAC9D,CAAC;IACQ,MAAM,CAAC,KAAoB;QAClC,OAAO,CACL,KAAK,YAAY,QAAQ;YACzB,KA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AQ,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5C,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAClE,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC;IAC5B,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ import { ImplicitShapeBase, type ImplicitShape, type LocalRayIntersection } from "./implicit-shape.js";
2
+ export type CapsuleShapeProps = {
3
+ height?: number;
4
+ radiusBottom?: number;
5
+ radiusTop?: number;
6
+ matrix?: readonly number[];
7
+ };
8
+ /** Analytic glTF capsule: the convex hull of two spheres on the Y axis. */
9
+ export declare class CapsuleShape extends ImplicitShapeBase {
10
+ readonly type: "capsule";
11
+ readonly height: number;
12
+ readonly radiusBottom: number;
13
+ readonly radiusTop: number;
14
+ constructor(props?: CapsuleShapeProps);
15
+ clone(): CapsuleShape;
16
+ equals(shape: ImplicitShape): boolean;
17
+ containsLocalPoint(point: readonly number[]): boolean;
18
+ distanceToLocalPoint(point: readonly number[]): number;
19
+ supportLocal(direction: readonly number[]): readonly number[];
20
+ intersectLocalRay(origin: readonly number[], direction: readonly number[]): LocalRayIntersection | undefined;
21
+ private getProfile;
22
+ }
23
+ //# sourceMappingURL=capsule-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capsule-shape.d.ts","sourceRoot":"","sources":["../../../../src/culling/lib/shapes/capsule-shape.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,iBAAiB,EAEjB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,4BAAyB;AAI1B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF,2EAA2E;AAC3E,qBAAa,YAAa,SAAQ,iBAAiB;IACjD,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,KAAK,GAAE,iBAAsB;IAazC,KAAK,IAAI,YAAY;IAQZ,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAS9C,kBAAkB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAgBrD,oBAAoB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM;IAqCtD,YAAY,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE;IAe7D,iBAAiB,CACf,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,oBAAoB,GAAG,SAAS;IAwCnC,OAAO,CAAC,UAAU;CA4BnB"}