@pibbl/core 0.0.1 → 0.0.3-alpha.85.1

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 (374) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +81 -0
  3. package/dist/features/machines/animation.d.ts +64 -0
  4. package/dist/features/machines/animation.js +55 -0
  5. package/dist/features/machines/animation.js.map +7 -0
  6. package/dist/features/machines/animation.mjs +1 -0
  7. package/dist/features/machines/assign.d.ts +16 -0
  8. package/dist/features/machines/assign.js +15 -0
  9. package/dist/features/machines/assign.js.map +7 -0
  10. package/dist/features/machines/callback.d.ts +9 -0
  11. package/dist/features/machines/callback.js +7 -0
  12. package/dist/features/machines/callback.js.map +7 -0
  13. package/dist/features/machines/hook.d.ts +30 -0
  14. package/dist/features/machines/hook.js +37 -0
  15. package/dist/features/machines/hook.js.map +7 -0
  16. package/dist/features/machines/index.d.ts +6 -0
  17. package/dist/features/machines/index.js +12 -0
  18. package/dist/features/machines/index.js.map +7 -0
  19. package/dist/features/machines/index.mjs +1 -0
  20. package/dist/features/machines/runtime.d.ts +18 -0
  21. package/dist/features/machines/runtime.js +363 -0
  22. package/dist/features/machines/runtime.js.map +7 -0
  23. package/dist/features/machines/types.d.ts +164 -0
  24. package/dist/features/physics/2d-geometry.d.ts +3 -3
  25. package/dist/features/physics/2d-geometry.js.map +1 -1
  26. package/dist/features/physics/2d.d.ts +115 -62
  27. package/dist/features/physics/2d.js +59 -28
  28. package/dist/features/physics/2d.js.map +2 -2
  29. package/dist/features/physics/lib/2d/query-types.d.ts +6 -0
  30. package/dist/features/physics/lib/2d/runtime/controller.d.ts +7 -6
  31. package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
  32. package/dist/features/physics/lib/2d/types.d.ts +8 -30
  33. package/dist/features/physics/lib/2d/world/queries.d.ts +7 -6
  34. package/dist/features/physics/lib/2d/world/queries.js.map +2 -2
  35. package/dist/features/sprites/formats/aseprite.d.ts +5 -0
  36. package/dist/features/sprites/formats/texture-packer.d.ts +5 -0
  37. package/dist/features/sprites/index.d.ts +6 -0
  38. package/dist/features/sprites/loader.d.ts +25 -0
  39. package/dist/features/sprites/model.d.ts +75 -0
  40. package/dist/features/sprites/sprite.d.ts +22 -0
  41. package/dist/features/textures/index.d.ts +12 -2
  42. package/dist/features/textures/index.js +33 -1
  43. package/dist/features/textures/index.js.map +2 -2
  44. package/dist/features/textures/lib/chemical-field.d.ts +56 -0
  45. package/dist/features/textures/lib/chemical-field.js +154 -0
  46. package/dist/features/textures/lib/chemical-field.js.map +7 -0
  47. package/dist/features/textures/lib/chemical-recipes.d.ts +119 -0
  48. package/dist/features/textures/lib/chemical-recipes.js +275 -0
  49. package/dist/features/textures/lib/chemical-recipes.js.map +7 -0
  50. package/dist/features/textures/lib/definitions.d.ts +3 -18
  51. package/dist/features/textures/lib/definitions.js +15 -20
  52. package/dist/features/textures/lib/definitions.js.map +2 -2
  53. package/dist/features/textures/lib/geometric-patterns.d.ts +149 -0
  54. package/dist/features/textures/lib/geometric-patterns.js +305 -0
  55. package/dist/features/textures/lib/geometric-patterns.js.map +7 -0
  56. package/dist/features/textures/lib/gray-scott.d.ts +55 -0
  57. package/dist/features/textures/lib/gray-scott.js +39 -0
  58. package/dist/features/textures/lib/gray-scott.js.map +7 -0
  59. package/dist/features/textures/lib/patterns.d.ts +123 -0
  60. package/dist/features/textures/lib/patterns.js +344 -0
  61. package/dist/features/textures/lib/patterns.js.map +7 -0
  62. package/dist/features/textures/lib/reaction-diffusion.d.ts +3 -2
  63. package/dist/features/textures/lib/reaction-diffusion.js +9 -20
  64. package/dist/features/textures/lib/reaction-diffusion.js.map +2 -2
  65. package/dist/features/textures/lib/simulation.d.ts +10 -4
  66. package/dist/features/textures/lib/simulation.js +23 -13
  67. package/dist/features/textures/lib/simulation.js.map +2 -2
  68. package/dist/features/viz/index.d.ts +79 -5
  69. package/dist/features/viz/index.js +145 -4
  70. package/dist/features/viz/index.js.map +2 -2
  71. package/dist/features/viz/inspection/bar.d.ts +79 -0
  72. package/dist/features/viz/inspection/bar.js +49 -0
  73. package/dist/features/viz/inspection/bar.js.map +7 -0
  74. package/dist/features/viz/inspection/candle.d.ts +156 -0
  75. package/dist/features/viz/inspection/candle.js +120 -0
  76. package/dist/features/viz/inspection/candle.js.map +7 -0
  77. package/dist/features/viz/inspection/capture-types.d.ts +65 -0
  78. package/dist/features/viz/inspection/capture.d.ts +16 -0
  79. package/dist/features/viz/inspection/capture.js +49 -0
  80. package/dist/features/viz/inspection/capture.js.map +7 -0
  81. package/dist/features/viz/inspection/handler.d.ts +36 -0
  82. package/dist/features/viz/inspection/handler.js +91 -0
  83. package/dist/features/viz/inspection/handler.js.map +7 -0
  84. package/dist/features/viz/inspection/ohlc-bar.d.ts +132 -0
  85. package/dist/features/viz/inspection/ohlc-bar.js +118 -0
  86. package/dist/features/viz/inspection/ohlc-bar.js.map +7 -0
  87. package/dist/features/viz/inspection/owned-ref.d.ts +16 -0
  88. package/dist/features/viz/inspection/owned-ref.js +99 -0
  89. package/dist/features/viz/inspection/owned-ref.js.map +7 -0
  90. package/dist/features/viz/inspection/painted-point.d.ts +22 -0
  91. package/dist/features/viz/inspection/painted-point.js +29 -0
  92. package/dist/features/viz/inspection/painted-point.js.map +7 -0
  93. package/dist/features/viz/inspection/queries.d.ts +100 -0
  94. package/dist/features/viz/inspection/queries.js +192 -0
  95. package/dist/features/viz/inspection/queries.js.map +7 -0
  96. package/dist/features/viz/inspection/query-types.d.ts +177 -0
  97. package/dist/features/viz/inspection/volume.d.ts +104 -0
  98. package/dist/features/viz/inspection/volume.js +95 -0
  99. package/dist/features/viz/inspection/volume.js.map +7 -0
  100. package/dist/features/viz/inspection.d.ts +19 -0
  101. package/dist/features/viz/inspection.js +54 -0
  102. package/dist/features/viz/inspection.js.map +7 -0
  103. package/dist/features/viz/inspection.mjs +1 -0
  104. package/dist/features/viz/lib/area-series.d.ts +62 -0
  105. package/dist/features/viz/lib/area-series.js +120 -0
  106. package/dist/features/viz/lib/area-series.js.map +7 -0
  107. package/dist/features/viz/lib/axis-labels.d.ts +2 -0
  108. package/dist/features/viz/lib/axis-labels.js +41 -0
  109. package/dist/features/viz/lib/axis-labels.js.map +7 -0
  110. package/dist/features/viz/lib/axis-title.d.ts +23 -0
  111. package/dist/features/viz/lib/axis-title.js +23 -0
  112. package/dist/features/viz/lib/axis-title.js.map +7 -0
  113. package/dist/features/viz/lib/axis.d.ts +1 -1
  114. package/dist/features/viz/lib/axis.js +50 -50
  115. package/dist/features/viz/lib/axis.js.map +2 -2
  116. package/dist/features/viz/lib/bar-scale.d.ts +7 -0
  117. package/dist/features/viz/lib/bar-scale.js +34 -0
  118. package/dist/features/viz/lib/bar-scale.js.map +7 -0
  119. package/dist/features/viz/lib/bar-series.d.ts +3 -1
  120. package/dist/features/viz/lib/bar-series.js +21 -5
  121. package/dist/features/viz/lib/bar-series.js.map +2 -2
  122. package/dist/features/viz/lib/baseline-series.d.ts +55 -0
  123. package/dist/features/viz/lib/baseline-series.js +136 -0
  124. package/dist/features/viz/lib/baseline-series.js.map +7 -0
  125. package/dist/features/viz/lib/candlestick-series.d.ts +62 -0
  126. package/dist/features/viz/lib/candlestick-series.js +150 -0
  127. package/dist/features/viz/lib/candlestick-series.js.map +7 -0
  128. package/dist/features/viz/lib/censored-point-series.d.ts +71 -0
  129. package/dist/features/viz/lib/censored-point-series.js +129 -0
  130. package/dist/features/viz/lib/censored-point-series.js.map +7 -0
  131. package/dist/features/viz/lib/chart-lines.d.ts +41 -0
  132. package/dist/features/viz/lib/chart-lines.js +32 -0
  133. package/dist/features/viz/lib/chart-lines.js.map +7 -0
  134. package/dist/features/viz/lib/color-context.d.ts +4 -0
  135. package/dist/features/viz/lib/color-context.js +41 -0
  136. package/dist/features/viz/lib/color-context.js.map +7 -0
  137. package/dist/features/viz/lib/color-math.d.ts +4 -0
  138. package/dist/features/viz/lib/color-math.js +31 -0
  139. package/dist/features/viz/lib/color-math.js.map +7 -0
  140. package/dist/features/viz/lib/color-types.d.ts +53 -0
  141. package/dist/features/viz/lib/curve-definition.d.ts +49 -0
  142. package/dist/features/viz/lib/curve-definition.js +148 -0
  143. package/dist/features/viz/lib/curve-definition.js.map +7 -0
  144. package/dist/features/viz/lib/diverging-color-scale.d.ts +11 -0
  145. package/dist/features/viz/lib/diverging-color-scale.js +51 -0
  146. package/dist/features/viz/lib/diverging-color-scale.js.map +7 -0
  147. package/dist/features/viz/lib/domain-navigation.d.ts +40 -0
  148. package/dist/features/viz/lib/domain-navigation.js +77 -0
  149. package/dist/features/viz/lib/domain-navigation.js.map +7 -0
  150. package/dist/features/viz/lib/editable-chart-elements.d.ts +178 -0
  151. package/dist/features/viz/lib/editable-chart-elements.js +733 -0
  152. package/dist/features/viz/lib/editable-chart-elements.js.map +7 -0
  153. package/dist/features/viz/lib/financial-aggregation.d.ts +127 -0
  154. package/dist/features/viz/lib/financial-aggregation.js +116 -0
  155. package/dist/features/viz/lib/financial-aggregation.js.map +7 -0
  156. package/dist/features/viz/lib/financial-autoscale.d.ts +64 -0
  157. package/dist/features/viz/lib/financial-autoscale.js +61 -0
  158. package/dist/features/viz/lib/financial-autoscale.js.map +7 -0
  159. package/dist/features/viz/lib/financial-comparison.d.ts +62 -0
  160. package/dist/features/viz/lib/financial-comparison.js +98 -0
  161. package/dist/features/viz/lib/financial-comparison.js.map +7 -0
  162. package/dist/features/viz/lib/financial-geometry.d.ts +77 -0
  163. package/dist/features/viz/lib/financial-geometry.js +67 -0
  164. package/dist/features/viz/lib/financial-geometry.js.map +7 -0
  165. package/dist/features/viz/lib/financial-indicators.d.ts +114 -0
  166. package/dist/features/viz/lib/financial-indicators.js +135 -0
  167. package/dist/features/viz/lib/financial-indicators.js.map +7 -0
  168. package/dist/features/viz/lib/financial-oscillators.d.ts +171 -0
  169. package/dist/features/viz/lib/financial-oscillators.js +265 -0
  170. package/dist/features/viz/lib/financial-oscillators.js.map +7 -0
  171. package/dist/features/viz/lib/hover-data.d.ts +1 -1
  172. package/dist/features/viz/lib/hover-data.js +6 -3
  173. package/dist/features/viz/lib/hover-data.js.map +2 -2
  174. package/dist/features/viz/lib/hover-types.d.ts +5 -5
  175. package/dist/features/viz/lib/interval-band-series.d.ts +49 -0
  176. package/dist/features/viz/lib/interval-band-series.js +136 -0
  177. package/dist/features/viz/lib/interval-band-series.js.map +7 -0
  178. package/dist/features/viz/lib/interval-diamond-series.d.ts +43 -0
  179. package/dist/features/viz/lib/interval-diamond-series.js +124 -0
  180. package/dist/features/viz/lib/interval-diamond-series.js.map +7 -0
  181. package/dist/features/viz/lib/interval-series.d.ts +79 -0
  182. package/dist/features/viz/lib/interval-series.js +158 -0
  183. package/dist/features/viz/lib/interval-series.js.map +7 -0
  184. package/dist/features/viz/lib/line-series.d.ts +1 -1
  185. package/dist/features/viz/lib/line-series.js +47 -28
  186. package/dist/features/viz/lib/line-series.js.map +2 -2
  187. package/dist/features/viz/lib/linear-scale-component.d.ts +7 -0
  188. package/dist/features/viz/lib/linear-scale-component.js +18 -0
  189. package/dist/features/viz/lib/linear-scale-component.js.map +7 -0
  190. package/dist/features/viz/lib/linear-scale.js +1 -1
  191. package/dist/features/viz/lib/linear-scale.js.map +2 -2
  192. package/dist/features/viz/lib/log-scale-component.d.ts +7 -0
  193. package/dist/features/viz/lib/log-scale-component.js +19 -0
  194. package/dist/features/viz/lib/log-scale-component.js.map +7 -0
  195. package/dist/features/viz/lib/log-scale.d.ts +2 -0
  196. package/dist/features/viz/lib/log-scale.js +53 -0
  197. package/dist/features/viz/lib/log-scale.js.map +7 -0
  198. package/dist/features/viz/lib/monotone-curve.d.ts +11 -0
  199. package/dist/features/viz/lib/monotone-curve.js +63 -0
  200. package/dist/features/viz/lib/monotone-curve.js.map +7 -0
  201. package/dist/features/viz/lib/nearest.d.ts +9 -9
  202. package/dist/features/viz/lib/nearest.js.map +1 -1
  203. package/dist/features/viz/lib/numeric-range-interpolation.d.ts +15 -0
  204. package/dist/features/viz/lib/numeric-range-interpolation.js +36 -0
  205. package/dist/features/viz/lib/numeric-range-interpolation.js.map +7 -0
  206. package/dist/features/viz/lib/numeric-ticks.d.ts +38 -0
  207. package/dist/features/viz/lib/numeric-ticks.js +54 -0
  208. package/dist/features/viz/lib/numeric-ticks.js.map +7 -0
  209. package/dist/features/viz/lib/ohlc-bar-series.d.ts +55 -0
  210. package/dist/features/viz/lib/ohlc-bar-series.js +168 -0
  211. package/dist/features/viz/lib/ohlc-bar-series.js.map +7 -0
  212. package/dist/features/viz/lib/paired-series.d.ts +44 -0
  213. package/dist/features/viz/lib/paired-series.js +93 -0
  214. package/dist/features/viz/lib/paired-series.js.map +7 -0
  215. package/dist/features/viz/lib/plot-series.js +11 -6
  216. package/dist/features/viz/lib/plot-series.js.map +2 -2
  217. package/dist/features/viz/lib/plot-types.d.ts +4 -3
  218. package/dist/features/viz/lib/point-scale-component.d.ts +7 -0
  219. package/dist/features/viz/lib/point-scale-component.js +19 -0
  220. package/dist/features/viz/lib/point-scale-component.js.map +7 -0
  221. package/dist/features/viz/lib/point-scale.d.ts +2 -0
  222. package/dist/features/viz/lib/point-scale.js +45 -0
  223. package/dist/features/viz/lib/point-scale.js.map +7 -0
  224. package/dist/features/viz/lib/point-series.d.ts +1 -1
  225. package/dist/features/viz/lib/point-series.js +36 -9
  226. package/dist/features/viz/lib/point-series.js.map +2 -2
  227. package/dist/features/viz/lib/point-types.d.ts +5 -2
  228. package/dist/features/viz/lib/reference-band.d.ts +16 -0
  229. package/dist/features/viz/lib/reference-band.js +27 -0
  230. package/dist/features/viz/lib/reference-band.js.map +7 -0
  231. package/dist/features/viz/lib/scale-adjust.js +9 -4
  232. package/dist/features/viz/lib/scale-adjust.js.map +2 -2
  233. package/dist/features/viz/lib/scale-context.d.ts +5 -4
  234. package/dist/features/viz/lib/scale-context.js +15 -11
  235. package/dist/features/viz/lib/scale-context.js.map +2 -2
  236. package/dist/features/viz/lib/scale-provider.d.ts +2 -0
  237. package/dist/features/viz/lib/scale-provider.js +13 -0
  238. package/dist/features/viz/lib/scale-provider.js.map +7 -0
  239. package/dist/features/viz/lib/scale-ticks.d.ts +5 -0
  240. package/dist/features/viz/lib/scale-ticks.js +64 -0
  241. package/dist/features/viz/lib/scale-ticks.js.map +7 -0
  242. package/dist/features/viz/lib/scale-view.d.ts +4 -0
  243. package/dist/features/viz/lib/scale-view.js +21 -0
  244. package/dist/features/viz/lib/scale-view.js.map +7 -0
  245. package/dist/features/viz/lib/sequential-color-scale.d.ts +11 -0
  246. package/dist/features/viz/lib/sequential-color-scale.js +49 -0
  247. package/dist/features/viz/lib/sequential-color-scale.js.map +7 -0
  248. package/dist/features/viz/lib/series-position.d.ts +12 -0
  249. package/dist/features/viz/lib/series-position.js +44 -0
  250. package/dist/features/viz/lib/series-position.js.map +7 -0
  251. package/dist/features/viz/lib/step-curves.d.ts +19 -0
  252. package/dist/features/viz/lib/step-curves.js +53 -0
  253. package/dist/features/viz/lib/step-curves.js.map +7 -0
  254. package/dist/features/viz/lib/symlog-scale-component.d.ts +7 -0
  255. package/dist/features/viz/lib/symlog-scale-component.js +19 -0
  256. package/dist/features/viz/lib/symlog-scale-component.js.map +7 -0
  257. package/dist/features/viz/lib/symlog-scale.d.ts +2 -0
  258. package/dist/features/viz/lib/symlog-scale.js +38 -0
  259. package/dist/features/viz/lib/symlog-scale.js.map +7 -0
  260. package/dist/features/viz/lib/threshold-color-scale.d.ts +43 -0
  261. package/dist/features/viz/lib/threshold-color-scale.js +59 -0
  262. package/dist/features/viz/lib/threshold-color-scale.js.map +7 -0
  263. package/dist/features/viz/lib/trading-time-mapping.d.ts +32 -0
  264. package/dist/features/viz/lib/trading-time-mapping.js +89 -0
  265. package/dist/features/viz/lib/trading-time-mapping.js.map +7 -0
  266. package/dist/features/viz/lib/trading-time-scale.d.ts +83 -0
  267. package/dist/features/viz/lib/trading-time-scale.js +96 -0
  268. package/dist/features/viz/lib/trading-time-scale.js.map +7 -0
  269. package/dist/features/viz/lib/trajectory-series.d.ts +71 -0
  270. package/dist/features/viz/lib/trajectory-series.js +111 -0
  271. package/dist/features/viz/lib/trajectory-series.js.map +7 -0
  272. package/dist/features/viz/lib/types.d.ts +114 -21
  273. package/dist/features/viz/lib/use-bar-scale.d.ts +8 -0
  274. package/dist/features/viz/lib/use-bar-scale.js +9 -0
  275. package/dist/features/viz/lib/use-bar-scale.js.map +7 -0
  276. package/dist/features/viz/lib/use-continuous-scale.d.ts +8 -0
  277. package/dist/features/viz/lib/use-continuous-scale.js +14 -0
  278. package/dist/features/viz/lib/use-continuous-scale.js.map +7 -0
  279. package/dist/features/viz/lib/use-linear-scale.d.ts +8 -0
  280. package/dist/features/viz/lib/use-linear-scale.js +9 -0
  281. package/dist/features/viz/lib/use-linear-scale.js.map +7 -0
  282. package/dist/features/viz/lib/use-log-scale.d.ts +8 -0
  283. package/dist/features/viz/lib/use-log-scale.js +9 -0
  284. package/dist/features/viz/lib/use-log-scale.js.map +7 -0
  285. package/dist/features/viz/lib/use-point-scale.d.ts +8 -0
  286. package/dist/features/viz/lib/use-point-scale.js +9 -0
  287. package/dist/features/viz/lib/use-point-scale.js.map +7 -0
  288. package/dist/features/viz/lib/use-symlog-scale.d.ts +8 -0
  289. package/dist/features/viz/lib/use-symlog-scale.js +9 -0
  290. package/dist/features/viz/lib/use-symlog-scale.js.map +7 -0
  291. package/dist/features/viz/lib/use-utc-scale.d.ts +8 -0
  292. package/dist/features/viz/lib/use-utc-scale.js +9 -0
  293. package/dist/features/viz/lib/use-utc-scale.js.map +7 -0
  294. package/dist/features/viz/lib/utc-labels.d.ts +12 -0
  295. package/dist/features/viz/lib/utc-labels.js +27 -0
  296. package/dist/features/viz/lib/utc-labels.js.map +7 -0
  297. package/dist/features/viz/lib/utc-scale-component.d.ts +7 -0
  298. package/dist/features/viz/lib/utc-scale-component.js +18 -0
  299. package/dist/features/viz/lib/utc-scale-component.js.map +7 -0
  300. package/dist/features/viz/lib/utc-scale.d.ts +21 -0
  301. package/dist/features/viz/lib/utc-scale.js +123 -0
  302. package/dist/features/viz/lib/utc-scale.js.map +7 -0
  303. package/dist/features/viz/lib/volume-series.d.ts +59 -0
  304. package/dist/features/viz/lib/volume-series.js +117 -0
  305. package/dist/features/viz/lib/volume-series.js.map +7 -0
  306. package/dist/features/viz/lib/weighted-point-series.d.ts +71 -0
  307. package/dist/features/viz/lib/weighted-point-series.js +169 -0
  308. package/dist/features/viz/lib/weighted-point-series.js.map +7 -0
  309. package/dist/filters/emboss-gpu.d.ts +4 -0
  310. package/dist/filters/emboss-gpu.js +39 -0
  311. package/dist/filters/emboss-gpu.js.map +7 -0
  312. package/dist/filters/emboss.d.ts +32 -0
  313. package/dist/filters/emboss.js +106 -0
  314. package/dist/filters/emboss.js.map +7 -0
  315. package/dist/filters/reflection-gpu.d.ts +3 -1
  316. package/dist/filters/reflection-gpu.js +5 -2
  317. package/dist/filters/reflection-gpu.js.map +2 -2
  318. package/dist/filters/render-emboss-boundary.d.ts +13 -0
  319. package/dist/filters/render-emboss-boundary.js +131 -0
  320. package/dist/filters/render-emboss-boundary.js.map +7 -0
  321. package/dist/filters.d.ts +2 -0
  322. package/dist/filters.js +2 -0
  323. package/dist/filters.js.map +2 -2
  324. package/dist/index.d.ts +3 -1
  325. package/dist/index.js +3 -0
  326. package/dist/index.js.map +2 -2
  327. package/dist/internal.d.ts +2 -0
  328. package/dist/internal.js +4 -0
  329. package/dist/internal.js.map +2 -2
  330. package/dist/lib/animation/definition.d.ts +5 -3
  331. package/dist/lib/animation/definition.js +29 -4
  332. package/dist/lib/animation/definition.js.map +2 -2
  333. package/dist/lib/animation/playback.d.ts +8 -0
  334. package/dist/lib/animation/playback.js +33 -11
  335. package/dist/lib/animation/playback.js.map +2 -2
  336. package/dist/lib/animation/spring.d.ts +3 -1
  337. package/dist/lib/animation/spring.js.map +2 -2
  338. package/dist/lib/animation/types.d.ts +29 -73
  339. package/dist/lib/events/event-facade.d.ts +13 -0
  340. package/dist/lib/events/event-facade.js +23 -0
  341. package/dist/lib/events/event-facade.js.map +2 -2
  342. package/dist/lib/events/propagation.js +19 -14
  343. package/dist/lib/events/propagation.js.map +2 -2
  344. package/dist/lib/execute-render.js +13 -0
  345. package/dist/lib/execute-render.js.map +2 -2
  346. package/dist/lib/hooks/use-animated-value.d.ts +11 -21
  347. package/dist/lib/hooks/use-animated-value.js +23 -70
  348. package/dist/lib/hooks/use-animated-value.js.map +3 -3
  349. package/dist/lib/hooks/use-playback.js +1 -0
  350. package/dist/lib/hooks/use-playback.js.map +2 -2
  351. package/dist/lib/recording/recording.d.ts +43 -0
  352. package/dist/lib/recording/recording.js +555 -0
  353. package/dist/lib/recording/recording.js.map +7 -0
  354. package/dist/lib/recording/types.d.ts +118 -0
  355. package/dist/lib/recording/wasm-bytes.d.ts +1 -0
  356. package/dist/lib/recording/wasm-bytes.js +5 -0
  357. package/dist/lib/recording/wasm-bytes.js.map +7 -0
  358. package/dist/lib/recording/worker-source.d.ts +1 -0
  359. package/dist/lib/recording/worker-source.js +5 -0
  360. package/dist/lib/recording/worker-source.js.map +7 -0
  361. package/dist/lib/render-transaction.d.ts +5 -2
  362. package/dist/lib/render-transaction.js +23 -1
  363. package/dist/lib/render-transaction.js.map +2 -2
  364. package/dist/lib/series-inspection-frame.d.ts +18 -0
  365. package/dist/lib/series-inspection-frame.js +70 -0
  366. package/dist/lib/series-inspection-frame.js.map +7 -0
  367. package/dist/lib/types.d.ts +6 -0
  368. package/package.json +27 -5
  369. package/dist/features/viz/lib/scale.d.ts +0 -11
  370. package/dist/features/viz/lib/scale.js +0 -80
  371. package/dist/features/viz/lib/scale.js.map +0 -7
  372. package/dist/features/viz/lib/use-scale.d.ts +0 -20
  373. package/dist/features/viz/lib/use-scale.js +0 -10
  374. package/dist/features/viz/lib/use-scale.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/physics/2d-geometry.ts"],
4
- "sourcesContent": ["import type { boundsOfShape2D, massProperties2D, transformShape2D } from './lib/2d/shapes.js';\nimport type { queryAabb2D, raycast2D } from './2d.js';\nimport type { raycastShape2D, shapeCastAgainstShape2D } from './lib/2d/collision/casts.js';\nimport type { PibblPhysicsCollisionEvent2D, PibblPhysicsQueryHit2D } from './lib/2d/types.js';\nimport type { PibblPhysicsContactInspection2D } from './lib/2d/inspection-types.js';\n/**\n * An x/y pair in the 2D physics coordinate system.\n *\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsAabb2D}\n * @see {@link PibblPhysicsRay2D}\n */\nexport type PibblPhysicsVector2 = readonly [x: number, y: number];\n\n/**\n * Position and rotation in degrees for a 2D shape or body.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsTransform2D}\n * @see {@link containsPoint2D}\n */\nexport interface PibblPhysicsPose2D {\n /** Position of the geometry, source, or selected resize handle. See {@link PibblPhysicsVector2}. */\n readonly position: PibblPhysicsVector2;\n /** Rotation in degrees. See {@link PibblPhysicsPose2D}. */\n readonly rotationDegrees: number;\n}\n\n/**\n * A rigid 2D transform expressed as position and rotation in degrees.\n *\n * @see {@link PibblPhysicsPose2D}\n * @see {@link transformShape2D}\n */\nexport type PibblPhysicsTransform2D = PibblPhysicsPose2D;\n\n/**\n * Axis-aligned bounds expressed as minimum and maximum coordinates.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link boundsOfShape2D}\n * @see {@link queryAabb2D}\n */\nexport interface PibblPhysicsAabb2D {\n /** Lower bound of the coordinate or sampling interval. See {@link PibblPhysicsVector2}. */\n readonly min: PibblPhysicsVector2;\n /** Upper bound of the coordinate or sampling interval. See {@link PibblPhysicsVector2}. */\n readonly max: PibblPhysicsVector2;\n}\n\n/**\n * Origin, direction, and maximum travel distance of a 2D query ray.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link raycastShape2D}\n * @see {@link raycast2D}\n */\nexport interface PibblPhysicsRay2D {\n /** Origin of the transform or geometric query. See {@link PibblPhysicsVector2}. */\n readonly origin: PibblPhysicsVector2;\n /** Direction in which this operation proceeds. See {@link PibblPhysicsVector2}. */\n readonly direction: PibblPhysicsVector2;\n /** Maximum distance accepted by the query. See {@link PibblPhysicsRay2D}. */\n readonly maxDistance: number;\n}\n\ndeclare const physicsShape2DBrand: unique symbol;\n/**\n * An immutable branded shape created by the public 2D geometry constructors.\n *\n * @see {@link containsPoint2D}\n * @see {@link distanceBetweenShapes2D}\n * @see {@link overlapShapes2D}\n */\nexport interface PibblPhysicsShape2D {\n readonly [physicsShape2DBrand]: true;\n}\n\n/**\n * Area, centroid, mass, and rotational inertia derived from a shape and density.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link massProperties2D}\n */\nexport interface PibblPhysicsMassProperties2D {\n /** Area enclosed by the shape. See {@link PibblPhysicsMassProperties2D}. */\n readonly area: number;\n /** Area-weighted center of the shape. See {@link PibblPhysicsVector2}. */\n readonly centroid: PibblPhysicsVector2;\n /** Mass used by the spring or physics calculation. See {@link PibblPhysicsMassProperties2D}. */\n readonly mass: number;\n /** Moment of inertia about the shape's center of mass. See {@link PibblPhysicsMassProperties2D}. */\n readonly rotationalInertia: number;\n}\n\n/**\n * Signed separation, witness points, and normal between two posed shapes.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link distanceBetweenShapes2D}\n */\nexport interface PibblPhysicsDistance2D {\n /** Signed distance between the witness points. See {@link PibblPhysicsDistance2D}. */\n readonly separation: number;\n /** Witness point on the first shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnFirst: PibblPhysicsVector2;\n /** Witness point on the second shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnSecond: PibblPhysicsVector2;\n /** Direction from the second shape toward the first. */\n readonly normal: PibblPhysicsVector2;\n}\n\n/**\n * A pair of contact witness points and their signed separation.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsShapeContact2D}\n * @see {@link PibblPhysicsCollisionEvent2D}\n * @see {@link PibblPhysicsContactInspection2D}\n */\nexport interface PibblPhysicsContactPoint2D {\n /** Witness point on the first shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnFirst: PibblPhysicsVector2;\n /** Witness point on the second shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnSecond: PibblPhysicsVector2;\n /** Signed distance between the witness points. See {@link PibblPhysicsContactPoint2D}. */\n readonly separation: number;\n}\n\n/**\n * Contact normal and witness-point pairs for two overlapping or touching shapes.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsContactPoint2D}\n * @see {@link contactBetweenShapes2D}\n */\nexport interface PibblPhysicsShapeContact2D {\n /** Direction from the second shape toward the first. */\n readonly normal: PibblPhysicsVector2;\n /**\n * Points defining the geometry or reported by the contact query. See\n * {@link PibblPhysicsContactPoint2D}.\n */\n readonly points: readonly PibblPhysicsContactPoint2D[];\n}\n\n/**\n * Point, normal, distance, and time of impact returned by a geometry cast.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link raycastShape2D}\n * @see {@link shapeCastAgainstShape2D}\n * @see {@link PibblPhysicsQueryHit2D}\n */\nexport interface PibblPhysicsShapeHit2D {\n /** A point in the operation's coordinate system. See {@link PibblPhysicsVector2}. */\n readonly point: PibblPhysicsVector2;\n /** Contact or surface normal returned by this query. See {@link PibblPhysicsVector2}. */\n readonly normal: PibblPhysicsVector2;\n /**\n * Distance measured in this query or guide's coordinate system. See {@link PibblPhysicsShapeHit2D}\n * .\n */\n readonly distance: number;\n /** Position along the cast at which contact first occurs. See {@link PibblPhysicsShapeHit2D}. */\n readonly timeOfImpact: number;\n}\n\nexport {\n arcShape2D,\n boundsOfShape2D,\n boxShape2D,\n capsuleShape2D,\n chainShape2D,\n circleShape2D,\n ellipseShape2D,\n massProperties2D,\n polygonShape2D,\n roundedBoxShape2D,\n segmentShape2D,\n transformShape2D,\n wedgeShape2D,\n} from './lib/2d/shapes.js';\n\nimport {\n contactBetweenPreparedShapes2D,\n containsPointInShape2D,\n distanceBetweenPreparedShapes2D,\n overlapPreparedShapes2D,\n} from './lib/2d/collision/pairs.js';\nexport {\n raycastShape2D,\n shapeCastAgainstShape2D,\n} from './lib/2d/collision/casts.js';\n\n/**\n * Tests whether a point lies within a posed shape without creating a physics world.\n *\n * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.\n * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.\n * @param point - Point in the same coordinate space as the posed shape. See\n * {@link PibblPhysicsVector2} .\n * @returns Whether the posed shape contains the point.\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsVector2}\n */\nexport function containsPoint2D(\n shape: PibblPhysicsShape2D,\n pose: PibblPhysicsPose2D,\n point: PibblPhysicsVector2,\n): boolean {\n return containsPointInShape2D(shape, pose, point);\n}\n\n/**\n * Computes signed separation and witness geometry between two posed shapes.\n *\n * @param first - First shape. See {@link PibblPhysicsShape2D}.\n * @param firstPose - Pose of the first shape. See {@link PibblPhysicsPose2D}.\n * @param second - Second shape. See {@link PibblPhysicsShape2D}.\n * @param secondPose - Pose of the second shape. See {@link PibblPhysicsPose2D}.\n * @returns Distance and closest-point information for the two posed shapes. See\n * {@link PibblPhysicsDistance2D} .\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsDistance2D}\n */\nexport function distanceBetweenShapes2D(\n first: PibblPhysicsShape2D,\n firstPose: PibblPhysicsPose2D,\n second: PibblPhysicsShape2D,\n secondPose: PibblPhysicsPose2D,\n): PibblPhysicsDistance2D {\n return distanceBetweenPreparedShapes2D(first, firstPose, second, secondPose);\n}\n\n/**\n * Tests whether two posed shapes overlap without creating a physics world.\n *\n * @param first - First shape. See {@link PibblPhysicsShape2D}.\n * @param firstPose - Pose of the first shape. See {@link PibblPhysicsPose2D}.\n * @param second - Second shape. See {@link PibblPhysicsShape2D}.\n * @param secondPose - Pose of the second shape. See {@link PibblPhysicsPose2D}.\n * @returns Whether the two posed shapes overlap.\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n */\nexport function overlapShapes2D(\n first: PibblPhysicsShape2D,\n firstPose: PibblPhysicsPose2D,\n second: PibblPhysicsShape2D,\n secondPose: PibblPhysicsPose2D,\n): boolean {\n return overlapPreparedShapes2D(first, firstPose, second, secondPose);\n}\n\n/**\n * Computes contact geometry for two posed shapes, or null when they do not contact.\n *\n * @param first - First shape. See {@link PibblPhysicsShape2D}.\n * @param firstPose - Pose of the first shape. See {@link PibblPhysicsPose2D}.\n * @param second - Second shape. See {@link PibblPhysicsShape2D}.\n * @param secondPose - Pose of the second shape. See {@link PibblPhysicsPose2D}.\n * @returns Contact information, or null when the shapes do not contact. See\n * {@link PibblPhysicsShapeContact2D} .\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsShapeContact2D}\n */\nexport function contactBetweenShapes2D(\n first: PibblPhysicsShape2D,\n firstPose: PibblPhysicsPose2D,\n second: PibblPhysicsShape2D,\n secondPose: PibblPhysicsPose2D,\n): PibblPhysicsShapeContact2D | null {\n return contactBetweenPreparedShapes2D(first, firstPose, second, secondPose);\n}\n"],
4
+ "sourcesContent": ["import type { boundsOfShape2D, massProperties2D, transformShape2D } from './lib/2d/shapes.js';\nimport type { findAabbMatch2D, raycastClosest2D } from './2d.js';\nimport type { raycastShape2D, shapeCastAgainstShape2D } from './lib/2d/collision/casts.js';\nimport type { PibblPhysicsCollisionEvent2D, PibblPhysicsQueryHit2D } from './lib/2d/types.js';\nimport type { PibblPhysicsContactInspection2D } from './lib/2d/inspection-types.js';\n/**\n * An x/y pair in the 2D physics coordinate system.\n *\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsAabb2D}\n * @see {@link PibblPhysicsRay2D}\n */\nexport type PibblPhysicsVector2 = readonly [x: number, y: number];\n\n/**\n * Position and rotation in degrees for a 2D shape or body.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsTransform2D}\n * @see {@link containsPoint2D}\n */\nexport interface PibblPhysicsPose2D {\n /** Position of the geometry, source, or selected resize handle. See {@link PibblPhysicsVector2}. */\n readonly position: PibblPhysicsVector2;\n /** Rotation in degrees. See {@link PibblPhysicsPose2D}. */\n readonly rotationDegrees: number;\n}\n\n/**\n * A rigid 2D transform expressed as position and rotation in degrees.\n *\n * @see {@link PibblPhysicsPose2D}\n * @see {@link transformShape2D}\n */\nexport type PibblPhysicsTransform2D = PibblPhysicsPose2D;\n\n/**\n * Axis-aligned bounds expressed as minimum and maximum coordinates.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link boundsOfShape2D}\n * @see {@link findAabbMatch2D}\n */\nexport interface PibblPhysicsAabb2D {\n /** Lower bound of the coordinate or sampling interval. See {@link PibblPhysicsVector2}. */\n readonly min: PibblPhysicsVector2;\n /** Upper bound of the coordinate or sampling interval. See {@link PibblPhysicsVector2}. */\n readonly max: PibblPhysicsVector2;\n}\n\n/**\n * Origin, direction, and maximum travel distance of a 2D query ray.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link raycastShape2D}\n * @see {@link raycastClosest2D}\n */\nexport interface PibblPhysicsRay2D {\n /** Origin of the transform or geometric query. See {@link PibblPhysicsVector2}. */\n readonly origin: PibblPhysicsVector2;\n /** Direction in which this operation proceeds. See {@link PibblPhysicsVector2}. */\n readonly direction: PibblPhysicsVector2;\n /** Maximum distance accepted by the query. See {@link PibblPhysicsRay2D}. */\n readonly maxDistance: number;\n}\n\ndeclare const physicsShape2DBrand: unique symbol;\n/**\n * An immutable branded shape created by the public 2D geometry constructors.\n *\n * @see {@link containsPoint2D}\n * @see {@link distanceBetweenShapes2D}\n * @see {@link overlapShapes2D}\n */\nexport interface PibblPhysicsShape2D {\n readonly [physicsShape2DBrand]: true;\n}\n\n/**\n * Area, centroid, mass, and rotational inertia derived from a shape and density.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link massProperties2D}\n */\nexport interface PibblPhysicsMassProperties2D {\n /** Area enclosed by the shape. See {@link PibblPhysicsMassProperties2D}. */\n readonly area: number;\n /** Area-weighted center of the shape. See {@link PibblPhysicsVector2}. */\n readonly centroid: PibblPhysicsVector2;\n /** Mass used by the spring or physics calculation. See {@link PibblPhysicsMassProperties2D}. */\n readonly mass: number;\n /** Moment of inertia about the shape's center of mass. See {@link PibblPhysicsMassProperties2D}. */\n readonly rotationalInertia: number;\n}\n\n/**\n * Signed separation, witness points, and normal between two posed shapes.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link distanceBetweenShapes2D}\n */\nexport interface PibblPhysicsDistance2D {\n /** Signed distance between the witness points. See {@link PibblPhysicsDistance2D}. */\n readonly separation: number;\n /** Witness point on the first shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnFirst: PibblPhysicsVector2;\n /** Witness point on the second shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnSecond: PibblPhysicsVector2;\n /** Direction from the second shape toward the first. */\n readonly normal: PibblPhysicsVector2;\n}\n\n/**\n * A pair of contact witness points and their signed separation.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsShapeContact2D}\n * @see {@link PibblPhysicsCollisionEvent2D}\n * @see {@link PibblPhysicsContactInspection2D}\n */\nexport interface PibblPhysicsContactPoint2D {\n /** Witness point on the first shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnFirst: PibblPhysicsVector2;\n /** Witness point on the second shape. See {@link PibblPhysicsVector2}. */\n readonly pointOnSecond: PibblPhysicsVector2;\n /** Signed distance between the witness points. See {@link PibblPhysicsContactPoint2D}. */\n readonly separation: number;\n}\n\n/**\n * Contact normal and witness-point pairs for two overlapping or touching shapes.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsContactPoint2D}\n * @see {@link contactBetweenShapes2D}\n */\nexport interface PibblPhysicsShapeContact2D {\n /** Direction from the second shape toward the first. */\n readonly normal: PibblPhysicsVector2;\n /**\n * Points defining the geometry or reported by the contact query. See\n * {@link PibblPhysicsContactPoint2D}.\n */\n readonly points: readonly PibblPhysicsContactPoint2D[];\n}\n\n/**\n * Point, normal, distance, and time of impact returned by a geometry cast.\n *\n * @see {@link PibblPhysicsVector2}\n * @see {@link raycastShape2D}\n * @see {@link shapeCastAgainstShape2D}\n * @see {@link PibblPhysicsQueryHit2D}\n */\nexport interface PibblPhysicsShapeHit2D {\n /** A point in the operation's coordinate system. See {@link PibblPhysicsVector2}. */\n readonly point: PibblPhysicsVector2;\n /** Contact or surface normal returned by this query. See {@link PibblPhysicsVector2}. */\n readonly normal: PibblPhysicsVector2;\n /**\n * Distance measured in this query or guide's coordinate system. See {@link PibblPhysicsShapeHit2D}\n * .\n */\n readonly distance: number;\n /** Position along the cast at which contact first occurs. See {@link PibblPhysicsShapeHit2D}. */\n readonly timeOfImpact: number;\n}\n\nexport {\n arcShape2D,\n boundsOfShape2D,\n boxShape2D,\n capsuleShape2D,\n chainShape2D,\n circleShape2D,\n ellipseShape2D,\n massProperties2D,\n polygonShape2D,\n roundedBoxShape2D,\n segmentShape2D,\n transformShape2D,\n wedgeShape2D,\n} from './lib/2d/shapes.js';\n\nimport {\n contactBetweenPreparedShapes2D,\n containsPointInShape2D,\n distanceBetweenPreparedShapes2D,\n overlapPreparedShapes2D,\n} from './lib/2d/collision/pairs.js';\nexport {\n raycastShape2D,\n shapeCastAgainstShape2D,\n} from './lib/2d/collision/casts.js';\n\n/**\n * Tests whether a point lies within a posed shape without creating a physics world.\n *\n * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.\n * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.\n * @param point - Point in the same coordinate space as the posed shape. See\n * {@link PibblPhysicsVector2} .\n * @returns Whether the posed shape contains the point.\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsVector2}\n */\nexport function containsPoint2D(\n shape: PibblPhysicsShape2D,\n pose: PibblPhysicsPose2D,\n point: PibblPhysicsVector2,\n): boolean {\n return containsPointInShape2D(shape, pose, point);\n}\n\n/**\n * Computes signed separation and witness geometry between two posed shapes.\n *\n * @param first - First shape. See {@link PibblPhysicsShape2D}.\n * @param firstPose - Pose of the first shape. See {@link PibblPhysicsPose2D}.\n * @param second - Second shape. See {@link PibblPhysicsShape2D}.\n * @param secondPose - Pose of the second shape. See {@link PibblPhysicsPose2D}.\n * @returns Distance and closest-point information for the two posed shapes. See\n * {@link PibblPhysicsDistance2D} .\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsDistance2D}\n */\nexport function distanceBetweenShapes2D(\n first: PibblPhysicsShape2D,\n firstPose: PibblPhysicsPose2D,\n second: PibblPhysicsShape2D,\n secondPose: PibblPhysicsPose2D,\n): PibblPhysicsDistance2D {\n return distanceBetweenPreparedShapes2D(first, firstPose, second, secondPose);\n}\n\n/**\n * Tests whether two posed shapes overlap without creating a physics world.\n *\n * @param first - First shape. See {@link PibblPhysicsShape2D}.\n * @param firstPose - Pose of the first shape. See {@link PibblPhysicsPose2D}.\n * @param second - Second shape. See {@link PibblPhysicsShape2D}.\n * @param secondPose - Pose of the second shape. See {@link PibblPhysicsPose2D}.\n * @returns Whether the two posed shapes overlap.\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n */\nexport function overlapShapes2D(\n first: PibblPhysicsShape2D,\n firstPose: PibblPhysicsPose2D,\n second: PibblPhysicsShape2D,\n secondPose: PibblPhysicsPose2D,\n): boolean {\n return overlapPreparedShapes2D(first, firstPose, second, secondPose);\n}\n\n/**\n * Computes contact geometry for two posed shapes, or null when they do not contact.\n *\n * @param first - First shape. See {@link PibblPhysicsShape2D}.\n * @param firstPose - Pose of the first shape. See {@link PibblPhysicsPose2D}.\n * @param second - Second shape. See {@link PibblPhysicsShape2D}.\n * @param secondPose - Pose of the second shape. See {@link PibblPhysicsPose2D}.\n * @returns Contact information, or null when the shapes do not contact. See\n * {@link PibblPhysicsShapeContact2D} .\n *\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsShapeContact2D}\n */\nexport function contactBetweenShapes2D(\n first: PibblPhysicsShape2D,\n firstPose: PibblPhysicsPose2D,\n second: PibblPhysicsShape2D,\n secondPose: PibblPhysicsPose2D,\n): PibblPhysicsShapeContact2D | null {\n return contactBetweenPreparedShapes2D(first, firstPose, second, secondPose);\n}\n"],
5
5
  "mappings": "AAwKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAeA,SAAS,gBACd,OACA,MACA,OACS;AACT,SAAO,uBAAuB,OAAO,MAAM,KAAK;AAClD;AAgBO,SAAS,wBACd,OACA,WACA,QACA,YACwB;AACxB,SAAO,gCAAgC,OAAO,WAAW,QAAQ,UAAU;AAC7E;AAcO,SAAS,gBACd,OACA,WACA,QACA,YACS;AACT,SAAO,wBAAwB,OAAO,WAAW,QAAQ,UAAU;AACrE;AAgBO,SAAS,uBACd,OACA,WACA,QACA,YACmC;AACnC,SAAO,+BAA+B,OAAO,WAAW,QAAQ,UAAU;AAC5E;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import type { PibblPhysicsAabb2D, PibblPhysicsPose2D, PibblPhysicsRay2D, PibblPhysicsShape2D, PibblPhysicsVector2 } from "./2d-geometry.js";
2
- import type { PibblPhysicsQueryHit2D, PibblPhysicsQueryMatch2D, PibblPhysicsQueryMode, PibblPhysicsQueryOptions2D, PibblPhysicsQueryResult2D, PibblPhysicsBodyHandle2D, PibblPhysicsWorldHandle2D } from "./lib/2d/types.js";
2
+ import type { PibblPhysicsQueryHit2D, PibblPhysicsQueryMatch2D, PibblPhysicsQueryOptions2D, PibblPhysicsBodyHandle2D, PibblPhysicsWorldHandle2D } from "./lib/2d/types.js";
3
3
  import { collider2D, dynamicBody2D, kinematicBody2D, staticBody2D } from "./lib/2d/runtime/descriptors.js";
4
4
  import { PhysicsWorld2D, pibblPhysicsWorld2D } from "./lib/2d/runtime/world-component.js";
5
5
  import { Capsule2D, Chain2D, PhysicsShape2D, Segment2D } from "./lib/2d/canvas/components.js";
@@ -16,96 +16,149 @@ export { pibblPhysicsBody2D };
16
16
  export { pibblPhysicsWorld2D };
17
17
  export { applyForce2D, applyImpulse2D, applyTorque2D, disableBody2D, enableBody2D, setAngularVelocity2D, setLinearVelocity2D, sleepBody2D, teleportBody2D, wakeBody2D, };
18
18
  /**
19
- * Queries the committed world with a ray using the selected result mode and filters.
19
+ * Tests whether the committed world has any ray match, stopping at the first match.
20
20
  *
21
21
  * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
22
22
  * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.
23
- * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
24
- * @returns A boolean for any mode, one hit or null for closest mode, or ordered hits for all mode.
25
- * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryHit2D} .
23
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
24
+ * @returns Whether a matching collider exists.
25
+ */
26
+ export declare function raycastAny2D(world: PibblPhysicsWorldHandle2D, ray: PibblPhysicsRay2D, options?: PibblPhysicsQueryOptions2D): boolean;
27
+ /**
28
+ * Returns the first ray result ordered by time of impact, distance, then collider identity, or null.
26
29
  *
27
- * @see {@link PibblPhysicsWorldHandle2D}
28
- * @see {@link PibblPhysicsRay2D}
29
- * @see {@link PibblPhysicsQueryOptions2D}
30
- * @see {@link PibblPhysicsQueryResult2D}
31
- * @see {@link PibblPhysicsQueryHit2D}
32
- * @see {@link PibblPhysicsQueryMode}
30
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
31
+ * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.
32
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
33
+ * @returns One result or null. See {@link PibblPhysicsQueryHit2D}.
33
34
  */
34
- export declare function raycast2D<Mode extends PibblPhysicsQueryMode = "closest">(world: PibblPhysicsWorldHandle2D, ray: PibblPhysicsRay2D, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryHit2D>;
35
+ export declare function raycastClosest2D(world: PibblPhysicsWorldHandle2D, ray: PibblPhysicsRay2D, options?: PibblPhysicsQueryOptions2D): PibblPhysicsQueryHit2D | null;
35
36
  /**
36
- * Sweeps a shape through the committed world using the selected result mode and filters.
37
+ * Returns all ray results ordered by time of impact, distance, then collider identity as a frozen array.
38
+ *
39
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
40
+ * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.
41
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
42
+ * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryHit2D}.
43
+ */
44
+ export declare function raycastAll2D(world: PibblPhysicsWorldHandle2D, ray: PibblPhysicsRay2D, options?: PibblPhysicsQueryOptions2D): readonly PibblPhysicsQueryHit2D[];
45
+ /**
46
+ * Tests whether the committed world has any shape sweep match, stopping at the first match.
37
47
  *
38
48
  * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
39
49
  * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.
40
50
  * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.
41
51
  * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.
42
- * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
43
- * @returns A boolean for any mode, one hit or null for closest mode, or ordered hits for all mode.
44
- * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryHit2D} .
52
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
53
+ * @returns Whether a matching collider exists.
54
+ */
55
+ export declare function shapeCastAny2D(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, from: PibblPhysicsPose2D, translation: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D): boolean;
56
+ /**
57
+ * Returns the first shape sweep result ordered by time of impact, distance, then collider identity, or null.
45
58
  *
46
- * @see {@link PibblPhysicsWorldHandle2D}
47
- * @see {@link PibblPhysicsShape2D}
48
- * @see {@link PibblPhysicsPose2D}
49
- * @see {@link PibblPhysicsVector2}
50
- * @see {@link PibblPhysicsQueryOptions2D}
51
- * @see {@link PibblPhysicsQueryResult2D}
52
- * @see {@link PibblPhysicsQueryHit2D}
53
- * @see {@link PibblPhysicsQueryMode}
59
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
60
+ * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.
61
+ * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.
62
+ * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.
63
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
64
+ * @returns One result or null. See {@link PibblPhysicsQueryHit2D}.
65
+ */
66
+ export declare function shapeCastClosest2D(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, from: PibblPhysicsPose2D, translation: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D): PibblPhysicsQueryHit2D | null;
67
+ /**
68
+ * Returns all shape sweep results ordered by time of impact, distance, then collider identity as a frozen array.
69
+ *
70
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
71
+ * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.
72
+ * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.
73
+ * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.
74
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
75
+ * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryHit2D}.
76
+ */
77
+ export declare function shapeCastAll2D(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, from: PibblPhysicsPose2D, translation: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D): readonly PibblPhysicsQueryHit2D[];
78
+ /**
79
+ * Tests whether the committed world has any shape overlap match, stopping at the first match.
80
+ *
81
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
82
+ * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.
83
+ * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.
84
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
85
+ * @returns Whether a matching collider exists.
54
86
  */
55
- export declare function shapeCast2D<Mode extends PibblPhysicsQueryMode = "closest">(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, from: PibblPhysicsPose2D, translation: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryHit2D>;
87
+ export declare function hasShapeOverlap2D(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, pose: PibblPhysicsPose2D, options?: PibblPhysicsQueryOptions2D): boolean;
56
88
  /**
57
- * Queries committed world colliders overlapping a posed shape.
89
+ * Returns the first shape overlap result ordered by collider index, then generation, or null.
58
90
  *
59
91
  * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
60
- * @param shape - Shape to test for overlaps. See {@link PibblPhysicsShape2D}.
92
+ * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.
61
93
  * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.
62
- * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
63
- * @returns A boolean for any mode, one match or null for closest mode, or matches for all mode.
64
- * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryMatch2D} .
94
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
95
+ * @returns One result or null. See {@link PibblPhysicsQueryMatch2D}.
96
+ */
97
+ export declare function findShapeOverlap2D(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, pose: PibblPhysicsPose2D, options?: PibblPhysicsQueryOptions2D): PibblPhysicsQueryMatch2D | null;
98
+ /**
99
+ * Returns all shape overlap results ordered by collider index, then generation as a frozen array.
65
100
  *
66
- * @see {@link PibblPhysicsWorldHandle2D}
67
- * @see {@link PibblPhysicsShape2D}
68
- * @see {@link PibblPhysicsPose2D}
69
- * @see {@link PibblPhysicsQueryOptions2D}
70
- * @see {@link PibblPhysicsQueryResult2D}
71
- * @see {@link PibblPhysicsQueryMatch2D}
72
- * @see {@link PibblPhysicsQueryMode}
101
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
102
+ * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.
103
+ * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.
104
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
105
+ * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryMatch2D}.
73
106
  */
74
- export declare function overlapShape2D<Mode extends PibblPhysicsQueryMode = "closest">(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, pose: PibblPhysicsPose2D, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D>;
107
+ export declare function findAllShapeOverlaps2D(world: PibblPhysicsWorldHandle2D, shape: PibblPhysicsShape2D, pose: PibblPhysicsPose2D, options?: PibblPhysicsQueryOptions2D): readonly PibblPhysicsQueryMatch2D[];
75
108
  /**
76
- * Queries committed world colliders intersecting an axis-aligned region.
109
+ * Tests whether the committed world has any bounds intersection match, stopping at the first match.
77
110
  *
78
111
  * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
79
- * @param bounds - Axis-aligned query bounds in public coordinates. See {@link PibblPhysicsAabb2D}.
80
- * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
81
- * @returns A boolean for any mode, one match or null for closest mode, or matches for all mode.
82
- * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryMatch2D} .
112
+ * @param bounds - Axis-aligned query bounds. See {@link PibblPhysicsAabb2D}.
113
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
114
+ * @returns Whether a matching collider exists.
115
+ */
116
+ export declare function hasAabbMatch2D(world: PibblPhysicsWorldHandle2D, bounds: PibblPhysicsAabb2D, options?: PibblPhysicsQueryOptions2D): boolean;
117
+ /**
118
+ * Returns the first bounds intersection result ordered by collider index, then generation, or null.
83
119
  *
84
- * @see {@link PibblPhysicsWorldHandle2D}
85
- * @see {@link PibblPhysicsAabb2D}
86
- * @see {@link PibblPhysicsQueryOptions2D}
87
- * @see {@link PibblPhysicsQueryResult2D}
88
- * @see {@link PibblPhysicsQueryMatch2D}
89
- * @see {@link PibblPhysicsQueryMode}
120
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
121
+ * @param bounds - Axis-aligned query bounds. See {@link PibblPhysicsAabb2D}.
122
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
123
+ * @returns One result or null. See {@link PibblPhysicsQueryMatch2D}.
90
124
  */
91
- export declare function queryAabb2D<Mode extends PibblPhysicsQueryMode = "closest">(world: PibblPhysicsWorldHandle2D, bounds: PibblPhysicsAabb2D, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D>;
125
+ export declare function findAabbMatch2D(world: PibblPhysicsWorldHandle2D, bounds: PibblPhysicsAabb2D, options?: PibblPhysicsQueryOptions2D): PibblPhysicsQueryMatch2D | null;
92
126
  /**
93
- * Queries committed world colliders containing a point.
127
+ * Returns all bounds intersection results ordered by collider index, then generation as a frozen array.
94
128
  *
95
129
  * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
96
- * @param point - Point in public coordinates. See {@link PibblPhysicsVector2}.
97
- * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
98
- * @returns A boolean for any mode, one match or null for closest mode, or matches for all mode.
99
- * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryMatch2D} .
130
+ * @param bounds - Axis-aligned query bounds. See {@link PibblPhysicsAabb2D}.
131
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
132
+ * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryMatch2D}.
133
+ */
134
+ export declare function findAllAabbMatches2D(world: PibblPhysicsWorldHandle2D, bounds: PibblPhysicsAabb2D, options?: PibblPhysicsQueryOptions2D): readonly PibblPhysicsQueryMatch2D[];
135
+ /**
136
+ * Tests whether the committed world has any point containment match, stopping at the first match.
100
137
  *
101
- * @see {@link PibblPhysicsWorldHandle2D}
102
- * @see {@link PibblPhysicsVector2}
103
- * @see {@link PibblPhysicsQueryOptions2D}
104
- * @see {@link PibblPhysicsQueryResult2D}
105
- * @see {@link PibblPhysicsQueryMatch2D}
106
- * @see {@link PibblPhysicsQueryMode}
138
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
139
+ * @param point - Point in simulation coordinates. See {@link PibblPhysicsVector2}.
140
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
141
+ * @returns Whether a matching collider exists.
142
+ */
143
+ export declare function hasPointMatch2D(world: PibblPhysicsWorldHandle2D, point: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D): boolean;
144
+ /**
145
+ * Returns the first point containment result ordered by collider index, then generation, or null.
146
+ *
147
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
148
+ * @param point - Point in simulation coordinates. See {@link PibblPhysicsVector2}.
149
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
150
+ * @returns One result or null. See {@link PibblPhysicsQueryMatch2D}.
151
+ */
152
+ export declare function findPointMatch2D(world: PibblPhysicsWorldHandle2D, point: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D): PibblPhysicsQueryMatch2D | null;
153
+ /**
154
+ * Returns all point containment results ordered by collider index, then generation as a frozen array.
155
+ *
156
+ * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.
157
+ * @param point - Point in simulation coordinates. See {@link PibblPhysicsVector2}.
158
+ * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.
159
+ * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryMatch2D}.
107
160
  */
108
- export declare function queryPoint2D<Mode extends PibblPhysicsQueryMode = "closest">(world: PibblPhysicsWorldHandle2D, point: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D>;
161
+ export declare function findAllPointMatches2D(world: PibblPhysicsWorldHandle2D, point: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D): readonly PibblPhysicsQueryMatch2D[];
109
162
  /**
110
163
  * Converts root-logical pointer coordinates to this world's simulation space.
111
164
  *
@@ -37,29 +37,50 @@ import {
37
37
  shapeCastAgainstShape2D
38
38
  } from "./lib/2d/collision/casts.js";
39
39
  export * from "./lib/2d/types.js";
40
- function raycast2D(world, ray, options) {
41
- return requirePhysicsWorld2DController(world).raycast(ray, options);
42
- }
43
- function shapeCast2D(world, shape, from, translation, options) {
44
- return requirePhysicsWorld2DController(world).shapeCast(
45
- shape,
46
- from,
47
- translation,
48
- options
49
- );
50
- }
51
- function overlapShape2D(world, shape, pose, options) {
52
- return requirePhysicsWorld2DController(world).overlapShape(
53
- shape,
54
- pose,
55
- options
56
- );
57
- }
58
- function queryAabb2D(world, bounds, options) {
59
- return requirePhysicsWorld2DController(world).queryAabb(bounds, options);
60
- }
61
- function queryPoint2D(world, point, options) {
62
- return requirePhysicsWorld2DController(world).queryPoint(point, options);
40
+ function raycastAny2D(world, ray, options) {
41
+ return requirePhysicsWorld2DController(world).raycast(ray, { ...options, mode: "any" });
42
+ }
43
+ function raycastClosest2D(world, ray, options) {
44
+ return requirePhysicsWorld2DController(world).raycast(ray, { ...options, mode: "closest" });
45
+ }
46
+ function raycastAll2D(world, ray, options) {
47
+ return requirePhysicsWorld2DController(world).raycast(ray, { ...options, mode: "all" });
48
+ }
49
+ function shapeCastAny2D(world, shape, from, translation, options) {
50
+ return requirePhysicsWorld2DController(world).shapeCast(shape, from, translation, { ...options, mode: "any" });
51
+ }
52
+ function shapeCastClosest2D(world, shape, from, translation, options) {
53
+ return requirePhysicsWorld2DController(world).shapeCast(shape, from, translation, { ...options, mode: "closest" });
54
+ }
55
+ function shapeCastAll2D(world, shape, from, translation, options) {
56
+ return requirePhysicsWorld2DController(world).shapeCast(shape, from, translation, { ...options, mode: "all" });
57
+ }
58
+ function hasShapeOverlap2D(world, shape, pose, options) {
59
+ return requirePhysicsWorld2DController(world).overlapShape(shape, pose, { ...options, mode: "any" });
60
+ }
61
+ function findShapeOverlap2D(world, shape, pose, options) {
62
+ return requirePhysicsWorld2DController(world).overlapShape(shape, pose, { ...options, mode: "closest" });
63
+ }
64
+ function findAllShapeOverlaps2D(world, shape, pose, options) {
65
+ return requirePhysicsWorld2DController(world).overlapShape(shape, pose, { ...options, mode: "all" });
66
+ }
67
+ function hasAabbMatch2D(world, bounds, options) {
68
+ return requirePhysicsWorld2DController(world).queryAabb(bounds, { ...options, mode: "any" });
69
+ }
70
+ function findAabbMatch2D(world, bounds, options) {
71
+ return requirePhysicsWorld2DController(world).queryAabb(bounds, { ...options, mode: "closest" });
72
+ }
73
+ function findAllAabbMatches2D(world, bounds, options) {
74
+ return requirePhysicsWorld2DController(world).queryAabb(bounds, { ...options, mode: "all" });
75
+ }
76
+ function hasPointMatch2D(world, point, options) {
77
+ return requirePhysicsWorld2DController(world).queryPoint(point, { ...options, mode: "any" });
78
+ }
79
+ function findPointMatch2D(world, point, options) {
80
+ return requirePhysicsWorld2DController(world).queryPoint(point, { ...options, mode: "closest" });
81
+ }
82
+ function findAllPointMatches2D(world, point, options) {
83
+ return requirePhysicsWorld2DController(world).queryPoint(point, { ...options, mode: "all" });
63
84
  }
64
85
  function toPhysicsPoint2D(world, point) {
65
86
  return requirePhysicsWorld2DController(world).convertPoint(point, false);
@@ -94,21 +115,31 @@ export {
94
115
  disableBody2D,
95
116
  dynamicBody2D,
96
117
  enableBody2D,
118
+ findAabbMatch2D,
119
+ findAllAabbMatches2D,
120
+ findAllPointMatches2D,
121
+ findAllShapeOverlaps2D,
122
+ findPointMatch2D,
123
+ findShapeOverlap2D,
97
124
  fromPhysicsPoint2D,
125
+ hasAabbMatch2D,
126
+ hasPointMatch2D,
127
+ hasShapeOverlap2D,
98
128
  inspectPhysics2D,
99
129
  kinematicBody2D,
100
- overlapShape2D,
101
130
  physicsObstacles2D,
102
131
  pibblPhysicsBody2D,
103
132
  pibblPhysicsWorld2D,
104
- queryAabb2D,
105
- queryPoint2D,
106
- raycast2D,
133
+ raycastAll2D,
134
+ raycastAny2D,
135
+ raycastClosest2D,
107
136
  raycastShape2D,
108
137
  setAngularVelocity2D,
109
138
  setLinearVelocity2D,
110
- shapeCast2D,
111
139
  shapeCastAgainstShape2D,
140
+ shapeCastAll2D,
141
+ shapeCastAny2D,
142
+ shapeCastClosest2D,
112
143
  sleepBody2D,
113
144
  staticBody2D,
114
145
  teleportBody2D,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/physics/2d.ts"],
4
- "sourcesContent": ["import type { PibblPhysicsInspection2D, PibblPhysicsBodyInspection2D } from \"./lib/2d/inspection-types.js\";\nimport type {\n PibblPhysicsAabb2D,\n PibblPhysicsPose2D,\n PibblPhysicsRay2D,\n PibblPhysicsShape2D,\n PibblPhysicsVector2,\n} from \"./2d-geometry.js\";\nimport type {\n PibblPhysicsQueryHit2D,\n PibblPhysicsQueryMatch2D,\n PibblPhysicsQueryMode,\n PibblPhysicsQueryOptions2D,\n PibblPhysicsQueryResult2D,\n PibblPhysicsBodyHandle2D,\n PibblPhysicsWorldHandle2D,\n} from \"./lib/2d/types.js\";\nimport {\n collider2D,\n dynamicBody2D,\n kinematicBody2D,\n staticBody2D,\n} from \"./lib/2d/runtime/descriptors.js\";\nimport {\n PhysicsWorld2D,\n pibblPhysicsWorld2D,\n} from \"./lib/2d/runtime/world-component.js\";\nimport {\n Capsule2D,\n Chain2D,\n PhysicsShape2D,\n Segment2D,\n} from \"./lib/2d/canvas/components.js\";\nimport { withPhysicsShape2D } from \"./lib/2d/canvas/custom.js\";\nimport {\n applyForce2D,\n applyImpulse2D,\n applyTorque2D,\n pibblPhysicsBody2D,\n disableBody2D,\n enableBody2D,\n isPhysicsBodyHandle2D,\n physicsBodyHandleBinding2D,\n setAngularVelocity2D,\n setLinearVelocity2D,\n sleepBody2D,\n teleportBody2D,\n wakeBody2D,\n} from \"./lib/2d/runtime/body-handle.js\";\nimport { requirePhysicsWorld2DController } from \"./lib/2d/runtime/controller.js\";\n\nexport * from \"./2d-geometry.js\";\nexport {\n raycastShape2D,\n shapeCastAgainstShape2D,\n} from \"./lib/2d/collision/casts.js\";\nexport * from \"./lib/2d/types.js\";\n\nexport { PhysicsWorld2D };\nexport { PhysicsShape2D, Capsule2D, Segment2D, Chain2D };\n\nexport { collider2D, dynamicBody2D, kinematicBody2D, staticBody2D };\nexport { withPhysicsShape2D };\n\nexport { pibblPhysicsBody2D };\n\nexport { pibblPhysicsWorld2D };\n\nexport {\n applyForce2D,\n applyImpulse2D,\n applyTorque2D,\n disableBody2D,\n enableBody2D,\n setAngularVelocity2D,\n setLinearVelocity2D,\n sleepBody2D,\n teleportBody2D,\n wakeBody2D,\n};\n\n/**\n * Queries the committed world with a ray using the selected result mode and filters.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.\n * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns A boolean for any mode, one hit or null for closest mode, or ordered hits for all mode.\n * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryHit2D} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsRay2D}\n * @see {@link PibblPhysicsQueryOptions2D}\n * @see {@link PibblPhysicsQueryResult2D}\n * @see {@link PibblPhysicsQueryHit2D}\n * @see {@link PibblPhysicsQueryMode}\n */\nexport function raycast2D<Mode extends PibblPhysicsQueryMode = \"closest\">(\n world: PibblPhysicsWorldHandle2D,\n ray: PibblPhysicsRay2D,\n options?: PibblPhysicsQueryOptions2D<Mode>,\n): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryHit2D> {\n return requirePhysicsWorld2DController(world).raycast(ray, options);\n}\n\n/**\n * Sweeps a shape through the committed world using the selected result mode and filters.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.\n * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.\n * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.\n * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns A boolean for any mode, one hit or null for closest mode, or ordered hits for all mode.\n * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryHit2D} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsQueryOptions2D}\n * @see {@link PibblPhysicsQueryResult2D}\n * @see {@link PibblPhysicsQueryHit2D}\n * @see {@link PibblPhysicsQueryMode}\n */\nexport function shapeCast2D<Mode extends PibblPhysicsQueryMode = \"closest\">(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n from: PibblPhysicsPose2D,\n translation: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D<Mode>,\n): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryHit2D> {\n return requirePhysicsWorld2DController(world).shapeCast(\n shape,\n from,\n translation,\n options,\n );\n}\n\n/**\n * Queries committed world colliders overlapping a posed shape.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to test for overlaps. See {@link PibblPhysicsShape2D}.\n * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.\n * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns A boolean for any mode, one match or null for closest mode, or matches for all mode.\n * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryMatch2D} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsShape2D}\n * @see {@link PibblPhysicsPose2D}\n * @see {@link PibblPhysicsQueryOptions2D}\n * @see {@link PibblPhysicsQueryResult2D}\n * @see {@link PibblPhysicsQueryMatch2D}\n * @see {@link PibblPhysicsQueryMode}\n */\nexport function overlapShape2D<Mode extends PibblPhysicsQueryMode = \"closest\">(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n pose: PibblPhysicsPose2D,\n options?: PibblPhysicsQueryOptions2D<Mode>,\n): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D> {\n return requirePhysicsWorld2DController(world).overlapShape(\n shape,\n pose,\n options,\n );\n}\n\n/**\n * Queries committed world colliders intersecting an axis-aligned region.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param bounds - Axis-aligned query bounds in public coordinates. See {@link PibblPhysicsAabb2D}.\n * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns A boolean for any mode, one match or null for closest mode, or matches for all mode.\n * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryMatch2D} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsAabb2D}\n * @see {@link PibblPhysicsQueryOptions2D}\n * @see {@link PibblPhysicsQueryResult2D}\n * @see {@link PibblPhysicsQueryMatch2D}\n * @see {@link PibblPhysicsQueryMode}\n */\nexport function queryAabb2D<Mode extends PibblPhysicsQueryMode = \"closest\">(\n world: PibblPhysicsWorldHandle2D,\n bounds: PibblPhysicsAabb2D,\n options?: PibblPhysicsQueryOptions2D<Mode>,\n): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D> {\n return requirePhysicsWorld2DController(world).queryAabb(bounds, options);\n}\n\n/**\n * Queries committed world colliders containing a point.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param point - Point in public coordinates. See {@link PibblPhysicsVector2}.\n * @param options - Result mode and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns A boolean for any mode, one match or null for closest mode, or matches for all mode.\n * See {@link PibblPhysicsQueryResult2D} , {@link PibblPhysicsQueryMatch2D} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsVector2}\n * @see {@link PibblPhysicsQueryOptions2D}\n * @see {@link PibblPhysicsQueryResult2D}\n * @see {@link PibblPhysicsQueryMatch2D}\n * @see {@link PibblPhysicsQueryMode}\n */\nexport function queryPoint2D<Mode extends PibblPhysicsQueryMode = \"closest\">(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D<Mode>,\n): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D> {\n return requirePhysicsWorld2DController(world).queryPoint(point, options);\n}\n\n/**\n * Converts root-logical pointer coordinates to this world's simulation space.\n *\n * @param world - World providing unit and coordinate conversion. See\n * {@link PibblPhysicsWorldHandle2D} .\n * @param point - Point in public Canvas coordinates. See {@link PibblPhysicsVector2}.\n * @returns The equivalent point in this world's local simulation space. See\n * {@link PibblPhysicsVector2} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsVector2}\n */\nexport function toPhysicsPoint2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n): PibblPhysicsVector2 {\n return requirePhysicsWorld2DController(world).convertPoint(point, false);\n}\n\n/**\n * Converts a simulation-space point to root-logical Canvas coordinates.\n *\n * @param world - World providing unit and coordinate conversion. See\n * {@link PibblPhysicsWorldHandle2D} .\n * @param point - Point in this world's local simulation space. See {@link PibblPhysicsVector2}.\n * @returns The equivalent point in public Canvas coordinates. See {@link PibblPhysicsVector2}.\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsVector2}\n */\nexport function fromPhysicsPoint2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n): PibblPhysicsVector2 {\n return requirePhysicsWorld2DController(world).convertPoint(point, true);\n}\n\nexport type {\n PibblPhysicsInspection2D,\n PibblPhysicsBodyInspection2D,\n PibblPhysicsColliderInspection2D,\n PibblPhysicsContactInspection2D,\n} from \"./lib/2d/inspection-types.js\";\n\n/**\n * Returns immutable JSON-safe observations without advancing the simulation. See\n * {@link PibblPhysicsWorldHandle2D}.\n * @param world - World to inspect. See {@link PibblPhysicsWorldHandle2D}.\n * @returns Current world simulation and ownership diagnostics.\n */\nexport function inspectPhysics2D(\n world: PibblPhysicsWorldHandle2D,\n): import(\"./lib/2d/inspection-types.js\").PibblPhysicsInspection2D;\n\n/**\n * Returns the immutable observation for this currently bound body, if any. See\n * {@link PibblPhysicsBodyHandle2D}.\n * @param body - Body to inspect. See {@link PibblPhysicsBodyHandle2D}.\n * @returns Current body diagnostics, or undefined when the handle has no live body.\n */\nexport function inspectPhysics2D(\n body: PibblPhysicsBodyHandle2D,\n): import(\"./lib/2d/inspection-types.js\").PibblPhysicsBodyInspection2D | undefined;\n/**\n * Returns a diagnostic snapshot of a live world or body, or undefined when unavailable.\n *\n * @param target - World or body handle to inspect. See {@link PibblPhysicsWorldHandle2D} ,\n * {@link PibblPhysicsBodyHandle2D} .\n * @returns The corresponding diagnostics, or undefined for an unmounted body.\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsBodyHandle2D}\n * @see {@link PibblPhysicsInspection2D}\n * @see {@link PibblPhysicsBodyInspection2D}\n */\nexport function inspectPhysics2D(\n target: PibblPhysicsWorldHandle2D | PibblPhysicsBodyHandle2D,\n):\n | import(\"./lib/2d/inspection-types.js\").PibblPhysicsInspection2D\n | import(\"./lib/2d/inspection-types.js\").PibblPhysicsBodyInspection2D\n | undefined {\n if (isPhysicsBodyHandle2D(target)) {\n const binding = physicsBodyHandleBinding2D(target);\n return binding?.controller.inspectBody(binding.bodyId);\n }\n return requirePhysicsWorld2DController(target).inspect();\n}\n\nexport {\n PhysicsDebug2D,\n type PibblPhysicsDebug2DProps,\n} from \"./lib/2d/canvas/debug.js\";\n\n/**\n * A borrowed committed solid batch, structurally compatible with a flow obstacle source.\n *\n * @param world - World supplying collider geometry. See {@link PibblPhysicsWorldHandle2D}.\n * @returns An obstacle source whose read method returns the current revision and packed geometry.\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n */\nexport function physicsObstacles2D(world: PibblPhysicsWorldHandle2D): Readonly<{\n read(): Readonly<{ revision: number; boxes: Float64Array; ellipses: Float64Array; polygons: Float64Array }>;\n}> {\n return requirePhysicsWorld2DController(world).getObstacleSource();\n}\n"],
5
- "mappings": "AAiBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uCAAuC;AAEhD,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,cAAc;AAyCP,SAAS,UACd,OACA,KACA,SACyD;AACzD,SAAO,gCAAgC,KAAK,EAAE,QAAQ,KAAK,OAAO;AACpE;AAsBO,SAAS,YACd,OACA,OACA,MACA,aACA,SACyD;AACzD,SAAO,gCAAgC,KAAK,EAAE;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAoBO,SAAS,eACd,OACA,OACA,MACA,SAC2D;AAC3D,SAAO,gCAAgC,KAAK,EAAE;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAkBO,SAAS,YACd,OACA,QACA,SAC2D;AAC3D,SAAO,gCAAgC,KAAK,EAAE,UAAU,QAAQ,OAAO;AACzE;AAkBO,SAAS,aACd,OACA,OACA,SAC2D;AAC3D,SAAO,gCAAgC,KAAK,EAAE,WAAW,OAAO,OAAO;AACzE;AAcO,SAAS,iBACd,OACA,OACqB;AACrB,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,KAAK;AACzE;AAaO,SAAS,mBACd,OACA,OACqB;AACrB,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,IAAI;AACxE;AAwCO,SAAS,iBACd,QAIY;AACZ,MAAI,sBAAsB,MAAM,GAAG;AACjC,UAAM,UAAU,2BAA2B,MAAM;AACjD,WAAO,SAAS,WAAW,YAAY,QAAQ,MAAM;AAAA,EACvD;AACA,SAAO,gCAAgC,MAAM,EAAE,QAAQ;AACzD;AAEA;AAAA,EACE;AAAA,OAEK;AAUA,SAAS,mBAAmB,OAEhC;AACD,SAAO,gCAAgC,KAAK,EAAE,kBAAkB;AAClE;",
4
+ "sourcesContent": ["import type { PibblPhysicsInspection2D, PibblPhysicsBodyInspection2D } from \"./lib/2d/inspection-types.js\";\nimport type {\n PibblPhysicsAabb2D,\n PibblPhysicsPose2D,\n PibblPhysicsRay2D,\n PibblPhysicsShape2D,\n PibblPhysicsVector2,\n} from \"./2d-geometry.js\";\nimport type {\n PibblPhysicsQueryHit2D,\n PibblPhysicsQueryMatch2D,\n PibblPhysicsQueryOptions2D,\n PibblPhysicsBodyHandle2D,\n PibblPhysicsWorldHandle2D,\n} from \"./lib/2d/types.js\";\nimport {\n collider2D,\n dynamicBody2D,\n kinematicBody2D,\n staticBody2D,\n} from \"./lib/2d/runtime/descriptors.js\";\nimport {\n PhysicsWorld2D,\n pibblPhysicsWorld2D,\n} from \"./lib/2d/runtime/world-component.js\";\nimport {\n Capsule2D,\n Chain2D,\n PhysicsShape2D,\n Segment2D,\n} from \"./lib/2d/canvas/components.js\";\nimport { withPhysicsShape2D } from \"./lib/2d/canvas/custom.js\";\nimport {\n applyForce2D,\n applyImpulse2D,\n applyTorque2D,\n pibblPhysicsBody2D,\n disableBody2D,\n enableBody2D,\n isPhysicsBodyHandle2D,\n physicsBodyHandleBinding2D,\n setAngularVelocity2D,\n setLinearVelocity2D,\n sleepBody2D,\n teleportBody2D,\n wakeBody2D,\n} from \"./lib/2d/runtime/body-handle.js\";\nimport { requirePhysicsWorld2DController } from \"./lib/2d/runtime/controller.js\";\n\nexport * from \"./2d-geometry.js\";\nexport {\n raycastShape2D,\n shapeCastAgainstShape2D,\n} from \"./lib/2d/collision/casts.js\";\nexport * from \"./lib/2d/types.js\";\n\nexport { PhysicsWorld2D };\nexport { PhysicsShape2D, Capsule2D, Segment2D, Chain2D };\n\nexport { collider2D, dynamicBody2D, kinematicBody2D, staticBody2D };\nexport { withPhysicsShape2D };\n\nexport { pibblPhysicsBody2D };\n\nexport { pibblPhysicsWorld2D };\n\nexport {\n applyForce2D,\n applyImpulse2D,\n applyTorque2D,\n disableBody2D,\n enableBody2D,\n setAngularVelocity2D,\n setLinearVelocity2D,\n sleepBody2D,\n teleportBody2D,\n wakeBody2D,\n};\n\n/**\n * Tests whether the committed world has any ray match, stopping at the first match.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Whether a matching collider exists.\n */\nexport function raycastAny2D(\n world: PibblPhysicsWorldHandle2D,\n ray: PibblPhysicsRay2D,\n options?: PibblPhysicsQueryOptions2D,\n): boolean {\n return requirePhysicsWorld2DController(world).raycast(ray, { ...options, mode: \"any\" });\n}\n\n/**\n * Returns the first ray result ordered by time of impact, distance, then collider identity, or null.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns One result or null. See {@link PibblPhysicsQueryHit2D}.\n */\nexport function raycastClosest2D(\n world: PibblPhysicsWorldHandle2D,\n ray: PibblPhysicsRay2D,\n options?: PibblPhysicsQueryOptions2D,\n): PibblPhysicsQueryHit2D | null {\n return requirePhysicsWorld2DController(world).raycast(ray, { ...options, mode: \"closest\" });\n}\n\n/**\n * Returns all ray results ordered by time of impact, distance, then collider identity as a frozen array.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param ray - Ray origin, direction, and travel limit. See {@link PibblPhysicsRay2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryHit2D}.\n */\nexport function raycastAll2D(\n world: PibblPhysicsWorldHandle2D,\n ray: PibblPhysicsRay2D,\n options?: PibblPhysicsQueryOptions2D,\n): readonly PibblPhysicsQueryHit2D[] {\n return requirePhysicsWorld2DController(world).raycast(ray, { ...options, mode: \"all\" });\n}\n\n/**\n * Tests whether the committed world has any shape sweep match, stopping at the first match.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.\n * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.\n * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Whether a matching collider exists.\n */\nexport function shapeCastAny2D(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n from: PibblPhysicsPose2D,\n translation: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D,\n): boolean {\n return requirePhysicsWorld2DController(world).shapeCast(shape, from, translation, { ...options, mode: \"any\" });\n}\n\n/**\n * Returns the first shape sweep result ordered by time of impact, distance, then collider identity, or null.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.\n * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.\n * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns One result or null. See {@link PibblPhysicsQueryHit2D}.\n */\nexport function shapeCastClosest2D(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n from: PibblPhysicsPose2D,\n translation: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D,\n): PibblPhysicsQueryHit2D | null {\n return requirePhysicsWorld2DController(world).shapeCast(shape, from, translation, { ...options, mode: \"closest\" });\n}\n\n/**\n * Returns all shape sweep results ordered by time of impact, distance, then collider identity as a frozen array.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to sweep. See {@link PibblPhysicsShape2D}.\n * @param from - Initial shape pose. See {@link PibblPhysicsPose2D}.\n * @param translation - Translation vector for the sweep. See {@link PibblPhysicsVector2}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryHit2D}.\n */\nexport function shapeCastAll2D(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n from: PibblPhysicsPose2D,\n translation: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D,\n): readonly PibblPhysicsQueryHit2D[] {\n return requirePhysicsWorld2DController(world).shapeCast(shape, from, translation, { ...options, mode: \"all\" });\n}\n\n/**\n * Tests whether the committed world has any shape overlap match, stopping at the first match.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.\n * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Whether a matching collider exists.\n */\nexport function hasShapeOverlap2D(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n pose: PibblPhysicsPose2D,\n options?: PibblPhysicsQueryOptions2D,\n): boolean {\n return requirePhysicsWorld2DController(world).overlapShape(shape, pose, { ...options, mode: \"any\" });\n}\n\n/**\n * Returns the first shape overlap result ordered by collider index, then generation, or null.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.\n * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns One result or null. See {@link PibblPhysicsQueryMatch2D}.\n */\nexport function findShapeOverlap2D(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n pose: PibblPhysicsPose2D,\n options?: PibblPhysicsQueryOptions2D,\n): PibblPhysicsQueryMatch2D | null {\n return requirePhysicsWorld2DController(world).overlapShape(shape, pose, { ...options, mode: \"closest\" });\n}\n\n/**\n * Returns all shape overlap results ordered by collider index, then generation as a frozen array.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param shape - Shape to test. See {@link PibblPhysicsShape2D}.\n * @param pose - Shape pose. See {@link PibblPhysicsPose2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryMatch2D}.\n */\nexport function findAllShapeOverlaps2D(\n world: PibblPhysicsWorldHandle2D,\n shape: PibblPhysicsShape2D,\n pose: PibblPhysicsPose2D,\n options?: PibblPhysicsQueryOptions2D,\n): readonly PibblPhysicsQueryMatch2D[] {\n return requirePhysicsWorld2DController(world).overlapShape(shape, pose, { ...options, mode: \"all\" });\n}\n\n/**\n * Tests whether the committed world has any bounds intersection match, stopping at the first match.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param bounds - Axis-aligned query bounds. See {@link PibblPhysicsAabb2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Whether a matching collider exists.\n */\nexport function hasAabbMatch2D(\n world: PibblPhysicsWorldHandle2D,\n bounds: PibblPhysicsAabb2D,\n options?: PibblPhysicsQueryOptions2D,\n): boolean {\n return requirePhysicsWorld2DController(world).queryAabb(bounds, { ...options, mode: \"any\" });\n}\n\n/**\n * Returns the first bounds intersection result ordered by collider index, then generation, or null.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param bounds - Axis-aligned query bounds. See {@link PibblPhysicsAabb2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns One result or null. See {@link PibblPhysicsQueryMatch2D}.\n */\nexport function findAabbMatch2D(\n world: PibblPhysicsWorldHandle2D,\n bounds: PibblPhysicsAabb2D,\n options?: PibblPhysicsQueryOptions2D,\n): PibblPhysicsQueryMatch2D | null {\n return requirePhysicsWorld2DController(world).queryAabb(bounds, { ...options, mode: \"closest\" });\n}\n\n/**\n * Returns all bounds intersection results ordered by collider index, then generation as a frozen array.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param bounds - Axis-aligned query bounds. See {@link PibblPhysicsAabb2D}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryMatch2D}.\n */\nexport function findAllAabbMatches2D(\n world: PibblPhysicsWorldHandle2D,\n bounds: PibblPhysicsAabb2D,\n options?: PibblPhysicsQueryOptions2D,\n): readonly PibblPhysicsQueryMatch2D[] {\n return requirePhysicsWorld2DController(world).queryAabb(bounds, { ...options, mode: \"all\" });\n}\n\n/**\n * Tests whether the committed world has any point containment match, stopping at the first match.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param point - Point in simulation coordinates. See {@link PibblPhysicsVector2}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Whether a matching collider exists.\n */\nexport function hasPointMatch2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D,\n): boolean {\n return requirePhysicsWorld2DController(world).queryPoint(point, { ...options, mode: \"any\" });\n}\n\n/**\n * Returns the first point containment result ordered by collider index, then generation, or null.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param point - Point in simulation coordinates. See {@link PibblPhysicsVector2}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns One result or null. See {@link PibblPhysicsQueryMatch2D}.\n */\nexport function findPointMatch2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D,\n): PibblPhysicsQueryMatch2D | null {\n return requirePhysicsWorld2DController(world).queryPoint(point, { ...options, mode: \"closest\" });\n}\n\n/**\n * Returns all point containment results ordered by collider index, then generation as a frozen array.\n *\n * @param world - World to query. See {@link PibblPhysicsWorldHandle2D}.\n * @param point - Point in simulation coordinates. See {@link PibblPhysicsVector2}.\n * @param options - Sensor policy and collider filtering. See {@link PibblPhysicsQueryOptions2D}.\n * @returns Frozen results, empty when no collider matches. See {@link PibblPhysicsQueryMatch2D}.\n */\nexport function findAllPointMatches2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n options?: PibblPhysicsQueryOptions2D,\n): readonly PibblPhysicsQueryMatch2D[] {\n return requirePhysicsWorld2DController(world).queryPoint(point, { ...options, mode: \"all\" });\n}\n\n/**\n * Converts root-logical pointer coordinates to this world's simulation space.\n *\n * @param world - World providing unit and coordinate conversion. See\n * {@link PibblPhysicsWorldHandle2D} .\n * @param point - Point in public Canvas coordinates. See {@link PibblPhysicsVector2}.\n * @returns The equivalent point in this world's local simulation space. See\n * {@link PibblPhysicsVector2} .\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsVector2}\n */\nexport function toPhysicsPoint2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n): PibblPhysicsVector2 {\n return requirePhysicsWorld2DController(world).convertPoint(point, false);\n}\n\n/**\n * Converts a simulation-space point to root-logical Canvas coordinates.\n *\n * @param world - World providing unit and coordinate conversion. See\n * {@link PibblPhysicsWorldHandle2D} .\n * @param point - Point in this world's local simulation space. See {@link PibblPhysicsVector2}.\n * @returns The equivalent point in public Canvas coordinates. See {@link PibblPhysicsVector2}.\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsVector2}\n */\nexport function fromPhysicsPoint2D(\n world: PibblPhysicsWorldHandle2D,\n point: PibblPhysicsVector2,\n): PibblPhysicsVector2 {\n return requirePhysicsWorld2DController(world).convertPoint(point, true);\n}\n\nexport type {\n PibblPhysicsInspection2D,\n PibblPhysicsBodyInspection2D,\n PibblPhysicsColliderInspection2D,\n PibblPhysicsContactInspection2D,\n} from \"./lib/2d/inspection-types.js\";\n\n/**\n * Returns immutable JSON-safe observations without advancing the simulation. See\n * {@link PibblPhysicsWorldHandle2D}.\n * @param world - World to inspect. See {@link PibblPhysicsWorldHandle2D}.\n * @returns Current world simulation and ownership diagnostics.\n */\nexport function inspectPhysics2D(\n world: PibblPhysicsWorldHandle2D,\n): import(\"./lib/2d/inspection-types.js\").PibblPhysicsInspection2D;\n\n/**\n * Returns the immutable observation for this currently bound body, if any. See\n * {@link PibblPhysicsBodyHandle2D}.\n * @param body - Body to inspect. See {@link PibblPhysicsBodyHandle2D}.\n * @returns Current body diagnostics, or undefined when the handle has no live body.\n */\nexport function inspectPhysics2D(\n body: PibblPhysicsBodyHandle2D,\n): import(\"./lib/2d/inspection-types.js\").PibblPhysicsBodyInspection2D | undefined;\n/**\n * Returns a diagnostic snapshot of a live world or body, or undefined when unavailable.\n *\n * @param target - World or body handle to inspect. See {@link PibblPhysicsWorldHandle2D} ,\n * {@link PibblPhysicsBodyHandle2D} .\n * @returns The corresponding diagnostics, or undefined for an unmounted body.\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n * @see {@link PibblPhysicsBodyHandle2D}\n * @see {@link PibblPhysicsInspection2D}\n * @see {@link PibblPhysicsBodyInspection2D}\n */\nexport function inspectPhysics2D(\n target: PibblPhysicsWorldHandle2D | PibblPhysicsBodyHandle2D,\n):\n | import(\"./lib/2d/inspection-types.js\").PibblPhysicsInspection2D\n | import(\"./lib/2d/inspection-types.js\").PibblPhysicsBodyInspection2D\n | undefined {\n if (isPhysicsBodyHandle2D(target)) {\n const binding = physicsBodyHandleBinding2D(target);\n return binding?.controller.inspectBody(binding.bodyId);\n }\n return requirePhysicsWorld2DController(target).inspect();\n}\n\nexport {\n PhysicsDebug2D,\n type PibblPhysicsDebug2DProps,\n} from \"./lib/2d/canvas/debug.js\";\n\n/**\n * A borrowed committed solid batch, structurally compatible with a flow obstacle source.\n *\n * @param world - World supplying collider geometry. See {@link PibblPhysicsWorldHandle2D}.\n * @returns An obstacle source whose read method returns the current revision and packed geometry.\n *\n * @see {@link PibblPhysicsWorldHandle2D}\n */\nexport function physicsObstacles2D(world: PibblPhysicsWorldHandle2D): Readonly<{\n read(): Readonly<{ revision: number; boxes: Float64Array; ellipses: Float64Array; polygons: Float64Array }>;\n}> {\n return requirePhysicsWorld2DController(world).getObstacleSource();\n}\n"],
5
+ "mappings": "AAeA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uCAAuC;AAEhD,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,cAAc;AAiCP,SAAS,aACd,OACA,KACA,SACS;AACT,SAAO,gCAAgC,KAAK,EAAE,QAAQ,KAAK,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AACxF;AAUO,SAAS,iBACd,OACA,KACA,SAC+B;AAC/B,SAAO,gCAAgC,KAAK,EAAE,QAAQ,KAAK,EAAE,GAAG,SAAS,MAAM,UAAU,CAAC;AAC5F;AAUO,SAAS,aACd,OACA,KACA,SACmC;AACnC,SAAO,gCAAgC,KAAK,EAAE,QAAQ,KAAK,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AACxF;AAYO,SAAS,eACd,OACA,OACA,MACA,aACA,SACS;AACT,SAAO,gCAAgC,KAAK,EAAE,UAAU,OAAO,MAAM,aAAa,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AAC/G;AAYO,SAAS,mBACd,OACA,OACA,MACA,aACA,SAC+B;AAC/B,SAAO,gCAAgC,KAAK,EAAE,UAAU,OAAO,MAAM,aAAa,EAAE,GAAG,SAAS,MAAM,UAAU,CAAC;AACnH;AAYO,SAAS,eACd,OACA,OACA,MACA,aACA,SACmC;AACnC,SAAO,gCAAgC,KAAK,EAAE,UAAU,OAAO,MAAM,aAAa,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AAC/G;AAWO,SAAS,kBACd,OACA,OACA,MACA,SACS;AACT,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,MAAM,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AACrG;AAWO,SAAS,mBACd,OACA,OACA,MACA,SACiC;AACjC,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,MAAM,EAAE,GAAG,SAAS,MAAM,UAAU,CAAC;AACzG;AAWO,SAAS,uBACd,OACA,OACA,MACA,SACqC;AACrC,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,MAAM,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AACrG;AAUO,SAAS,eACd,OACA,QACA,SACS;AACT,SAAO,gCAAgC,KAAK,EAAE,UAAU,QAAQ,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AAC7F;AAUO,SAAS,gBACd,OACA,QACA,SACiC;AACjC,SAAO,gCAAgC,KAAK,EAAE,UAAU,QAAQ,EAAE,GAAG,SAAS,MAAM,UAAU,CAAC;AACjG;AAUO,SAAS,qBACd,OACA,QACA,SACqC;AACrC,SAAO,gCAAgC,KAAK,EAAE,UAAU,QAAQ,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AAC7F;AAUO,SAAS,gBACd,OACA,OACA,SACS;AACT,SAAO,gCAAgC,KAAK,EAAE,WAAW,OAAO,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AAC7F;AAUO,SAAS,iBACd,OACA,OACA,SACiC;AACjC,SAAO,gCAAgC,KAAK,EAAE,WAAW,OAAO,EAAE,GAAG,SAAS,MAAM,UAAU,CAAC;AACjG;AAUO,SAAS,sBACd,OACA,OACA,SACqC;AACrC,SAAO,gCAAgC,KAAK,EAAE,WAAW,OAAO,EAAE,GAAG,SAAS,MAAM,MAAM,CAAC;AAC7F;AAcO,SAAS,iBACd,OACA,OACqB;AACrB,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,KAAK;AACzE;AAaO,SAAS,mBACd,OACA,OACqB;AACrB,SAAO,gCAAgC,KAAK,EAAE,aAAa,OAAO,IAAI;AACxE;AAwCO,SAAS,iBACd,QAIY;AACZ,MAAI,sBAAsB,MAAM,GAAG;AACjC,UAAM,UAAU,2BAA2B,MAAM;AACjD,WAAO,SAAS,WAAW,YAAY,QAAQ,MAAM;AAAA,EACvD;AACA,SAAO,gCAAgC,MAAM,EAAE,QAAQ;AACzD;AAEA;AAAA,EACE;AAAA,OAEK;AAUA,SAAS,mBAAmB,OAEhC;AACD,SAAO,gCAAgC,KAAK,EAAE,kBAAkB;AAClE;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,6 @@
1
+ import type { PibblPhysicsQueryOptions2D } from './types.js';
2
+ export type QueryMode = 'closest' | 'any' | 'all';
3
+ export interface QueryOptions<Mode extends QueryMode = 'closest'> extends PibblPhysicsQueryOptions2D {
4
+ readonly mode?: Mode;
5
+ }
6
+ export type QueryResult<Mode extends QueryMode, Result> = Mode extends 'any' ? boolean : Mode extends 'all' ? readonly Result[] : Result | null;
@@ -1,7 +1,8 @@
1
+ import type { QueryMode, QueryOptions, QueryResult } from '../query-types.js';
1
2
  import type { PibblPhysicsBodyInspection2D, PibblPhysicsInspection2D } from "../inspection-types.js";
2
3
  import { type PibblInternalSimulationOwner } from "@pibbl/core/internal";
3
4
  import type { PibblPhysicsAabb2D, PibblPhysicsPose2D, PibblPhysicsRay2D, PibblPhysicsShape2D, PibblPhysicsVector2 } from "../../../2d-geometry.js";
4
- import type { PibblPhysicsBodyHandle2D, PibblPhysicsQueryHit2D, PibblPhysicsQueryMatch2D, PibblPhysicsQueryMode, PibblPhysicsQueryOptions2D, PibblPhysicsQueryResult2D, PibblPhysicsWorldHandle2D } from "../types.js";
5
+ import type { PibblPhysicsBodyHandle2D, PibblPhysicsQueryHit2D, PibblPhysicsQueryMatch2D, PibblPhysicsWorldHandle2D } from "../types.js";
5
6
  import type { PibblResolvedPhysicsWorld2DProps } from "./world-props.js";
6
7
  import { PhysicsWorld2DKernel, type PhysicsBodyCommand2D, type PhysicsCommand2D } from "../world/world.js";
7
8
  import { type PhysicsBodyHandleValues2D } from "./body-handle.js";
@@ -67,11 +68,11 @@ export declare class PhysicsWorld2DController {
67
68
  queueCommands(commands: readonly PhysicsCommand2D[]): void;
68
69
  acceptBodyHandleCommand(handle: PibblPhysicsBodyHandle2D, bindingGeneration: number, command: PhysicsBodyCommand2D): boolean;
69
70
  presentationPose(bodyId: number): PibblPhysicsPose2D | undefined;
70
- raycast<Mode extends PibblPhysicsQueryMode = "closest">(ray: PibblPhysicsRay2D, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryHit2D>;
71
- shapeCast<Mode extends PibblPhysicsQueryMode = "closest">(shape: PibblPhysicsShape2D, from: PibblPhysicsPose2D, translation: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryHit2D>;
72
- overlapShape<Mode extends PibblPhysicsQueryMode = "closest">(shape: PibblPhysicsShape2D, pose: PibblPhysicsPose2D, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D>;
73
- queryAabb<Mode extends PibblPhysicsQueryMode = "closest">(bounds: PibblPhysicsAabb2D, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D>;
74
- queryPoint<Mode extends PibblPhysicsQueryMode = "closest">(point: PibblPhysicsVector2, options?: PibblPhysicsQueryOptions2D<Mode>): PibblPhysicsQueryResult2D<Mode, PibblPhysicsQueryMatch2D>;
71
+ raycast<Mode extends QueryMode = "closest">(ray: PibblPhysicsRay2D, options?: QueryOptions<Mode>): QueryResult<Mode, PibblPhysicsQueryHit2D>;
72
+ shapeCast<Mode extends QueryMode = "closest">(shape: PibblPhysicsShape2D, from: PibblPhysicsPose2D, translation: PibblPhysicsVector2, options?: QueryOptions<Mode>): QueryResult<Mode, PibblPhysicsQueryHit2D>;
73
+ overlapShape<Mode extends QueryMode = "closest">(shape: PibblPhysicsShape2D, pose: PibblPhysicsPose2D, options?: QueryOptions<Mode>): QueryResult<Mode, PibblPhysicsQueryMatch2D>;
74
+ queryAabb<Mode extends QueryMode = "closest">(bounds: PibblPhysicsAabb2D, options?: QueryOptions<Mode>): QueryResult<Mode, PibblPhysicsQueryMatch2D>;
75
+ queryPoint<Mode extends QueryMode = "closest">(point: PibblPhysicsVector2, options?: QueryOptions<Mode>): QueryResult<Mode, PibblPhysicsQueryMatch2D>;
75
76
  bodyHandleValues(bodyId: number): PhysicsBodyHandleValues2D | undefined;
76
77
  inspectBody(bodyId: number): PibblPhysicsBodyInspection2D | undefined;
77
78
  dispose(): void;