plotboilerplate 1.28.0 → 1.28.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 (1022) hide show
  1. package/package.json +1 -1
  2. package/src/_cjs/BezierPath.d.ts +0 -610
  3. package/src/_cjs/BezierPath.js +0 -1127
  4. package/src/_cjs/BezierPath.js.map +0 -1
  5. package/src/_cjs/Bounds.d.ts +0 -252
  6. package/src/_cjs/Bounds.js +0 -320
  7. package/src/_cjs/Bounds.js.map +0 -1
  8. package/src/_cjs/Circle.d.ts +0 -214
  9. package/src/_cjs/Circle.js +0 -339
  10. package/src/_cjs/Circle.js.map +0 -1
  11. package/src/_cjs/CircleSector.d.ts +0 -211
  12. package/src/_cjs/CircleSector.js +0 -364
  13. package/src/_cjs/CircleSector.js.map +0 -1
  14. package/src/_cjs/CubicBezierCurve.d.ts +0 -656
  15. package/src/_cjs/CubicBezierCurve.js +0 -1062
  16. package/src/_cjs/CubicBezierCurve.js.map +0 -1
  17. package/src/_cjs/Grid.d.ts +0 -83
  18. package/src/_cjs/Grid.js +0 -90
  19. package/src/_cjs/Grid.js.map +0 -1
  20. package/src/_cjs/KeyHandler.d.ts +0 -177
  21. package/src/_cjs/KeyHandler.js +0 -435
  22. package/src/_cjs/KeyHandler.js.map +0 -1
  23. package/src/_cjs/Line.d.ts +0 -134
  24. package/src/_cjs/Line.js +0 -220
  25. package/src/_cjs/Line.js.map +0 -1
  26. package/src/_cjs/MouseHandler.d.ts +0 -283
  27. package/src/_cjs/MouseHandler.js +0 -423
  28. package/src/_cjs/MouseHandler.js.map +0 -1
  29. package/src/_cjs/PBImage.d.ts +0 -81
  30. package/src/_cjs/PBImage.js +0 -61
  31. package/src/_cjs/PBImage.js.map +0 -1
  32. package/src/_cjs/PBText.d.ts +0 -118
  33. package/src/_cjs/PBText.js +0 -63
  34. package/src/_cjs/PBText.js.map +0 -1
  35. package/src/_cjs/PlotBoilerplate.d.ts +0 -899
  36. package/src/_cjs/PlotBoilerplate.js +0 -2348
  37. package/src/_cjs/PlotBoilerplate.js.map +0 -1
  38. package/src/_cjs/Polygon.d.ts +0 -520
  39. package/src/_cjs/Polygon.js +0 -933
  40. package/src/_cjs/Polygon.js.map +0 -1
  41. package/src/_cjs/SVGBuilder.d.ts +0 -47
  42. package/src/_cjs/SVGBuilder.js +0 -100
  43. package/src/_cjs/SVGBuilder.js.map +0 -1
  44. package/src/_cjs/Triangle.d.ts +0 -392
  45. package/src/_cjs/Triangle.js +0 -497
  46. package/src/_cjs/Triangle.js.map +0 -1
  47. package/src/_cjs/UIDGenerator.d.ts +0 -12
  48. package/src/_cjs/UIDGenerator.js +0 -21
  49. package/src/_cjs/UIDGenerator.js.map +0 -1
  50. package/src/_cjs/VEllipse.d.ts +0 -319
  51. package/src/_cjs/VEllipse.js +0 -578
  52. package/src/_cjs/VEllipse.js.map +0 -1
  53. package/src/_cjs/VEllipseSector.d.ts +0 -230
  54. package/src/_cjs/VEllipseSector.js +0 -428
  55. package/src/_cjs/VEllipseSector.js.map +0 -1
  56. package/src/_cjs/Vector.d.ts +0 -126
  57. package/src/_cjs/Vector.js +0 -199
  58. package/src/_cjs/Vector.js.map +0 -1
  59. package/src/_cjs/VertTuple.d.ts +0 -284
  60. package/src/_cjs/VertTuple.js +0 -348
  61. package/src/_cjs/VertTuple.js.map +0 -1
  62. package/src/_cjs/Vertex.d.ts +0 -498
  63. package/src/_cjs/Vertex.js +0 -703
  64. package/src/_cjs/Vertex.js.map +0 -1
  65. package/src/_cjs/VertexAttr.d.ts +0 -72
  66. package/src/_cjs/VertexAttr.js +0 -59
  67. package/src/_cjs/VertexAttr.js.map +0 -1
  68. package/src/_cjs/VertexListeners.d.ts +0 -208
  69. package/src/_cjs/VertexListeners.js +0 -267
  70. package/src/_cjs/VertexListeners.js.map +0 -1
  71. package/src/_cjs/draw.d.ts +0 -657
  72. package/src/_cjs/draw.js +0 -1164
  73. package/src/_cjs/draw.js.map +0 -1
  74. package/src/_cjs/drawgl.d.ts +0 -544
  75. package/src/_cjs/drawgl.js +0 -794
  76. package/src/_cjs/drawgl.js.map +0 -1
  77. package/src/_cjs/drawutilssvg.d.ts +0 -954
  78. package/src/_cjs/drawutilssvg.js +0 -1713
  79. package/src/_cjs/drawutilssvg.js.map +0 -1
  80. package/src/_cjs/entry-glsupport.js +0 -28
  81. package/src/_cjs/entry.js +0 -29
  82. package/src/_cjs/geomutils.d.ts +0 -77
  83. package/src/_cjs/geomutils.js +0 -126
  84. package/src/_cjs/geomutils.js.map +0 -1
  85. package/src/_cjs/index.d.ts +0 -102
  86. package/src/_cjs/index.js +0 -128
  87. package/src/_cjs/index.js.map +0 -1
  88. package/src/_cjs/interfaces/DrawLib.d.ts +0 -582
  89. package/src/_cjs/interfaces/DrawLib.js +0 -32
  90. package/src/_cjs/interfaces/DrawLib.js.map +0 -1
  91. package/src/_cjs/interfaces/additionals.d.ts +0 -95
  92. package/src/_cjs/interfaces/additionals.js +0 -3
  93. package/src/_cjs/interfaces/additionals.js.map +0 -1
  94. package/src/_cjs/interfaces/core.d.ts +0 -286
  95. package/src/_cjs/interfaces/core.js +0 -30
  96. package/src/_cjs/interfaces/core.js.map +0 -1
  97. package/src/_cjs/interfaces/externals.d.ts +0 -56
  98. package/src/_cjs/interfaces/externals.js +0 -8
  99. package/src/_cjs/interfaces/externals.js.map +0 -1
  100. package/src/_cjs/interfaces/index.d.ts +0 -4
  101. package/src/_cjs/interfaces/index.js +0 -21
  102. package/src/_cjs/interfaces/index.js.map +0 -1
  103. package/src/_cjs/module.d.ts +0 -26
  104. package/src/_cjs/module.js +0 -60
  105. package/src/_cjs/module.js.map +0 -1
  106. package/src/_cjs/utils/InitializationObserver.d.ts +0 -18
  107. package/src/_cjs/utils/InitializationObserver.js +0 -63
  108. package/src/_cjs/utils/InitializationObserver.js.map +0 -1
  109. package/src/_cjs/utils/LissajousFigure.d.ts +0 -34
  110. package/src/_cjs/utils/LissajousFigure.js +0 -100
  111. package/src/_cjs/utils/LissajousFigure.js.map +0 -1
  112. package/src/_cjs/utils/NGons.d.ts +0 -13
  113. package/src/_cjs/utils/NGons.js +0 -36
  114. package/src/_cjs/utils/NGons.js.map +0 -1
  115. package/src/_cjs/utils/Params.d.ts +0 -17
  116. package/src/_cjs/utils/Params.js +0 -53
  117. package/src/_cjs/utils/Params.js.map +0 -1
  118. package/src/_cjs/utils/PerlinNoise.d.ts +0 -19
  119. package/src/_cjs/utils/PerlinNoise.js +0 -352
  120. package/src/_cjs/utils/PerlinNoise.js.map +0 -1
  121. package/src/_cjs/utils/SVGPathUtils.d.ts +0 -22
  122. package/src/_cjs/utils/SVGPathUtils.js +0 -45
  123. package/src/_cjs/utils/SVGPathUtils.js.map +0 -1
  124. package/src/_cjs/utils/WebColors.d.ts +0 -35
  125. package/src/_cjs/utils/WebColors.js +0 -58
  126. package/src/_cjs/utils/WebColors.js.map +0 -1
  127. package/src/_cjs/utils/WebColorsContrast.d.ts +0 -6
  128. package/src/_cjs/utils/WebColorsContrast.js +0 -12
  129. package/src/_cjs/utils/WebColorsContrast.js.map +0 -1
  130. package/src/_cjs/utils/WebColorsMalachite.d.ts +0 -12
  131. package/src/_cjs/utils/WebColorsMalachite.js +0 -28
  132. package/src/_cjs/utils/WebColorsMalachite.js.map +0 -1
  133. package/src/_cjs/utils/_gup.js_ +0 -13
  134. package/src/_cjs/utils/algorithms/CatmullRomPath.d.ts +0 -60
  135. package/src/_cjs/utils/algorithms/CatmullRomPath.js +0 -108
  136. package/src/_cjs/utils/algorithms/CatmullRomPath.js.map +0 -1
  137. package/src/_cjs/utils/algorithms/CircleIntersections.d.ts +0 -170
  138. package/src/_cjs/utils/algorithms/CircleIntersections.js +0 -310
  139. package/src/_cjs/utils/algorithms/CircleIntersections.js.map +0 -1
  140. package/src/_cjs/utils/algorithms/ContourLineDetection.d.ts +0 -150
  141. package/src/_cjs/utils/algorithms/ContourLineDetection.js +0 -367
  142. package/src/_cjs/utils/algorithms/ContourLineDetection.js.map +0 -1
  143. package/src/_cjs/utils/algorithms/CubicSplinePath.d.ts +0 -63
  144. package/src/_cjs/utils/algorithms/CubicSplinePath.js +0 -175
  145. package/src/_cjs/utils/algorithms/CubicSplinePath.js.map +0 -1
  146. package/src/_cjs/utils/algorithms/HobbyPath.d.ts +0 -81
  147. package/src/_cjs/utils/algorithms/HobbyPath.js +0 -278
  148. package/src/_cjs/utils/algorithms/HobbyPath.js.map +0 -1
  149. package/src/_cjs/utils/algorithms/Metaballs.d.ts +0 -30
  150. package/src/_cjs/utils/algorithms/Metaballs.js +0 -114
  151. package/src/_cjs/utils/algorithms/Metaballs.js.map +0 -1
  152. package/src/_cjs/utils/algorithms/PolygonInset.d.ts +0 -184
  153. package/src/_cjs/utils/algorithms/PolygonInset.js +0 -431
  154. package/src/_cjs/utils/algorithms/PolygonInset.js.map +0 -1
  155. package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.d.ts +0 -145
  156. package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.js +0 -269
  157. package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.js.map +0 -1
  158. package/src/_cjs/utils/algorithms/arrayFill.d.ts +0 -8
  159. package/src/_cjs/utils/algorithms/arrayFill.js +0 -18
  160. package/src/_cjs/utils/algorithms/arrayFill.js.map +0 -1
  161. package/src/_cjs/utils/algorithms/arrayResize.d.ts +0 -8
  162. package/src/_cjs/utils/algorithms/arrayResize.js +0 -24
  163. package/src/_cjs/utils/algorithms/arrayResize.js.map +0 -1
  164. package/src/_cjs/utils/algorithms/arrayShuffle.d.ts +0 -8
  165. package/src/_cjs/utils/algorithms/arrayShuffle.js +0 -15
  166. package/src/_cjs/utils/algorithms/arrayShuffle.js.map +0 -1
  167. package/src/_cjs/utils/algorithms/clearDuplicateVertices.d.ts +0 -22
  168. package/src/_cjs/utils/algorithms/clearDuplicateVertices.js +0 -51
  169. package/src/_cjs/utils/algorithms/clearDuplicateVertices.js.map +0 -1
  170. package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.d.ts +0 -24
  171. package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.js +0 -61
  172. package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.js.map +0 -1
  173. package/src/_cjs/utils/algorithms/convexHull.d.ts +0 -23
  174. package/src/_cjs/utils/algorithms/convexHull.js +0 -71
  175. package/src/_cjs/utils/algorithms/convexHull.js.map +0 -1
  176. package/src/_cjs/utils/algorithms/convexPolygonIncircle.d.ts +0 -41
  177. package/src/_cjs/utils/algorithms/convexPolygonIncircle.js +0 -145
  178. package/src/_cjs/utils/algorithms/convexPolygonIncircle.js.map +0 -1
  179. package/src/_cjs/utils/algorithms/delaunay.d.ts +0 -30
  180. package/src/_cjs/utils/algorithms/delaunay.js +0 -158
  181. package/src/_cjs/utils/algorithms/delaunay.js.map +0 -1
  182. package/src/_cjs/utils/algorithms/delaunay2voronoi.d.ts +0 -25
  183. package/src/_cjs/utils/algorithms/delaunay2voronoi.js +0 -104
  184. package/src/_cjs/utils/algorithms/delaunay2voronoi.js.map +0 -1
  185. package/src/_cjs/utils/algorithms/detectPaths.d.ts +0 -21
  186. package/src/_cjs/utils/algorithms/detectPaths.js +0 -169
  187. package/src/_cjs/utils/algorithms/detectPaths.js.map +0 -1
  188. package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.d.ts +0 -21
  189. package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.js +0 -51
  190. package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.js.map +0 -1
  191. package/src/_cjs/utils/algorithms/getContrastColor.d.ts +0 -13
  192. package/src/_cjs/utils/algorithms/getContrastColor.js +0 -26
  193. package/src/_cjs/utils/algorithms/getContrastColor.js.map +0 -1
  194. package/src/_cjs/utils/algorithms/matrixFill.d.ts +0 -10
  195. package/src/_cjs/utils/algorithms/matrixFill.js +0 -21
  196. package/src/_cjs/utils/algorithms/matrixFill.js.map +0 -1
  197. package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.d.ts +0 -23
  198. package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.js +0 -270
  199. package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.js.map +0 -1
  200. package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.d.ts +0 -28
  201. package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.js +0 -102
  202. package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.js.map +0 -1
  203. package/src/_cjs/utils/algorithms/sutherlandHodgman.d.ts +0 -16
  204. package/src/_cjs/utils/algorithms/sutherlandHodgman.js +0 -76
  205. package/src/_cjs/utils/algorithms/sutherlandHodgman.js.map +0 -1
  206. package/src/_cjs/utils/cloneVertexArray.d.ts +0 -13
  207. package/src/_cjs/utils/cloneVertexArray.js +0 -23
  208. package/src/_cjs/utils/cloneVertexArray.js.map +0 -1
  209. package/src/_cjs/utils/createRandomizedPolygon.d.ts +0 -14
  210. package/src/_cjs/utils/createRandomizedPolygon.js +0 -32
  211. package/src/_cjs/utils/createRandomizedPolygon.js.map +0 -1
  212. package/src/_cjs/utils/creategui.js +0 -434
  213. package/src/_cjs/utils/dat.gui.arrowbounce.polyfill.js +0 -128
  214. package/src/_cjs/utils/dat.gui.title.polyfill.js +0 -35
  215. package/src/_cjs/utils/datastructures/CircularIntervalSet.d.ts +0 -83
  216. package/src/_cjs/utils/datastructures/CircularIntervalSet.js +0 -163
  217. package/src/_cjs/utils/datastructures/CircularIntervalSet.js.map +0 -1
  218. package/src/_cjs/utils/datastructures/Color.d.ts +0 -391
  219. package/src/_cjs/utils/datastructures/Color.js +0 -1084
  220. package/src/_cjs/utils/datastructures/Color.js.map +0 -1
  221. package/src/_cjs/utils/datastructures/ColorGradient.d.ts +0 -81
  222. package/src/_cjs/utils/datastructures/ColorGradient.js +0 -176
  223. package/src/_cjs/utils/datastructures/ColorGradient.js.map +0 -1
  224. package/src/_cjs/utils/datastructures/DataGrid2d.d.ts +0 -53
  225. package/src/_cjs/utils/datastructures/DataGrid2d.js +0 -20
  226. package/src/_cjs/utils/datastructures/DataGrid2d.js.map +0 -1
  227. package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.d.ts +0 -88
  228. package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.js +0 -155
  229. package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.js.map +0 -1
  230. package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.d.ts +0 -59
  231. package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.js +0 -84
  232. package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.js.map +0 -1
  233. package/src/_cjs/utils/datastructures/GenericPath.d.ts +0 -86
  234. package/src/_cjs/utils/datastructures/GenericPath.js +0 -122
  235. package/src/_cjs/utils/datastructures/GenericPath.js.map +0 -1
  236. package/src/_cjs/utils/datastructures/GeometryMesh.d.ts +0 -49
  237. package/src/_cjs/utils/datastructures/GeometryMesh.js +0 -58
  238. package/src/_cjs/utils/datastructures/GeometryMesh.js.map +0 -1
  239. package/src/_cjs/utils/datastructures/Girih.d.ts +0 -181
  240. package/src/_cjs/utils/datastructures/Girih.js +0 -266
  241. package/src/_cjs/utils/datastructures/Girih.js.map +0 -1
  242. package/src/_cjs/utils/datastructures/GirihBowtie.d.ts +0 -37
  243. package/src/_cjs/utils/datastructures/GirihBowtie.js +0 -152
  244. package/src/_cjs/utils/datastructures/GirihBowtie.js.map +0 -1
  245. package/src/_cjs/utils/datastructures/GirihDecagon.d.ts +0 -52
  246. package/src/_cjs/utils/datastructures/GirihDecagon.js +0 -132
  247. package/src/_cjs/utils/datastructures/GirihDecagon.js.map +0 -1
  248. package/src/_cjs/utils/datastructures/GirihHexagon.d.ts +0 -39
  249. package/src/_cjs/utils/datastructures/GirihHexagon.js +0 -200
  250. package/src/_cjs/utils/datastructures/GirihHexagon.js.map +0 -1
  251. package/src/_cjs/utils/datastructures/GirihPenroseRhombus.d.ts +0 -46
  252. package/src/_cjs/utils/datastructures/GirihPenroseRhombus.js +0 -189
  253. package/src/_cjs/utils/datastructures/GirihPenroseRhombus.js.map +0 -1
  254. package/src/_cjs/utils/datastructures/GirihPentagon.d.ts +0 -37
  255. package/src/_cjs/utils/datastructures/GirihPentagon.js +0 -109
  256. package/src/_cjs/utils/datastructures/GirihPentagon.js.map +0 -1
  257. package/src/_cjs/utils/datastructures/GirihRhombus.d.ts +0 -38
  258. package/src/_cjs/utils/datastructures/GirihRhombus.js +0 -155
  259. package/src/_cjs/utils/datastructures/GirihRhombus.js.map +0 -1
  260. package/src/_cjs/utils/datastructures/GirihTile.d.ts +0 -283
  261. package/src/_cjs/utils/datastructures/GirihTile.js +0 -308
  262. package/src/_cjs/utils/datastructures/GirihTile.js.map +0 -1
  263. package/src/_cjs/utils/datastructures/Matrix4x4.d.ts +0 -244
  264. package/src/_cjs/utils/datastructures/Matrix4x4.js +0 -262
  265. package/src/_cjs/utils/datastructures/Matrix4x4.js.map +0 -1
  266. package/src/_cjs/utils/datastructures/VoronoiCell.d.ts +0 -122
  267. package/src/_cjs/utils/datastructures/VoronoiCell.js +0 -183
  268. package/src/_cjs/utils/datastructures/VoronoiCell.js.map +0 -1
  269. package/src/_cjs/utils/datastructures/interfaces.d.ts +0 -13
  270. package/src/_cjs/utils/datastructures/interfaces.js +0 -10
  271. package/src/_cjs/utils/datastructures/interfaces.js.map +0 -1
  272. package/src/_cjs/utils/detectDarkMode.d.ts +0 -10
  273. package/src/_cjs/utils/detectDarkMode.js +0 -41
  274. package/src/_cjs/utils/detectDarkMode.js.map +0 -1
  275. package/src/_cjs/utils/dom/components/ColorGradientPicker.d.ts +0 -246
  276. package/src/_cjs/utils/dom/components/ColorGradientPicker.js +0 -667
  277. package/src/_cjs/utils/dom/components/ColorGradientPicker.js.map +0 -1
  278. package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.d.ts +0 -129
  279. package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.js +0 -520
  280. package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.js.map +0 -1
  281. package/src/_cjs/utils/dom/components/ColorGradientSelector.d.ts +0 -118
  282. package/src/_cjs/utils/dom/components/ColorGradientSelector.js +0 -327
  283. package/src/_cjs/utils/dom/components/ColorGradientSelector.js.map +0 -1
  284. package/src/_cjs/utils/dom/components/Test.d.ts +0 -7
  285. package/src/_cjs/utils/dom/components/Test.js +0 -30
  286. package/src/_cjs/utils/dom/components/Test.js.map +0 -1
  287. package/src/_cjs/utils/dom/getAvailableContainerSpace.d.ts +0 -2
  288. package/src/_cjs/utils/dom/getAvailableContainerSpace.js +0 -29
  289. package/src/_cjs/utils/dom/getAvailableContainerSpace.js.map +0 -1
  290. package/src/_cjs/utils/dom/getFProp.d.ts +0 -5
  291. package/src/_cjs/utils/dom/getFProp.js +0 -12
  292. package/src/_cjs/utils/dom/getFProp.js.map +0 -1
  293. package/src/_cjs/utils/dom/guiSizeToggler.d.ts +0 -18
  294. package/src/_cjs/utils/dom/guiSizeToggler.js +0 -44
  295. package/src/_cjs/utils/dom/guiSizeToggler.js.map +0 -1
  296. package/src/_cjs/utils/findInVertexArray.d.ts +0 -19
  297. package/src/_cjs/utils/findInVertexArray.js +0 -29
  298. package/src/_cjs/utils/findInVertexArray.js.map +0 -1
  299. package/src/_cjs/utils/getFProp.d.ts +0 -5
  300. package/src/_cjs/utils/getFProp.js +0 -12
  301. package/src/_cjs/utils/getFProp.js.map +0 -1
  302. package/src/_cjs/utils/gup.d.ts +0 -14
  303. package/src/_cjs/utils/gup.js +0 -31
  304. package/src/_cjs/utils/gup.js.map +0 -1
  305. package/src/_cjs/utils/helpers/BezierPathInteractionHelper.d.ts +0 -272
  306. package/src/_cjs/utils/helpers/BezierPathInteractionHelper.js +0 -655
  307. package/src/_cjs/utils/helpers/BezierPathInteractionHelper.js.map +0 -1
  308. package/src/_cjs/utils/helpers/CircleHelper.d.ts +0 -73
  309. package/src/_cjs/utils/helpers/CircleHelper.js +0 -93
  310. package/src/_cjs/utils/helpers/CircleHelper.js.map +0 -1
  311. package/src/_cjs/utils/helpers/CircleSectorHelper.d.ts +0 -90
  312. package/src/_cjs/utils/helpers/CircleSectorHelper.js +0 -114
  313. package/src/_cjs/utils/helpers/CircleSectorHelper.js.map +0 -1
  314. package/src/_cjs/utils/helpers/TriangleHelper.d.ts +0 -57
  315. package/src/_cjs/utils/helpers/TriangleHelper.js +0 -83
  316. package/src/_cjs/utils/helpers/TriangleHelper.js.map +0 -1
  317. package/src/_cjs/utils/helpers/VEllipseHelper.d.ts +0 -32
  318. package/src/_cjs/utils/helpers/VEllipseHelper.js +0 -88
  319. package/src/_cjs/utils/helpers/VEllipseHelper.js.map +0 -1
  320. package/src/_cjs/utils/helpers/VEllipseSectorHelper.d.ts +0 -52
  321. package/src/_cjs/utils/helpers/VEllipseSectorHelper.js +0 -135
  322. package/src/_cjs/utils/helpers/VEllipseSectorHelper.js.map +0 -1
  323. package/src/_cjs/utils/io/DndFileHandler.d.ts +0 -63
  324. package/src/_cjs/utils/io/DndFileHandler.js +0 -112
  325. package/src/_cjs/utils/io/DndFileHandler.js.map +0 -1
  326. package/src/_cjs/utils/io/FileDrop.d.ts +0 -110
  327. package/src/_cjs/utils/io/FileDrop.js +0 -177
  328. package/src/_cjs/utils/io/FileDrop.js.map +0 -1
  329. package/src/_cjs/utils/lil.gui.arrowbounce.polyfill.js +0 -133
  330. package/src/_cjs/utils/lil.gui.title.polyfill.js +0 -32
  331. package/src/_cjs/utils/module.js +0 -18
  332. package/src/_cjs/utils/parsers/LinearColorGradientParser.d.ts +0 -78
  333. package/src/_cjs/utils/parsers/LinearColorGradientParser.js +0 -224
  334. package/src/_cjs/utils/parsers/LinearColorGradientParser.js.map +0 -1
  335. package/src/_cjs/utils/parsers/OBJParser.d.ts +0 -24
  336. package/src/_cjs/utils/parsers/OBJParser.js +0 -77
  337. package/src/_cjs/utils/parsers/OBJParser.js.map +0 -1
  338. package/src/_cjs/utils/parsers/STLParser.d.ts +0 -61
  339. package/src/_cjs/utils/parsers/STLParser.js +0 -182
  340. package/src/_cjs/utils/parsers/STLParser.js.map +0 -1
  341. package/src/_cjs/utils/parsers/svg/parseSVGPathData.d.ts +0 -27
  342. package/src/_cjs/utils/parsers/svg/parseSVGPathData.js +0 -486
  343. package/src/_cjs/utils/parsers/svg/parseSVGPathData.js.map +0 -1
  344. package/src/_cjs/utils/parsers/svg/splitSVGPathData.d.ts +0 -20
  345. package/src/_cjs/utils/parsers/svg/splitSVGPathData.js +0 -53
  346. package/src/_cjs/utils/parsers/svg/splitSVGPathData.js.map +0 -1
  347. package/src/_cjs/utils/parsers/svg/types.d.ts +0 -63
  348. package/src/_cjs/utils/parsers/svg/types.js +0 -17
  349. package/src/_cjs/utils/parsers/svg/types.js.map +0 -1
  350. package/src/_cjs/utils/ts-runner.js +0 -146
  351. package/src/_cjs/utils/tsAsyncScriptLoader.js +0 -74
  352. package/src/_esm/BezierPath.d.ts +0 -610
  353. package/src/_esm/BezierPath.js +0 -1124
  354. package/src/_esm/BezierPath.js.map +0 -1
  355. package/src/_esm/Bounds.d.ts +0 -252
  356. package/src/_esm/Bounds.js +0 -317
  357. package/src/_esm/Bounds.js.map +0 -1
  358. package/src/_esm/Circle.d.ts +0 -214
  359. package/src/_esm/Circle.js +0 -335
  360. package/src/_esm/Circle.js.map +0 -1
  361. package/src/_esm/CircleSector.d.ts +0 -211
  362. package/src/_esm/CircleSector.js +0 -359
  363. package/src/_esm/CircleSector.js.map +0 -1
  364. package/src/_esm/CubicBezierCurve.d.ts +0 -656
  365. package/src/_esm/CubicBezierCurve.js +0 -1057
  366. package/src/_esm/CubicBezierCurve.js.map +0 -1
  367. package/src/_esm/Grid.d.ts +0 -83
  368. package/src/_esm/Grid.js +0 -89
  369. package/src/_esm/Grid.js.map +0 -1
  370. package/src/_esm/KeyHandler.d.ts +0 -177
  371. package/src/_esm/KeyHandler.js +0 -434
  372. package/src/_esm/KeyHandler.js.map +0 -1
  373. package/src/_esm/Line.d.ts +0 -134
  374. package/src/_esm/Line.js +0 -200
  375. package/src/_esm/Line.js.map +0 -1
  376. package/src/_esm/MouseHandler.d.ts +0 -283
  377. package/src/_esm/MouseHandler.js +0 -397
  378. package/src/_esm/MouseHandler.js.map +0 -1
  379. package/src/_esm/PBImage.d.ts +0 -81
  380. package/src/_esm/PBImage.js +0 -60
  381. package/src/_esm/PBImage.js.map +0 -1
  382. package/src/_esm/PBText.d.ts +0 -118
  383. package/src/_esm/PBText.js +0 -62
  384. package/src/_esm/PBText.js.map +0 -1
  385. package/src/_esm/PlotBoilerplate.d.ts +0 -899
  386. package/src/_esm/PlotBoilerplate.js +0 -2347
  387. package/src/_esm/PlotBoilerplate.js.map +0 -1
  388. package/src/_esm/Polygon.d.ts +0 -520
  389. package/src/_esm/Polygon.js +0 -924
  390. package/src/_esm/Polygon.js.map +0 -1
  391. package/src/_esm/SVGBuilder.d.ts +0 -47
  392. package/src/_esm/SVGBuilder.js +0 -95
  393. package/src/_esm/SVGBuilder.js.map +0 -1
  394. package/src/_esm/Triangle.d.ts +0 -392
  395. package/src/_esm/Triangle.js +0 -493
  396. package/src/_esm/Triangle.js.map +0 -1
  397. package/src/_esm/UIDGenerator.d.ts +0 -12
  398. package/src/_esm/UIDGenerator.js +0 -18
  399. package/src/_esm/UIDGenerator.js.map +0 -1
  400. package/src/_esm/VEllipse.d.ts +0 -319
  401. package/src/_esm/VEllipse.js +0 -574
  402. package/src/_esm/VEllipse.js.map +0 -1
  403. package/src/_esm/VEllipseSector.d.ts +0 -230
  404. package/src/_esm/VEllipseSector.js +0 -422
  405. package/src/_esm/VEllipseSector.js.map +0 -1
  406. package/src/_esm/Vector.d.ts +0 -126
  407. package/src/_esm/Vector.js +0 -181
  408. package/src/_esm/Vector.js.map +0 -1
  409. package/src/_esm/VertTuple.d.ts +0 -284
  410. package/src/_esm/VertTuple.js +0 -347
  411. package/src/_esm/VertTuple.js.map +0 -1
  412. package/src/_esm/Vertex.d.ts +0 -498
  413. package/src/_esm/Vertex.js +0 -702
  414. package/src/_esm/Vertex.js.map +0 -1
  415. package/src/_esm/VertexAttr.d.ts +0 -72
  416. package/src/_esm/VertexAttr.js +0 -58
  417. package/src/_esm/VertexAttr.js.map +0 -1
  418. package/src/_esm/VertexListeners.d.ts +0 -209
  419. package/src/_esm/VertexListeners.js +0 -270
  420. package/src/_esm/VertexListeners.js.map +0 -1
  421. package/src/_esm/draw.d.ts +0 -657
  422. package/src/_esm/draw.js +0 -1159
  423. package/src/_esm/draw.js.map +0 -1
  424. package/src/_esm/drawgl.d.ts +0 -544
  425. package/src/_esm/drawgl.js +0 -812
  426. package/src/_esm/drawgl.js.map +0 -1
  427. package/src/_esm/drawutilssvg.d.ts +0 -954
  428. package/src/_esm/drawutilssvg.js +0 -1705
  429. package/src/_esm/drawutilssvg.js.map +0 -1
  430. package/src/_esm/entry-glsupport.js +0 -28
  431. package/src/_esm/entry.js +0 -29
  432. package/src/_esm/geomutils.d.ts +0 -77
  433. package/src/_esm/geomutils.js +0 -126
  434. package/src/_esm/geomutils.js.map +0 -1
  435. package/src/_esm/index.d.ts +0 -102
  436. package/src/_esm/index.js +0 -128
  437. package/src/_esm/index.js.map +0 -1
  438. package/src/_esm/interfaces/DrawLib.d.ts +0 -582
  439. package/src/_esm/interfaces/DrawLib.js +0 -32
  440. package/src/_esm/interfaces/DrawLib.js.map +0 -1
  441. package/src/_esm/interfaces/additionals.d.ts +0 -95
  442. package/src/_esm/interfaces/additionals.js +0 -3
  443. package/src/_esm/interfaces/additionals.js.map +0 -1
  444. package/src/_esm/interfaces/core.d.ts +0 -286
  445. package/src/_esm/interfaces/core.js +0 -30
  446. package/src/_esm/interfaces/core.js.map +0 -1
  447. package/src/_esm/interfaces/externals.d.ts +0 -56
  448. package/src/_esm/interfaces/externals.js +0 -8
  449. package/src/_esm/interfaces/externals.js.map +0 -1
  450. package/src/_esm/interfaces/index.d.ts +0 -4
  451. package/src/_esm/interfaces/index.js +0 -21
  452. package/src/_esm/interfaces/index.js.map +0 -1
  453. package/src/_esm/module.d.ts +0 -26
  454. package/src/_esm/module.js +0 -60
  455. package/src/_esm/module.js.map +0 -1
  456. package/src/_esm/src/ts/BezierPath.d.ts +0 -610
  457. package/src/_esm/src/ts/BezierPath.js +0 -1120
  458. package/src/_esm/src/ts/BezierPath.js.map +0 -1
  459. package/src/_esm/src/ts/Bounds.d.ts +0 -252
  460. package/src/_esm/src/ts/Bounds.js +0 -313
  461. package/src/_esm/src/ts/Bounds.js.map +0 -1
  462. package/src/_esm/src/ts/Circle.d.ts +0 -214
  463. package/src/_esm/src/ts/Circle.js +0 -331
  464. package/src/_esm/src/ts/Circle.js.map +0 -1
  465. package/src/_esm/src/ts/CircleSector.d.ts +0 -211
  466. package/src/_esm/src/ts/CircleSector.js +0 -355
  467. package/src/_esm/src/ts/CircleSector.js.map +0 -1
  468. package/src/_esm/src/ts/CubicBezierCurve.d.ts +0 -656
  469. package/src/_esm/src/ts/CubicBezierCurve.js +0 -1053
  470. package/src/_esm/src/ts/CubicBezierCurve.js.map +0 -1
  471. package/src/_esm/src/ts/Grid.d.ts +0 -83
  472. package/src/_esm/src/ts/Grid.js +0 -85
  473. package/src/_esm/src/ts/Grid.js.map +0 -1
  474. package/src/_esm/src/ts/KeyHandler.d.ts +0 -177
  475. package/src/_esm/src/ts/KeyHandler.js +0 -430
  476. package/src/_esm/src/ts/KeyHandler.js.map +0 -1
  477. package/src/_esm/src/ts/Line.d.ts +0 -134
  478. package/src/_esm/src/ts/Line.js +0 -196
  479. package/src/_esm/src/ts/Line.js.map +0 -1
  480. package/src/_esm/src/ts/MouseHandler.d.ts +0 -283
  481. package/src/_esm/src/ts/MouseHandler.js +0 -391
  482. package/src/_esm/src/ts/MouseHandler.js.map +0 -1
  483. package/src/_esm/src/ts/PBImage.d.ts +0 -81
  484. package/src/_esm/src/ts/PBImage.js +0 -56
  485. package/src/_esm/src/ts/PBImage.js.map +0 -1
  486. package/src/_esm/src/ts/PBText.d.ts +0 -118
  487. package/src/_esm/src/ts/PBText.js +0 -58
  488. package/src/_esm/src/ts/PBText.js.map +0 -1
  489. package/src/_esm/src/ts/PlotBoilerplate.d.ts +0 -899
  490. package/src/_esm/src/ts/PlotBoilerplate.js +0 -2340
  491. package/src/_esm/src/ts/PlotBoilerplate.js.map +0 -1
  492. package/src/_esm/src/ts/Polygon.d.ts +0 -520
  493. package/src/_esm/src/ts/Polygon.js +0 -920
  494. package/src/_esm/src/ts/Polygon.js.map +0 -1
  495. package/src/_esm/src/ts/Triangle.d.ts +0 -392
  496. package/src/_esm/src/ts/Triangle.js +0 -489
  497. package/src/_esm/src/ts/Triangle.js.map +0 -1
  498. package/src/_esm/src/ts/UIDGenerator.d.ts +0 -12
  499. package/src/_esm/src/ts/UIDGenerator.js +0 -14
  500. package/src/_esm/src/ts/UIDGenerator.js.map +0 -1
  501. package/src/_esm/src/ts/VEllipse.d.ts +0 -319
  502. package/src/_esm/src/ts/VEllipse.js +0 -570
  503. package/src/_esm/src/ts/VEllipse.js.map +0 -1
  504. package/src/_esm/src/ts/VEllipseSector.d.ts +0 -230
  505. package/src/_esm/src/ts/VEllipseSector.js +0 -418
  506. package/src/_esm/src/ts/VEllipseSector.js.map +0 -1
  507. package/src/_esm/src/ts/Vector.d.ts +0 -126
  508. package/src/_esm/src/ts/Vector.js +0 -177
  509. package/src/_esm/src/ts/Vector.js.map +0 -1
  510. package/src/_esm/src/ts/VertTuple.d.ts +0 -284
  511. package/src/_esm/src/ts/VertTuple.js +0 -343
  512. package/src/_esm/src/ts/VertTuple.js.map +0 -1
  513. package/src/_esm/src/ts/Vertex.d.ts +0 -498
  514. package/src/_esm/src/ts/Vertex.js +0 -698
  515. package/src/_esm/src/ts/Vertex.js.map +0 -1
  516. package/src/_esm/src/ts/VertexAttr.d.ts +0 -72
  517. package/src/_esm/src/ts/VertexAttr.js +0 -54
  518. package/src/_esm/src/ts/VertexAttr.js.map +0 -1
  519. package/src/_esm/src/ts/VertexListeners.d.ts +0 -209
  520. package/src/_esm/src/ts/VertexListeners.js +0 -266
  521. package/src/_esm/src/ts/VertexListeners.js.map +0 -1
  522. package/src/_esm/src/ts/draw.d.ts +0 -657
  523. package/src/_esm/src/ts/draw.js +0 -1155
  524. package/src/_esm/src/ts/draw.js.map +0 -1
  525. package/src/_esm/src/ts/drawgl.d.ts +0 -544
  526. package/src/_esm/src/ts/drawgl.js +0 -808
  527. package/src/_esm/src/ts/drawgl.js.map +0 -1
  528. package/src/_esm/src/ts/drawutilssvg.d.ts +0 -954
  529. package/src/_esm/src/ts/drawutilssvg.js +0 -1701
  530. package/src/_esm/src/ts/drawutilssvg.js.map +0 -1
  531. package/src/_esm/src/ts/geomutils.d.ts +0 -77
  532. package/src/_esm/src/ts/geomutils.js +0 -123
  533. package/src/_esm/src/ts/geomutils.js.map +0 -1
  534. package/src/_esm/src/ts/index.d.ts +0 -102
  535. package/src/_esm/src/ts/index.js +0 -112
  536. package/src/_esm/src/ts/index.js.map +0 -1
  537. package/src/_esm/src/ts/interfaces/DrawLib.d.ts +0 -582
  538. package/src/_esm/src/ts/interfaces/DrawLib.js +0 -31
  539. package/src/_esm/src/ts/interfaces/DrawLib.js.map +0 -1
  540. package/src/_esm/src/ts/interfaces/additionals.d.ts +0 -95
  541. package/src/_esm/src/ts/interfaces/additionals.js +0 -2
  542. package/src/_esm/src/ts/interfaces/additionals.js.map +0 -1
  543. package/src/_esm/src/ts/interfaces/core.d.ts +0 -286
  544. package/src/_esm/src/ts/interfaces/core.js +0 -29
  545. package/src/_esm/src/ts/interfaces/core.js.map +0 -1
  546. package/src/_esm/src/ts/interfaces/externals.d.ts +0 -56
  547. package/src/_esm/src/ts/interfaces/externals.js +0 -7
  548. package/src/_esm/src/ts/interfaces/externals.js.map +0 -1
  549. package/src/_esm/src/ts/interfaces/index.d.ts +0 -4
  550. package/src/_esm/src/ts/interfaces/index.js +0 -5
  551. package/src/_esm/src/ts/interfaces/index.js.map +0 -1
  552. package/src/_esm/src/ts/module.d.ts +0 -26
  553. package/src/_esm/src/ts/module.js +0 -38
  554. package/src/_esm/src/ts/module.js.map +0 -1
  555. package/src/_esm/src/ts/utils/InitializationObserver.d.ts +0 -18
  556. package/src/_esm/src/ts/utils/InitializationObserver.js +0 -57
  557. package/src/_esm/src/ts/utils/InitializationObserver.js.map +0 -1
  558. package/src/_esm/src/ts/utils/LissajousFigure.d.ts +0 -34
  559. package/src/_esm/src/ts/utils/LissajousFigure.js +0 -95
  560. package/src/_esm/src/ts/utils/LissajousFigure.js.map +0 -1
  561. package/src/_esm/src/ts/utils/NGons.d.ts +0 -13
  562. package/src/_esm/src/ts/utils/NGons.js +0 -33
  563. package/src/_esm/src/ts/utils/NGons.js.map +0 -1
  564. package/src/_esm/src/ts/utils/Params.d.ts +0 -17
  565. package/src/_esm/src/ts/utils/Params.js +0 -48
  566. package/src/_esm/src/ts/utils/Params.js.map +0 -1
  567. package/src/_esm/src/ts/utils/PerlinNoise.d.ts +0 -19
  568. package/src/_esm/src/ts/utils/PerlinNoise.js +0 -346
  569. package/src/_esm/src/ts/utils/PerlinNoise.js.map +0 -1
  570. package/src/_esm/src/ts/utils/SVGPathUtils.d.ts +0 -22
  571. package/src/_esm/src/ts/utils/SVGPathUtils.js +0 -42
  572. package/src/_esm/src/ts/utils/SVGPathUtils.js.map +0 -1
  573. package/src/_esm/src/ts/utils/WebColors.d.ts +0 -35
  574. package/src/_esm/src/ts/utils/WebColors.js +0 -54
  575. package/src/_esm/src/ts/utils/WebColors.js.map +0 -1
  576. package/src/_esm/src/ts/utils/WebColorsContrast.d.ts +0 -6
  577. package/src/_esm/src/ts/utils/WebColorsContrast.js +0 -9
  578. package/src/_esm/src/ts/utils/WebColorsContrast.js.map +0 -1
  579. package/src/_esm/src/ts/utils/WebColorsMalachite.d.ts +0 -12
  580. package/src/_esm/src/ts/utils/WebColorsMalachite.js +0 -25
  581. package/src/_esm/src/ts/utils/WebColorsMalachite.js.map +0 -1
  582. package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.d.ts +0 -60
  583. package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.js +0 -103
  584. package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.js.map +0 -1
  585. package/src/_esm/src/ts/utils/algorithms/CircleIntersections.d.ts +0 -170
  586. package/src/_esm/src/ts/utils/algorithms/CircleIntersections.js +0 -303
  587. package/src/_esm/src/ts/utils/algorithms/CircleIntersections.js.map +0 -1
  588. package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.d.ts +0 -150
  589. package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.js +0 -362
  590. package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.js.map +0 -1
  591. package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.d.ts +0 -63
  592. package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.js +0 -170
  593. package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.js.map +0 -1
  594. package/src/_esm/src/ts/utils/algorithms/HobbyPath.d.ts +0 -81
  595. package/src/_esm/src/ts/utils/algorithms/HobbyPath.js +0 -273
  596. package/src/_esm/src/ts/utils/algorithms/HobbyPath.js.map +0 -1
  597. package/src/_esm/src/ts/utils/algorithms/Metaballs.d.ts +0 -30
  598. package/src/_esm/src/ts/utils/algorithms/Metaballs.js +0 -109
  599. package/src/_esm/src/ts/utils/algorithms/Metaballs.js.map +0 -1
  600. package/src/_esm/src/ts/utils/algorithms/PolygonInset.d.ts +0 -184
  601. package/src/_esm/src/ts/utils/algorithms/PolygonInset.js +0 -424
  602. package/src/_esm/src/ts/utils/algorithms/PolygonInset.js.map +0 -1
  603. package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.d.ts +0 -145
  604. package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.js +0 -262
  605. package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.js.map +0 -1
  606. package/src/_esm/src/ts/utils/algorithms/arrayFill.d.ts +0 -8
  607. package/src/_esm/src/ts/utils/algorithms/arrayFill.js +0 -14
  608. package/src/_esm/src/ts/utils/algorithms/arrayFill.js.map +0 -1
  609. package/src/_esm/src/ts/utils/algorithms/arrayResize.d.ts +0 -8
  610. package/src/_esm/src/ts/utils/algorithms/arrayResize.js +0 -20
  611. package/src/_esm/src/ts/utils/algorithms/arrayResize.js.map +0 -1
  612. package/src/_esm/src/ts/utils/algorithms/arrayShuffle.d.ts +0 -8
  613. package/src/_esm/src/ts/utils/algorithms/arrayShuffle.js +0 -11
  614. package/src/_esm/src/ts/utils/algorithms/arrayShuffle.js.map +0 -1
  615. package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.d.ts +0 -22
  616. package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.js +0 -47
  617. package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.js.map +0 -1
  618. package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.d.ts +0 -24
  619. package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.js +0 -57
  620. package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.js.map +0 -1
  621. package/src/_esm/src/ts/utils/algorithms/convexHull.d.ts +0 -23
  622. package/src/_esm/src/ts/utils/algorithms/convexHull.js +0 -67
  623. package/src/_esm/src/ts/utils/algorithms/convexHull.js.map +0 -1
  624. package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.d.ts +0 -41
  625. package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.js +0 -141
  626. package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.js.map +0 -1
  627. package/src/_esm/src/ts/utils/algorithms/delaunay.d.ts +0 -30
  628. package/src/_esm/src/ts/utils/algorithms/delaunay.js +0 -153
  629. package/src/_esm/src/ts/utils/algorithms/delaunay.js.map +0 -1
  630. package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.d.ts +0 -25
  631. package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.js +0 -99
  632. package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.js.map +0 -1
  633. package/src/_esm/src/ts/utils/algorithms/detectPaths.d.ts +0 -21
  634. package/src/_esm/src/ts/utils/algorithms/detectPaths.js +0 -165
  635. package/src/_esm/src/ts/utils/algorithms/detectPaths.js.map +0 -1
  636. package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.d.ts +0 -21
  637. package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.js +0 -47
  638. package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.js.map +0 -1
  639. package/src/_esm/src/ts/utils/algorithms/getContrastColor.d.ts +0 -13
  640. package/src/_esm/src/ts/utils/algorithms/getContrastColor.js +0 -22
  641. package/src/_esm/src/ts/utils/algorithms/getContrastColor.js.map +0 -1
  642. package/src/_esm/src/ts/utils/algorithms/matrixFill.d.ts +0 -10
  643. package/src/_esm/src/ts/utils/algorithms/matrixFill.js +0 -17
  644. package/src/_esm/src/ts/utils/algorithms/matrixFill.js.map +0 -1
  645. package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.d.ts +0 -23
  646. package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.js +0 -266
  647. package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.js.map +0 -1
  648. package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.d.ts +0 -28
  649. package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.js +0 -99
  650. package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.js.map +0 -1
  651. package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.d.ts +0 -16
  652. package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.js +0 -72
  653. package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.js.map +0 -1
  654. package/src/_esm/src/ts/utils/cloneVertexArray.d.ts +0 -13
  655. package/src/_esm/src/ts/utils/cloneVertexArray.js +0 -19
  656. package/src/_esm/src/ts/utils/cloneVertexArray.js.map +0 -1
  657. package/src/_esm/src/ts/utils/createRandomizedPolygon.d.ts +0 -14
  658. package/src/_esm/src/ts/utils/createRandomizedPolygon.js +0 -28
  659. package/src/_esm/src/ts/utils/createRandomizedPolygon.js.map +0 -1
  660. package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.d.ts +0 -83
  661. package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.js +0 -158
  662. package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.js.map +0 -1
  663. package/src/_esm/src/ts/utils/datastructures/Color.d.ts +0 -391
  664. package/src/_esm/src/ts/utils/datastructures/Color.js +0 -1063
  665. package/src/_esm/src/ts/utils/datastructures/Color.js.map +0 -1
  666. package/src/_esm/src/ts/utils/datastructures/ColorGradient.d.ts +0 -81
  667. package/src/_esm/src/ts/utils/datastructures/ColorGradient.js +0 -171
  668. package/src/_esm/src/ts/utils/datastructures/ColorGradient.js.map +0 -1
  669. package/src/_esm/src/ts/utils/datastructures/DataGrid2d.d.ts +0 -53
  670. package/src/_esm/src/ts/utils/datastructures/DataGrid2d.js +0 -19
  671. package/src/_esm/src/ts/utils/datastructures/DataGrid2d.js.map +0 -1
  672. package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.d.ts +0 -88
  673. package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.js +0 -150
  674. package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.js.map +0 -1
  675. package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.d.ts +0 -59
  676. package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.js +0 -79
  677. package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.js.map +0 -1
  678. package/src/_esm/src/ts/utils/datastructures/GenericPath.d.ts +0 -86
  679. package/src/_esm/src/ts/utils/datastructures/GenericPath.js +0 -117
  680. package/src/_esm/src/ts/utils/datastructures/GenericPath.js.map +0 -1
  681. package/src/_esm/src/ts/utils/datastructures/GeometryMesh.d.ts +0 -49
  682. package/src/_esm/src/ts/utils/datastructures/GeometryMesh.js +0 -53
  683. package/src/_esm/src/ts/utils/datastructures/GeometryMesh.js.map +0 -1
  684. package/src/_esm/src/ts/utils/datastructures/Girih.d.ts +0 -181
  685. package/src/_esm/src/ts/utils/datastructures/Girih.js +0 -261
  686. package/src/_esm/src/ts/utils/datastructures/Girih.js.map +0 -1
  687. package/src/_esm/src/ts/utils/datastructures/GirihBowtie.d.ts +0 -37
  688. package/src/_esm/src/ts/utils/datastructures/GirihBowtie.js +0 -130
  689. package/src/_esm/src/ts/utils/datastructures/GirihBowtie.js.map +0 -1
  690. package/src/_esm/src/ts/utils/datastructures/GirihDecagon.d.ts +0 -52
  691. package/src/_esm/src/ts/utils/datastructures/GirihDecagon.js +0 -110
  692. package/src/_esm/src/ts/utils/datastructures/GirihDecagon.js.map +0 -1
  693. package/src/_esm/src/ts/utils/datastructures/GirihHexagon.d.ts +0 -39
  694. package/src/_esm/src/ts/utils/datastructures/GirihHexagon.js +0 -178
  695. package/src/_esm/src/ts/utils/datastructures/GirihHexagon.js.map +0 -1
  696. package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.d.ts +0 -46
  697. package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.js +0 -167
  698. package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.js.map +0 -1
  699. package/src/_esm/src/ts/utils/datastructures/GirihPentagon.d.ts +0 -37
  700. package/src/_esm/src/ts/utils/datastructures/GirihPentagon.js +0 -87
  701. package/src/_esm/src/ts/utils/datastructures/GirihPentagon.js.map +0 -1
  702. package/src/_esm/src/ts/utils/datastructures/GirihRhombus.d.ts +0 -38
  703. package/src/_esm/src/ts/utils/datastructures/GirihRhombus.js +0 -133
  704. package/src/_esm/src/ts/utils/datastructures/GirihRhombus.js.map +0 -1
  705. package/src/_esm/src/ts/utils/datastructures/GirihTile.d.ts +0 -283
  706. package/src/_esm/src/ts/utils/datastructures/GirihTile.js +0 -286
  707. package/src/_esm/src/ts/utils/datastructures/GirihTile.js.map +0 -1
  708. package/src/_esm/src/ts/utils/datastructures/Matrix4x4.d.ts +0 -244
  709. package/src/_esm/src/ts/utils/datastructures/Matrix4x4.js +0 -246
  710. package/src/_esm/src/ts/utils/datastructures/Matrix4x4.js.map +0 -1
  711. package/src/_esm/src/ts/utils/datastructures/VoronoiCell.d.ts +0 -122
  712. package/src/_esm/src/ts/utils/datastructures/VoronoiCell.js +0 -178
  713. package/src/_esm/src/ts/utils/datastructures/VoronoiCell.js.map +0 -1
  714. package/src/_esm/src/ts/utils/datastructures/interfaces.d.ts +0 -13
  715. package/src/_esm/src/ts/utils/datastructures/interfaces.js +0 -9
  716. package/src/_esm/src/ts/utils/datastructures/interfaces.js.map +0 -1
  717. package/src/_esm/src/ts/utils/detectDarkMode.d.ts +0 -10
  718. package/src/_esm/src/ts/utils/detectDarkMode.js +0 -37
  719. package/src/_esm/src/ts/utils/detectDarkMode.js.map +0 -1
  720. package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.d.ts +0 -246
  721. package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.js +0 -743
  722. package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.js.map +0 -1
  723. package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.d.ts +0 -118
  724. package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.js +0 -339
  725. package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.js.map +0 -1
  726. package/src/_esm/src/ts/utils/dom/components/Test.d.ts +0 -7
  727. package/src/_esm/src/ts/utils/dom/components/Test.js +0 -26
  728. package/src/_esm/src/ts/utils/dom/components/Test.js.map +0 -1
  729. package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.d.ts +0 -2
  730. package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.js +0 -25
  731. package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.js.map +0 -1
  732. package/src/_esm/src/ts/utils/dom/getFProp.d.ts +0 -5
  733. package/src/_esm/src/ts/utils/dom/getFProp.js +0 -8
  734. package/src/_esm/src/ts/utils/dom/getFProp.js.map +0 -1
  735. package/src/_esm/src/ts/utils/dom/guiSizeToggler.d.ts +0 -18
  736. package/src/_esm/src/ts/utils/dom/guiSizeToggler.js +0 -40
  737. package/src/_esm/src/ts/utils/dom/guiSizeToggler.js.map +0 -1
  738. package/src/_esm/src/ts/utils/findInVertexArray.d.ts +0 -19
  739. package/src/_esm/src/ts/utils/findInVertexArray.js +0 -25
  740. package/src/_esm/src/ts/utils/findInVertexArray.js.map +0 -1
  741. package/src/_esm/src/ts/utils/gup.d.ts +0 -14
  742. package/src/_esm/src/ts/utils/gup.js +0 -27
  743. package/src/_esm/src/ts/utils/gup.js.map +0 -1
  744. package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.d.ts +0 -272
  745. package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.js +0 -648
  746. package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.js.map +0 -1
  747. package/src/_esm/src/ts/utils/helpers/CircleHelper.d.ts +0 -73
  748. package/src/_esm/src/ts/utils/helpers/CircleHelper.js +0 -88
  749. package/src/_esm/src/ts/utils/helpers/CircleHelper.js.map +0 -1
  750. package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.d.ts +0 -90
  751. package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.js +0 -109
  752. package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.js.map +0 -1
  753. package/src/_esm/src/ts/utils/helpers/TriangleHelper.d.ts +0 -57
  754. package/src/_esm/src/ts/utils/helpers/TriangleHelper.js +0 -78
  755. package/src/_esm/src/ts/utils/helpers/TriangleHelper.js.map +0 -1
  756. package/src/_esm/src/ts/utils/helpers/VEllipseHelper.d.ts +0 -32
  757. package/src/_esm/src/ts/utils/helpers/VEllipseHelper.js +0 -83
  758. package/src/_esm/src/ts/utils/helpers/VEllipseHelper.js.map +0 -1
  759. package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.d.ts +0 -52
  760. package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.js +0 -130
  761. package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.js.map +0 -1
  762. package/src/_esm/src/ts/utils/io/FileDrop.d.ts +0 -110
  763. package/src/_esm/src/ts/utils/io/FileDrop.js +0 -171
  764. package/src/_esm/src/ts/utils/io/FileDrop.js.map +0 -1
  765. package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.d.ts +0 -78
  766. package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.js +0 -217
  767. package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.js.map +0 -1
  768. package/src/_esm/src/ts/utils/parsers/OBJParser.d.ts +0 -24
  769. package/src/_esm/src/ts/utils/parsers/OBJParser.js +0 -72
  770. package/src/_esm/src/ts/utils/parsers/OBJParser.js.map +0 -1
  771. package/src/_esm/src/ts/utils/parsers/STLParser.d.ts +0 -61
  772. package/src/_esm/src/ts/utils/parsers/STLParser.js +0 -175
  773. package/src/_esm/src/ts/utils/parsers/STLParser.js.map +0 -1
  774. package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.d.ts +0 -27
  775. package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.js +0 -482
  776. package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.js.map +0 -1
  777. package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.d.ts +0 -20
  778. package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.js +0 -49
  779. package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.js.map +0 -1
  780. package/src/_esm/src/ts/utils/parsers/svg/types.d.ts +0 -63
  781. package/src/_esm/src/ts/utils/parsers/svg/types.js +0 -16
  782. package/src/_esm/src/ts/utils/parsers/svg/types.js.map +0 -1
  783. package/src/_esm/utils/InitializationObserver.d.ts +0 -18
  784. package/src/_esm/utils/InitializationObserver.js +0 -61
  785. package/src/_esm/utils/InitializationObserver.js.map +0 -1
  786. package/src/_esm/utils/LissajousFigure.d.ts +0 -34
  787. package/src/_esm/utils/LissajousFigure.js +0 -99
  788. package/src/_esm/utils/LissajousFigure.js.map +0 -1
  789. package/src/_esm/utils/NGons.d.ts +0 -13
  790. package/src/_esm/utils/NGons.js +0 -36
  791. package/src/_esm/utils/NGons.js.map +0 -1
  792. package/src/_esm/utils/Params.d.ts +0 -17
  793. package/src/_esm/utils/Params.js +0 -52
  794. package/src/_esm/utils/Params.js.map +0 -1
  795. package/src/_esm/utils/PerlinNoise.d.ts +0 -19
  796. package/src/_esm/utils/PerlinNoise.js +0 -350
  797. package/src/_esm/utils/PerlinNoise.js.map +0 -1
  798. package/src/_esm/utils/SVGPathUtils.d.ts +0 -22
  799. package/src/_esm/utils/SVGPathUtils.js +0 -45
  800. package/src/_esm/utils/SVGPathUtils.js.map +0 -1
  801. package/src/_esm/utils/WebColors.d.ts +0 -35
  802. package/src/_esm/utils/WebColors.js +0 -58
  803. package/src/_esm/utils/WebColors.js.map +0 -1
  804. package/src/_esm/utils/WebColorsContrast.d.ts +0 -6
  805. package/src/_esm/utils/WebColorsContrast.js +0 -12
  806. package/src/_esm/utils/WebColorsContrast.js.map +0 -1
  807. package/src/_esm/utils/WebColorsMalachite.d.ts +0 -12
  808. package/src/_esm/utils/WebColorsMalachite.js +0 -28
  809. package/src/_esm/utils/WebColorsMalachite.js.map +0 -1
  810. package/src/_esm/utils/algorithms/CatmullRomPath.d.ts +0 -60
  811. package/src/_esm/utils/algorithms/CatmullRomPath.js +0 -107
  812. package/src/_esm/utils/algorithms/CatmullRomPath.js.map +0 -1
  813. package/src/_esm/utils/algorithms/CircleIntersections.d.ts +0 -170
  814. package/src/_esm/utils/algorithms/CircleIntersections.js +0 -307
  815. package/src/_esm/utils/algorithms/CircleIntersections.js.map +0 -1
  816. package/src/_esm/utils/algorithms/ContourLineDetection.d.ts +0 -150
  817. package/src/_esm/utils/algorithms/ContourLineDetection.js +0 -366
  818. package/src/_esm/utils/algorithms/ContourLineDetection.js.map +0 -1
  819. package/src/_esm/utils/algorithms/CubicSplinePath.d.ts +0 -63
  820. package/src/_esm/utils/algorithms/CubicSplinePath.js +0 -174
  821. package/src/_esm/utils/algorithms/CubicSplinePath.js.map +0 -1
  822. package/src/_esm/utils/algorithms/HobbyPath.d.ts +0 -81
  823. package/src/_esm/utils/algorithms/HobbyPath.js +0 -277
  824. package/src/_esm/utils/algorithms/HobbyPath.js.map +0 -1
  825. package/src/_esm/utils/algorithms/Metaballs.d.ts +0 -30
  826. package/src/_esm/utils/algorithms/Metaballs.js +0 -113
  827. package/src/_esm/utils/algorithms/Metaballs.js.map +0 -1
  828. package/src/_esm/utils/algorithms/PolygonInset.d.ts +0 -184
  829. package/src/_esm/utils/algorithms/PolygonInset.js +0 -428
  830. package/src/_esm/utils/algorithms/PolygonInset.js.map +0 -1
  831. package/src/_esm/utils/algorithms/PolygonTesselationOutlines.d.ts +0 -145
  832. package/src/_esm/utils/algorithms/PolygonTesselationOutlines.js +0 -267
  833. package/src/_esm/utils/algorithms/PolygonTesselationOutlines.js.map +0 -1
  834. package/src/_esm/utils/algorithms/arrayFill.d.ts +0 -8
  835. package/src/_esm/utils/algorithms/arrayFill.js +0 -18
  836. package/src/_esm/utils/algorithms/arrayFill.js.map +0 -1
  837. package/src/_esm/utils/algorithms/arrayResize.d.ts +0 -8
  838. package/src/_esm/utils/algorithms/arrayResize.js +0 -24
  839. package/src/_esm/utils/algorithms/arrayResize.js.map +0 -1
  840. package/src/_esm/utils/algorithms/arrayShuffle.d.ts +0 -8
  841. package/src/_esm/utils/algorithms/arrayShuffle.js +0 -15
  842. package/src/_esm/utils/algorithms/arrayShuffle.js.map +0 -1
  843. package/src/_esm/utils/algorithms/clearDuplicateVertices.d.ts +0 -22
  844. package/src/_esm/utils/algorithms/clearDuplicateVertices.js +0 -51
  845. package/src/_esm/utils/algorithms/clearDuplicateVertices.js.map +0 -1
  846. package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.d.ts +0 -24
  847. package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.js +0 -61
  848. package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.js.map +0 -1
  849. package/src/_esm/utils/algorithms/convexHull.d.ts +0 -23
  850. package/src/_esm/utils/algorithms/convexHull.js +0 -71
  851. package/src/_esm/utils/algorithms/convexHull.js.map +0 -1
  852. package/src/_esm/utils/algorithms/convexPolygonIncircle.d.ts +0 -41
  853. package/src/_esm/utils/algorithms/convexPolygonIncircle.js +0 -145
  854. package/src/_esm/utils/algorithms/convexPolygonIncircle.js.map +0 -1
  855. package/src/_esm/utils/algorithms/createRandomizedPolygon.d.ts +0 -14
  856. package/src/_esm/utils/algorithms/createRandomizedPolygon.js +0 -28
  857. package/src/_esm/utils/algorithms/createRandomizedPolygon.js.map +0 -1
  858. package/src/_esm/utils/algorithms/delaunay.d.ts +0 -30
  859. package/src/_esm/utils/algorithms/delaunay.js +0 -157
  860. package/src/_esm/utils/algorithms/delaunay.js.map +0 -1
  861. package/src/_esm/utils/algorithms/delaunay2voronoi.d.ts +0 -25
  862. package/src/_esm/utils/algorithms/delaunay2voronoi.js +0 -103
  863. package/src/_esm/utils/algorithms/delaunay2voronoi.js.map +0 -1
  864. package/src/_esm/utils/algorithms/detectPaths.d.ts +0 -21
  865. package/src/_esm/utils/algorithms/detectPaths.js +0 -169
  866. package/src/_esm/utils/algorithms/detectPaths.js.map +0 -1
  867. package/src/_esm/utils/algorithms/findPolygonSelfIntersections.d.ts +0 -21
  868. package/src/_esm/utils/algorithms/findPolygonSelfIntersections.js +0 -51
  869. package/src/_esm/utils/algorithms/findPolygonSelfIntersections.js.map +0 -1
  870. package/src/_esm/utils/algorithms/getContrastColor.d.ts +0 -13
  871. package/src/_esm/utils/algorithms/getContrastColor.js +0 -26
  872. package/src/_esm/utils/algorithms/getContrastColor.js.map +0 -1
  873. package/src/_esm/utils/algorithms/matrixFill.d.ts +0 -10
  874. package/src/_esm/utils/algorithms/matrixFill.js +0 -21
  875. package/src/_esm/utils/algorithms/matrixFill.js.map +0 -1
  876. package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.d.ts +0 -23
  877. package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.js +0 -270
  878. package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.js.map +0 -1
  879. package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.d.ts +0 -28
  880. package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.js +0 -102
  881. package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.js.map +0 -1
  882. package/src/_esm/utils/algorithms/sutherlandHodgman.d.ts +0 -16
  883. package/src/_esm/utils/algorithms/sutherlandHodgman.js +0 -76
  884. package/src/_esm/utils/algorithms/sutherlandHodgman.js.map +0 -1
  885. package/src/_esm/utils/cloneVertexArray.d.ts +0 -13
  886. package/src/_esm/utils/cloneVertexArray.js +0 -23
  887. package/src/_esm/utils/cloneVertexArray.js.map +0 -1
  888. package/src/_esm/utils/createRandomizedPolygon.d.ts +0 -14
  889. package/src/_esm/utils/createRandomizedPolygon.js +0 -32
  890. package/src/_esm/utils/createRandomizedPolygon.js.map +0 -1
  891. package/src/_esm/utils/datastructures/CircularIntervalSet.d.ts +0 -83
  892. package/src/_esm/utils/datastructures/CircularIntervalSet.js +0 -162
  893. package/src/_esm/utils/datastructures/CircularIntervalSet.js.map +0 -1
  894. package/src/_esm/utils/datastructures/Color.d.ts +0 -391
  895. package/src/_esm/utils/datastructures/Color.js +0 -1067
  896. package/src/_esm/utils/datastructures/Color.js.map +0 -1
  897. package/src/_esm/utils/datastructures/ColorGradient.d.ts +0 -81
  898. package/src/_esm/utils/datastructures/ColorGradient.js +0 -175
  899. package/src/_esm/utils/datastructures/ColorGradient.js.map +0 -1
  900. package/src/_esm/utils/datastructures/DataGrid2d.d.ts +0 -53
  901. package/src/_esm/utils/datastructures/DataGrid2d.js +0 -20
  902. package/src/_esm/utils/datastructures/DataGrid2d.js.map +0 -1
  903. package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.d.ts +0 -88
  904. package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.js +0 -154
  905. package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.js.map +0 -1
  906. package/src/_esm/utils/datastructures/DataGrid2dListAdapter.d.ts +0 -59
  907. package/src/_esm/utils/datastructures/DataGrid2dListAdapter.js +0 -83
  908. package/src/_esm/utils/datastructures/DataGrid2dListAdapter.js.map +0 -1
  909. package/src/_esm/utils/datastructures/GenericPath.d.ts +0 -86
  910. package/src/_esm/utils/datastructures/GenericPath.js +0 -121
  911. package/src/_esm/utils/datastructures/GenericPath.js.map +0 -1
  912. package/src/_esm/utils/datastructures/GeometryMesh.d.ts +0 -49
  913. package/src/_esm/utils/datastructures/GeometryMesh.js +0 -57
  914. package/src/_esm/utils/datastructures/GeometryMesh.js.map +0 -1
  915. package/src/_esm/utils/datastructures/Girih.d.ts +0 -181
  916. package/src/_esm/utils/datastructures/Girih.js +0 -265
  917. package/src/_esm/utils/datastructures/Girih.js.map +0 -1
  918. package/src/_esm/utils/datastructures/GirihBowtie.d.ts +0 -37
  919. package/src/_esm/utils/datastructures/GirihBowtie.js +0 -134
  920. package/src/_esm/utils/datastructures/GirihBowtie.js.map +0 -1
  921. package/src/_esm/utils/datastructures/GirihDecagon.d.ts +0 -52
  922. package/src/_esm/utils/datastructures/GirihDecagon.js +0 -114
  923. package/src/_esm/utils/datastructures/GirihDecagon.js.map +0 -1
  924. package/src/_esm/utils/datastructures/GirihHexagon.d.ts +0 -39
  925. package/src/_esm/utils/datastructures/GirihHexagon.js +0 -182
  926. package/src/_esm/utils/datastructures/GirihHexagon.js.map +0 -1
  927. package/src/_esm/utils/datastructures/GirihPenroseRhombus.d.ts +0 -46
  928. package/src/_esm/utils/datastructures/GirihPenroseRhombus.js +0 -171
  929. package/src/_esm/utils/datastructures/GirihPenroseRhombus.js.map +0 -1
  930. package/src/_esm/utils/datastructures/GirihPentagon.d.ts +0 -37
  931. package/src/_esm/utils/datastructures/GirihPentagon.js +0 -91
  932. package/src/_esm/utils/datastructures/GirihPentagon.js.map +0 -1
  933. package/src/_esm/utils/datastructures/GirihRhombus.d.ts +0 -38
  934. package/src/_esm/utils/datastructures/GirihRhombus.js +0 -137
  935. package/src/_esm/utils/datastructures/GirihRhombus.js.map +0 -1
  936. package/src/_esm/utils/datastructures/GirihTile.d.ts +0 -283
  937. package/src/_esm/utils/datastructures/GirihTile.js +0 -290
  938. package/src/_esm/utils/datastructures/GirihTile.js.map +0 -1
  939. package/src/_esm/utils/datastructures/Matrix4x4.d.ts +0 -244
  940. package/src/_esm/utils/datastructures/Matrix4x4.js +0 -250
  941. package/src/_esm/utils/datastructures/Matrix4x4.js.map +0 -1
  942. package/src/_esm/utils/datastructures/VoronoiCell.d.ts +0 -122
  943. package/src/_esm/utils/datastructures/VoronoiCell.js +0 -182
  944. package/src/_esm/utils/datastructures/VoronoiCell.js.map +0 -1
  945. package/src/_esm/utils/datastructures/interfaces.d.ts +0 -13
  946. package/src/_esm/utils/datastructures/interfaces.js +0 -10
  947. package/src/_esm/utils/datastructures/interfaces.js.map +0 -1
  948. package/src/_esm/utils/detectDarkMode.d.ts +0 -10
  949. package/src/_esm/utils/detectDarkMode.js +0 -41
  950. package/src/_esm/utils/detectDarkMode.js.map +0 -1
  951. package/src/_esm/utils/dom/components/ColorGradientPicker.d.ts +0 -246
  952. package/src/_esm/utils/dom/components/ColorGradientPicker.js +0 -780
  953. package/src/_esm/utils/dom/components/ColorGradientPicker.js.map +0 -1
  954. package/src/_esm/utils/dom/components/ColorGradientPickerJSX.d.ts +0 -129
  955. package/src/_esm/utils/dom/components/ColorGradientPickerJSX.js +0 -582
  956. package/src/_esm/utils/dom/components/ColorGradientPickerJSX.js.map +0 -1
  957. package/src/_esm/utils/dom/components/ColorGradientSelector.d.ts +0 -118
  958. package/src/_esm/utils/dom/components/ColorGradientSelector.js +0 -376
  959. package/src/_esm/utils/dom/components/ColorGradientSelector.js.map +0 -1
  960. package/src/_esm/utils/dom/components/Test.d.ts +0 -7
  961. package/src/_esm/utils/dom/components/Test.js +0 -63
  962. package/src/_esm/utils/dom/components/Test.js.map +0 -1
  963. package/src/_esm/utils/dom/getAvailableContainerSpace.d.ts +0 -2
  964. package/src/_esm/utils/dom/getAvailableContainerSpace.js +0 -29
  965. package/src/_esm/utils/dom/getAvailableContainerSpace.js.map +0 -1
  966. package/src/_esm/utils/dom/getFProp.d.ts +0 -5
  967. package/src/_esm/utils/dom/getFProp.js +0 -12
  968. package/src/_esm/utils/dom/getFProp.js.map +0 -1
  969. package/src/_esm/utils/dom/guiSizeToggler.d.ts +0 -18
  970. package/src/_esm/utils/dom/guiSizeToggler.js +0 -44
  971. package/src/_esm/utils/dom/guiSizeToggler.js.map +0 -1
  972. package/src/_esm/utils/findInVertexArray.d.ts +0 -19
  973. package/src/_esm/utils/findInVertexArray.js +0 -29
  974. package/src/_esm/utils/findInVertexArray.js.map +0 -1
  975. package/src/_esm/utils/getFProp.d.ts +0 -5
  976. package/src/_esm/utils/getFProp.js +0 -8
  977. package/src/_esm/utils/getFProp.js.map +0 -1
  978. package/src/_esm/utils/gup.d.ts +0 -14
  979. package/src/_esm/utils/gup.js +0 -31
  980. package/src/_esm/utils/gup.js.map +0 -1
  981. package/src/_esm/utils/helpers/BezierPathInteractionHelper.d.ts +0 -272
  982. package/src/_esm/utils/helpers/BezierPathInteractionHelper.js +0 -655
  983. package/src/_esm/utils/helpers/BezierPathInteractionHelper.js.map +0 -1
  984. package/src/_esm/utils/helpers/CircleHelper.d.ts +0 -73
  985. package/src/_esm/utils/helpers/CircleHelper.js +0 -92
  986. package/src/_esm/utils/helpers/CircleHelper.js.map +0 -1
  987. package/src/_esm/utils/helpers/CircleSectorHelper.d.ts +0 -90
  988. package/src/_esm/utils/helpers/CircleSectorHelper.js +0 -113
  989. package/src/_esm/utils/helpers/CircleSectorHelper.js.map +0 -1
  990. package/src/_esm/utils/helpers/TriangleHelper.d.ts +0 -57
  991. package/src/_esm/utils/helpers/TriangleHelper.js +0 -82
  992. package/src/_esm/utils/helpers/TriangleHelper.js.map +0 -1
  993. package/src/_esm/utils/helpers/VEllipseHelper.d.ts +0 -32
  994. package/src/_esm/utils/helpers/VEllipseHelper.js +0 -87
  995. package/src/_esm/utils/helpers/VEllipseHelper.js.map +0 -1
  996. package/src/_esm/utils/helpers/VEllipseSectorHelper.d.ts +0 -52
  997. package/src/_esm/utils/helpers/VEllipseSectorHelper.js +0 -134
  998. package/src/_esm/utils/helpers/VEllipseSectorHelper.js.map +0 -1
  999. package/src/_esm/utils/io/DndFileHandler.d.ts +0 -63
  1000. package/src/_esm/utils/io/DndFileHandler.js +0 -106
  1001. package/src/_esm/utils/io/DndFileHandler.js.map +0 -1
  1002. package/src/_esm/utils/io/FileDrop.d.ts +0 -110
  1003. package/src/_esm/utils/io/FileDrop.js +0 -175
  1004. package/src/_esm/utils/io/FileDrop.js.map +0 -1
  1005. package/src/_esm/utils/parsers/LinearColorGradientParser.d.ts +0 -78
  1006. package/src/_esm/utils/parsers/LinearColorGradientParser.js +0 -223
  1007. package/src/_esm/utils/parsers/LinearColorGradientParser.js.map +0 -1
  1008. package/src/_esm/utils/parsers/OBJParser.d.ts +0 -25
  1009. package/src/_esm/utils/parsers/OBJParser.js +0 -78
  1010. package/src/_esm/utils/parsers/OBJParser.js.map +0 -1
  1011. package/src/_esm/utils/parsers/STLParser.d.ts +0 -61
  1012. package/src/_esm/utils/parsers/STLParser.js +0 -179
  1013. package/src/_esm/utils/parsers/STLParser.js.map +0 -1
  1014. package/src/_esm/utils/parsers/svg/parseSVGPathData.d.ts +0 -27
  1015. package/src/_esm/utils/parsers/svg/parseSVGPathData.js +0 -486
  1016. package/src/_esm/utils/parsers/svg/parseSVGPathData.js.map +0 -1
  1017. package/src/_esm/utils/parsers/svg/splitSVGPathData.d.ts +0 -20
  1018. package/src/_esm/utils/parsers/svg/splitSVGPathData.js +0 -53
  1019. package/src/_esm/utils/parsers/svg/splitSVGPathData.js.map +0 -1
  1020. package/src/_esm/utils/parsers/svg/types.d.ts +0 -63
  1021. package/src/_esm/utils/parsers/svg/types.js +0 -17
  1022. package/src/_esm/utils/parsers/svg/types.js.map +0 -1
@@ -1,1062 +0,0 @@
1
- "use strict";
2
- /**
3
- * @author Ikaros Kappler
4
- * @date 2013-08-15
5
- * @modified 2018-08-16 Added a closure. Removed the wrapper class 'IKRS'. Replaced class THREE.Vector2 by Vertex class.
6
- * @modified 2018-11-19 Added the fromArray(Array) function.
7
- * @modified 2018-11-28 Added the locateCurveByPoint(Vertex) function.
8
- * @modified 2018-12-04 Added the toSVGPathData() function.
9
- * @modified 2019-03-20 Added JSDoc tags.
10
- * @modified 2019-03-23 Changed the signatures of getPoint, getPointAt and getTangent (!version 2.0).
11
- * @modified 2019-12-02 Fixed the updateArcLength function. It used the wrong pointAt function (was renamed before).
12
- * @modified 2020-02-06 Added the getSubCurveAt(number,number) function.
13
- * @modified 2020-02-06 Fixed a serious bug in the arc lenght calculation (length was never reset, urgh).
14
- * @modified 2020-02-07 Added the isInstance(any) function.
15
- * @modified 2020-02-10 Added the reverse() function.
16
- * @modified 2020-02-10 Fixed the translate(...) function (returning 'this' was missing).
17
- * @modified 2020-03-24 Ported this class from vanilla JS to Typescript.
18
- * @modified 2020-06-03 Added the getBounds() function.
19
- * @modified 2020-07-14 Changed the moveCurvePoint(...,Vertex) to moveCurvePoint(...,XYCoords), which is more generic.
20
- * @modified 2020-07-24 Added the getClosestT function and the helper function locateIntervalByDistance(...).
21
- * @modified 2021-01-20 Added UID.
22
- * @modified 2022-02-02 Added the `destroy` method.
23
- * @modified 2022-02-02 Cleared the `toSVGPathData` function (deprecated). Use `drawutilssvg` instead.
24
- * @modified 2022-10-17 The `CubicBezierCurve` class now implements the new `PathSegment` interface.
25
- * @modified 2023-09-30 Added the function `CubicbezierCurve.getSubCurve(number,number)` – similar to `getSubCurveAt(...)` but with absolute position parameters.
26
- * @modified 2023-10-07 Added the `trimEnd`, `trimEndAt`, `trimStart`, `trimStartAt` methods.
27
- * @modified 2025-04-09 Added the `CubicBezierCurve.move` method to match the convention – which just calls `translate`.
28
- * @modified 2025-04-09 Modified the `CubicBezierCurve.translate` method: chaning parameter `Vertex` to more generalized `XYCoords`.
29
- * @modified 2025-04-13 Changed visibility of `CubicBezierCurve.utils` from 'private' to 'public'.
30
- * @modified 2025-04-13 Added helper function `CubicBezierCurve.utils.bezierCoeffs`.
31
- * @modified 2025-04-13 Added helper functopn `CubicBezierCurve.utils.sgn(number)` for division safe sign calculation.
32
- * @modified 2025-03-13 Class `CubicBezierCurve` is now implementing interface `Intersectable`.
33
- * @modified 2025-04-18 Added evaluation method for cubic Bézier curves `CubicBezierCurve.utils.evaluateT`.
34
- * @modified 2025-04-18 Refactored method `CubicBezierCurve.getPointAt` to use `evaluateT`.
35
- * @modified 2025-04-18 Fixed the `CubicBezierCurve.getBounds` method: now returning the real bounding box. Before it was an approximated one.
36
- * @modified 2025-ß4-18 Added helper methods for bounding box calculation `CubucBezierCurve.util.cubicPolyMinMax` and `cubicPoly`.
37
- * @version 2.9.0
38
- *
39
- * @file CubicBezierCurve
40
- * @public
41
- **/
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.CubicBezierCurve = void 0;
44
- var Bounds_1 = require("./Bounds");
45
- var UIDGenerator_1 = require("./UIDGenerator");
46
- var Vertex_1 = require("./Vertex");
47
- var Vector_1 = require("./Vector");
48
- /**
49
- * @classdesc A refactored cubic bezier curve class.
50
- *
51
- * @requires Bounds
52
- * @requires Vertex
53
- * @requires Vector
54
- * @requires XYCoords
55
- * @requires UID
56
- * @requires UIDGenerator
57
- */
58
- var CubicBezierCurve = /** @class */ (function () {
59
- /**
60
- * The constructor.
61
- *
62
- * @constructor
63
- * @name CubicBezierCurve
64
- * @param {Vertex} startPoint - The Bézier curve's start point.
65
- * @param {Vertex} endPoint - The Bézier curve's end point.
66
- * @param {Vertex} startControlPoint - The Bézier curve's start control point.
67
- * @param {Vertex} endControlPoint - The Bézier curve's end control point.
68
- **/
69
- function CubicBezierCurve(startPoint, endPoint, startControlPoint, endControlPoint) {
70
- /** @constant {number} */
71
- this.START_POINT = CubicBezierCurve.START_POINT;
72
- /** @constant {number} */
73
- this.START_CONTROL_POINT = CubicBezierCurve.START_CONTROL_POINT;
74
- /** @constant {number} */
75
- this.END_CONTROL_POINT = CubicBezierCurve.END_CONTROL_POINT;
76
- /** @constant {number} */
77
- this.END_POINT = CubicBezierCurve.END_POINT;
78
- this.uid = UIDGenerator_1.UIDGenerator.next();
79
- this.startPoint = startPoint;
80
- this.startControlPoint = startControlPoint;
81
- this.endPoint = endPoint;
82
- this.endControlPoint = endControlPoint;
83
- this.curveIntervals = 30;
84
- // An array of vertices
85
- this.segmentCache = [];
86
- // An array of floats
87
- this.segmentLengths = [];
88
- // float
89
- // this.arcLength = null;
90
- this.updateArcLengths();
91
- }
92
- /**
93
- * Move the given curve point (the start point, end point or one of the two
94
- * control points).
95
- *
96
- * @method moveCurvePoint
97
- * @param {number} pointID - The numeric identicator of the point to move. Use one of the four eBezierPoint constants.
98
- * @param {XYCoords} moveAmount - The amount to move the specified point by.
99
- * @param {boolean} moveControlPoint - Move the control points along with their path point (if specified point is a path point).
100
- * @param {boolean} updateArcLengths - Specifiy if the internal arc segment buffer should be updated.
101
- * @instance
102
- * @memberof CubicBezierCurve
103
- * @return {void}
104
- **/
105
- CubicBezierCurve.prototype.moveCurvePoint = function (pointID, moveAmount, moveControlPoint, updateArcLengths) {
106
- if (pointID == this.START_POINT) {
107
- this.getStartPoint().add(moveAmount);
108
- if (moveControlPoint)
109
- this.getStartControlPoint().add(moveAmount);
110
- }
111
- else if (pointID == this.START_CONTROL_POINT) {
112
- this.getStartControlPoint().add(moveAmount);
113
- }
114
- else if (pointID == this.END_CONTROL_POINT) {
115
- this.getEndControlPoint().add(moveAmount);
116
- }
117
- else if (pointID == this.END_POINT) {
118
- this.getEndPoint().add(moveAmount);
119
- if (moveControlPoint)
120
- this.getEndControlPoint().add(moveAmount);
121
- }
122
- else {
123
- console.log("[CubicBezierCurve.moveCurvePoint] pointID '".concat(pointID, "' invalid."));
124
- }
125
- if (updateArcLengths)
126
- this.updateArcLengths();
127
- };
128
- /**
129
- * Translate the whole curve by the given {x,y} amount: moves all four points.
130
- *
131
- * @method translate
132
- * @param {XYCoords} amount - The amount to translate this curve by.
133
- * @instance
134
- * @memberof CubicBezierCurve
135
- * @return {CubicBezierCurve} this (for chaining).
136
- **/
137
- CubicBezierCurve.prototype.translate = function (amount) {
138
- this.startPoint.add(amount);
139
- this.startControlPoint.add(amount);
140
- this.endControlPoint.add(amount);
141
- this.endPoint.add(amount);
142
- return this;
143
- };
144
- /**
145
- * Translate the whole curve by the given {x,y} amount: moves all four points.
146
- *
147
- * @method translate
148
- * @param {XYCoords} amount - The amount to translate this curve by.
149
- * @instance
150
- * @memberof CubicBezierCurve
151
- * @return {CubicBezierCurve} this (for chaining).
152
- **/
153
- CubicBezierCurve.prototype.move = function (amount) {
154
- return this.translate(amount);
155
- };
156
- /**
157
- * Reverse this curve, means swapping start- and end-point and swapping
158
- * start-control- and end-control-point.
159
- *
160
- * @method reverse
161
- * @instance
162
- * @memberof CubicBezierCurve
163
- * @return {CubicBezierCurve} this (for chaining).
164
- **/
165
- CubicBezierCurve.prototype.reverse = function () {
166
- var tmp = this.startPoint;
167
- this.startPoint = this.endPoint;
168
- this.endPoint = tmp;
169
- tmp = this.startControlPoint;
170
- this.startControlPoint = this.endControlPoint;
171
- this.endControlPoint = tmp;
172
- return this;
173
- };
174
- /**
175
- * Get the total curve length.<br>
176
- * <br>
177
- * As not all Bézier curved have a closed formula to calculate their lengths, this
178
- * implementation uses a segment buffer (with a length of 30 segments). So the
179
- * returned length is taken from the arc segment buffer.<br>
180
- * <br>
181
- * Note that if the curve points were changed and the segment buffer was not
182
- * updated this function might return wrong (old) values.
183
- *
184
- * @method getLength
185
- * @instance
186
- * @memberof CubicBezierCurve
187
- * @return {number} >= 0
188
- **/
189
- CubicBezierCurve.prototype.getLength = function () {
190
- return this.arcLength;
191
- };
192
- /**
193
- * Uptate the internal arc segment buffer and their lengths.<br>
194
- * <br>
195
- * All class functions update the buffer automatically; if any
196
- * curve point is changed by other reasons you should call this
197
- * function to keep actual values in the buffer.
198
- *
199
- * @method updateArcLengths
200
- * @instance
201
- * @memberof CubicBezierCurve
202
- * @return {void}
203
- **/
204
- CubicBezierCurve.prototype.updateArcLengths = function () {
205
- var pointA = this.startPoint.clone();
206
- var pointB = new Vertex_1.Vertex(0, 0);
207
- var curveStep = 1.0 / this.curveIntervals;
208
- // Clear segment cache
209
- this.segmentCache = [];
210
- // Push start point into buffer
211
- this.segmentCache.push(this.startPoint);
212
- this.segmentLengths = [];
213
- var newLength = 0.0;
214
- var t = 0.0;
215
- var tmpLength;
216
- while (t <= 1.0) {
217
- pointB = this.getPointAt(t);
218
- // Store point into cache
219
- this.segmentCache.push(pointB);
220
- // Calculate segment length
221
- tmpLength = pointA.distance(pointB);
222
- this.segmentLengths.push(tmpLength);
223
- newLength += tmpLength;
224
- pointA = pointB;
225
- t += curveStep;
226
- }
227
- this.arcLength = newLength;
228
- };
229
- /**
230
- * Get a 't' (relative position on curve) with the closest distance to point 'p'.
231
- *
232
- * The returned number is 0.0 <= t <= 1.0. Use the getPointAt(t) function to retrieve the actual curve point.
233
- *
234
- * This function uses a recursive approach by cutting the curve into several linear segments.
235
- *
236
- * @method getClosestT
237
- * @instance
238
- * @memberof CubicBezierCurve
239
- * @param {Vertex} p - The point to find the closest position ('t' on the curve).
240
- * @return {number}
241
- **/
242
- CubicBezierCurve.prototype.getClosestT = function (p) {
243
- // We would like to have an error that's not larger than 1.0.
244
- var desiredEpsilon = 1.0;
245
- var result = { t: 0, tPrev: 0.0, tNext: 1.0 };
246
- var iteration = 0;
247
- do {
248
- result = this.locateIntervalByDistance(p, result.tPrev, result.tNext, this.curveIntervals);
249
- iteration++;
250
- // Be sure: stop after 4 iterations
251
- } while (iteration < 4 && this.getPointAt(result.tPrev).distance(this.getPointAt(result.tNext)) > desiredEpsilon);
252
- return result.t;
253
- };
254
- /**
255
- * This helper function locates the 't' on a fixed step interval with the minimal distance
256
- * between the curve (at 't') and the given point.
257
- *
258
- * Furthermore you must specify a sub curve (start 't' and end 't') you want to search on.
259
- * Using tStart=0.0 and tEnd=1.0 will search on the full curve.
260
- *
261
- * @param {Vertex} p - The point to find the closest curve point for.
262
- * @param {number} tStart - The start position (start 't' of the sub curve). Should be >= 0.0.
263
- * @param {number} tEnd - The end position (end 't' of the sub curve). Should be <= 1.0.
264
- * @param {number} stepCount - The number of steps to check within the interval.
265
- *
266
- * @return {object} - An object with t, tPrev and tNext (numbers).
267
- **/
268
- CubicBezierCurve.prototype.locateIntervalByDistance = function (p, tStart, tEnd, stepCount) {
269
- var minIndex = -1;
270
- var minDist = 0;
271
- var t = 0.0;
272
- var tDiff = tEnd - tStart;
273
- for (var i = 0; i <= stepCount; i++) {
274
- t = tStart + tDiff * (i / stepCount);
275
- var vert = this.getPointAt(t);
276
- var dist = vert.distance(p);
277
- if (minIndex == -1 || dist < minDist) {
278
- minIndex = i;
279
- minDist = dist;
280
- }
281
- }
282
- return {
283
- t: tStart + tDiff * (minIndex / stepCount),
284
- tPrev: tStart + tDiff * (Math.max(0, minIndex - 1) / stepCount),
285
- tNext: tStart + tDiff * (Math.min(stepCount, minIndex + 1) / stepCount)
286
- };
287
- };
288
- //--- BEGIN --- Implement interface `IBounded`
289
- /**
290
- * Get the bounds of this bezier curve.
291
- *
292
- * The bounds are approximated by the underlying segment buffer; the more segment there are,
293
- * the more accurate will be the returned bounds.
294
- *
295
- * @method getClosestT
296
- * @instance
297
- * @memberof CubicBezierCurve
298
- * @return {Bounds} The bounds of this ellipse.
299
- **/
300
- CubicBezierCurve.prototype.getBounds = function () {
301
- // Thanks to Richard "RM" for the Bézier bounds calculatin
302
- // https://jsfiddle.net/SalixAlba/QQnvm/4/
303
- var xMinMax = CubicBezierCurve.utils.cubicPolyMinMax(this.startPoint.x, this.startControlPoint.x, this.endControlPoint.x, this.endPoint.x);
304
- var xl = xMinMax.min;
305
- var xh = xMinMax.max;
306
- var yMinMax = CubicBezierCurve.utils.cubicPolyMinMax(this.startPoint.y, this.startControlPoint.y, this.endControlPoint.y, this.endPoint.y);
307
- var yl = yMinMax.min;
308
- var yh = yMinMax.max;
309
- return Bounds_1.Bounds.computeFromVertices([
310
- { x: xl, y: yl },
311
- { x: xl, y: yh },
312
- { x: xh, y: yh },
313
- { x: xh, y: yl }
314
- ]);
315
- };
316
- //--- END --- Implement interface `IBounded`
317
- /**
318
- * Get the start point of the curve.<br>
319
- * <br>
320
- * This function just returns this.startPoint.
321
- *
322
- * @method getStartPoint
323
- * @instance
324
- * @memberof CubicBezierCurve
325
- * @return {Vertex} this.startPoint
326
- **/
327
- CubicBezierCurve.prototype.getStartPoint = function () {
328
- return this.startPoint;
329
- };
330
- /**
331
- * Get the end point of the curve.<br>
332
- * <br>
333
- * This function just returns this.endPoint.
334
- *
335
- * @method getEndPoint
336
- * @instance
337
- * @memberof CubicBezierCurve
338
- * @return {Vertex} this.endPoint
339
- **/
340
- CubicBezierCurve.prototype.getEndPoint = function () {
341
- return this.endPoint;
342
- };
343
- /**
344
- * Get the start control point of the curve.<br>
345
- * <br>
346
- * This function just returns this.startControlPoint.
347
- *
348
- * @method getStartControlPoint
349
- * @instance
350
- * @memberof CubicBezierCurve
351
- * @return {Vertex} this.startControlPoint
352
- **/
353
- CubicBezierCurve.prototype.getStartControlPoint = function () {
354
- return this.startControlPoint;
355
- };
356
- /**
357
- * Get the end control point of the curve.<br>
358
- * <br>
359
- * This function just returns this.endControlPoint.
360
- *
361
- * @method getEndControlPoint
362
- * @instance
363
- * @memberof CubicBezierCurve
364
- * @return {Vertex} this.endControlPoint
365
- **/
366
- CubicBezierCurve.prototype.getEndControlPoint = function () {
367
- return this.endControlPoint;
368
- };
369
- /**
370
- * Get one of the four curve points specified by the passt point ID.
371
- *
372
- * @method getEndControlPoint
373
- * @param {number} id - One of START_POINT, START_CONTROL_POINT, END_CONTROL_POINT or END_POINT.
374
- * @instance
375
- * @memberof CubicBezierCurve
376
- * @return {Vertex}
377
- **/
378
- CubicBezierCurve.prototype.getPointByID = function (id) {
379
- if (id == this.START_POINT)
380
- return this.startPoint;
381
- if (id == this.END_POINT)
382
- return this.endPoint;
383
- if (id == this.START_CONTROL_POINT)
384
- return this.startControlPoint;
385
- if (id == this.END_CONTROL_POINT)
386
- return this.endControlPoint;
387
- throw new Error("Invalid point ID '".concat(id, "'."));
388
- };
389
- /**
390
- * Get the curve point at a given position t, where t is in [0,1].<br>
391
- * <br>
392
- * @see Line.pointAt
393
- *
394
- * @method getPointAt
395
- * @param {number} t - The position on the curve in [0,1] (0 means at
396
- * start point, 1 means at end point, other values address points in bertween).
397
- * @instance
398
- * @memberof CubicBezierCurve
399
- * @return {Vertex}
400
- **/
401
- CubicBezierCurve.prototype.getPointAt = function (t) {
402
- // Perform some powerful math magic
403
- // TODO: cleanup
404
- // const x: number =
405
- // this.startPoint.x * Math.pow(1.0 - t, 3) +
406
- // this.startControlPoint.x * 3 * t * Math.pow(1.0 - t, 2) +
407
- // this.endControlPoint.x * 3 * Math.pow(t, 2) * (1.0 - t) +
408
- // this.endPoint.x * Math.pow(t, 3);
409
- // const y: number =
410
- // this.startPoint.y * Math.pow(1.0 - t, 3) +
411
- // this.startControlPoint.y * 3 * t * Math.pow(1.0 - t, 2) +
412
- // this.endControlPoint.y * 3 * Math.pow(t, 2) * (1.0 - t) +
413
- // this.endPoint.y * Math.pow(t, 3);
414
- var x = CubicBezierCurve.utils.evaluateT(this.startPoint.x, this.startControlPoint.x, this.endControlPoint.x, this.endPoint.x, t);
415
- var y = CubicBezierCurve.utils.evaluateT(this.startPoint.y, this.startControlPoint.y, this.endControlPoint.y, this.endPoint.y, t);
416
- return new Vertex_1.Vertex(x, y);
417
- };
418
- /**
419
- * Get the curve point at a given position u, where u is in [0,arcLength].<br>
420
- * <br>
421
- * @see CubicBezierCurve.getPointAt
422
- *
423
- * @method getPoint
424
- * @param {number} u - The position on the curve in [0,arcLength] (0 means at
425
- * start point, arcLength means at end point, other values address points in bertween).
426
- * @instance
427
- * @memberof CubicBezierCurve
428
- * @return {Vertex}
429
- **/
430
- CubicBezierCurve.prototype.getPoint = function (u) {
431
- return this.getPointAt(u / this.arcLength);
432
- };
433
- /**
434
- * Get the curve tangent vector at a given absolute curve position t in [0,1].<br>
435
- * <br>
436
- * Note that the returned tangent vector (end point) is not normalized and relative to (0,0).
437
- *
438
- * @method getTangent
439
- * @param {number} t - The position on the curve in [0,1].
440
- * @instance
441
- * @memberof CubicBezierCurve
442
- * @return {Vertex}
443
- **/
444
- CubicBezierCurve.prototype.getTangentAt = function (t) {
445
- var a = this.getStartPoint();
446
- var b = this.getStartControlPoint();
447
- var c = this.getEndControlPoint();
448
- var d = this.getEndPoint();
449
- // This is the shortened one
450
- var t2 = t * t;
451
- // (1 - t)^2 = (1-t)*(1-t) = 1 - t - t + t^2 = 1 - 2*t + t^2
452
- var nt2 = 1 - 2 * t + t2;
453
- var tX = -3 * a.x * nt2 + b.x * (3 * nt2 - 6 * (t - t2)) + c.x * (6 * (t - t2) - 3 * t2) + 3 * d.x * t2;
454
- var tY = -3 * a.y * nt2 + b.y * (3 * nt2 - 6 * (t - t2)) + c.y * (6 * (t - t2) - 3 * t2) + 3 * d.y * t2;
455
- // Note: my implementation does NOT normalize tangent vectors!
456
- return new Vertex_1.Vertex(tX, tY);
457
- };
458
- /**
459
- * Trim off a start section of this curve. The position parameter `uValue` is the absolute position on the
460
- * curve in `[0...arcLength]`.
461
- * The remaining curve will be the one in the bounds `[uValue,1]` (so `[0.0,uValue]` is cut off).
462
- *
463
- * Note this function just converts the absolute parameter to a relative one and call `trimStartAt`.
464
- *
465
- * @method trimStart
466
- * @instance
467
- * @memberof CubicBezierCurve
468
- * @param {number} uValue - The absolute position parameter where to cut off the head curve.
469
- * @returns {CubicBezierCurve} `this` for chanining.
470
- */
471
- CubicBezierCurve.prototype.trimStart = function (uValue) {
472
- return this.trimStartAt(this.convertU2T(uValue));
473
- };
474
- /**
475
- * Trim off a start section of this curve. The position parameter `t` is the relative position in [0..1].
476
- * The remaining curve will be the one in the bounds `[uValue,1]` (so `[0.0,uValue]` is cut off).
477
- *
478
- * @method trimStartAt
479
- * @instance
480
- * @memberof CubicBezierCurve
481
- * @param {number} t - The relative position parameter where to cut off the head curve.
482
- * @returns {CubicBezierCurve} `this` for chanining.
483
- */
484
- CubicBezierCurve.prototype.trimStartAt = function (t) {
485
- var subCurbePoints = CubicBezierCurve.utils.getSubCurvePointsAt(this, t, 1.0);
486
- this.startPoint.set(subCurbePoints[0]);
487
- this.startControlPoint.set(subCurbePoints[2]);
488
- this.endPoint.set(subCurbePoints[1]);
489
- this.endControlPoint.set(subCurbePoints[3]);
490
- this.updateArcLengths();
491
- return this;
492
- };
493
- /**
494
- * Trim off the end of this curve. The position parameter `uValue` is the absolute position on the
495
- * curve in `[0...arcLength]`.
496
- * The remaining curve will be the one in the bounds `[0,uValue]` (so `[1.0-uValue,1.0]` is cut off).
497
- *
498
- * Note this function just converts the absolute parameter to a relative one and call `trimEndAt`.
499
- *
500
- * @method trimEnd
501
- * @instance
502
- * @memberof CubicBezierCurve
503
- * @param {number} uValue - The absolute position parameter where to cut off the tail curve.
504
- * @returns {CubicBezierCurve} `this` for chanining.
505
- */
506
- CubicBezierCurve.prototype.trimEnd = function (uValue) {
507
- return this.trimEndAt(this.convertU2T(uValue));
508
- };
509
- /**
510
- * Trim off the end of this curve. The position parameter `t` is the relative position in [0..1].
511
- * The remaining curve will be the one in the bounds `[0,t]` (so `[1.0-t,1.0]` is cut off).
512
- *
513
- * @method trimEndAt
514
- * @instance
515
- * @memberof CubicBezierCurve
516
- * @param {number} t - The relative position parameter where to cut off the tail curve.
517
- * @returns {CubicBezierCurve} `this` for chanining.
518
- */
519
- CubicBezierCurve.prototype.trimEndAt = function (t) {
520
- var subCurbePoints = CubicBezierCurve.utils.getSubCurvePointsAt(this, 0.0, t);
521
- this.startPoint.set(subCurbePoints[0]);
522
- this.startControlPoint.set(subCurbePoints[2]);
523
- this.endPoint.set(subCurbePoints[1]);
524
- this.endControlPoint.set(subCurbePoints[3]);
525
- this.updateArcLengths();
526
- return this;
527
- };
528
- /**
529
- * Get a sub curve at the given start end end positions (values on the curve's length, between 0 and curve.arcLength).
530
- *
531
- * tStart >= tEnd is allowed, you will get a reversed sub curve then.
532
- *
533
- * @method getSubCurve
534
- * @param {number} tStart – The start position of the desired sub curve (must be in [0..arcLength]).
535
- * @param {number} tEnd – The end position if the desired cub curve (must be in [0..arcLength]).
536
- * @instance
537
- * @memberof CubicBezierCurve
538
- * @return {CubicBezierCurve} The sub curve as a new curve.
539
- **/
540
- CubicBezierCurve.prototype.getSubCurve = function (uStart, uEnd) {
541
- return this.getSubCurveAt(this.convertU2T(uStart), this.convertU2T(uEnd));
542
- };
543
- /**
544
- * Get a sub curve at the given start end end offsets (values between 0.0 and 1.0).
545
- *
546
- * tStart >= tEnd is allowed, you will get a reversed sub curve then.
547
- *
548
- * @method getSubCurveAt
549
- * @param {number} tStart – The start offset of the desired sub curve (must be in [0..1]).
550
- * @param {number} tEnd – The end offset if the desired cub curve (must be in [0..1]).
551
- * @instance
552
- * @memberof CubicBezierCurve
553
- * @return {CubicBezierCurve} The sub curve as a new curve.
554
- **/
555
- CubicBezierCurve.prototype.getSubCurveAt = function (tStart, tEnd) {
556
- // This 'splits' the curve at the given point at t.
557
- var subCurbePoints = CubicBezierCurve.utils.getSubCurvePointsAt(this, tStart, tEnd);
558
- return new CubicBezierCurve(subCurbePoints[0], subCurbePoints[1], subCurbePoints[2], subCurbePoints[3]);
559
- };
560
- /**
561
- * Convert a relative curve position u to the absolute curve position t.
562
- *
563
- * @method convertU2t
564
- * @param {number} u - The relative position on the curve in [0,arcLength].
565
- * @instance
566
- * @memberof CubicBezierCurve
567
- * @return {number}
568
- **/
569
- CubicBezierCurve.prototype.convertU2T = function (u) {
570
- return Math.max(0.0, Math.min(1.0, u / this.arcLength));
571
- };
572
- /**
573
- * Get the curve tangent vector at a given relative position u in [0,arcLength].<br>
574
- * <br>
575
- * Note that the returned tangent vector (end point) is not normalized.
576
- *
577
- * @method getTangent
578
- * @param {number} u - The position on the curve in [0,arcLength].
579
- * @instance
580
- * @memberof CubicBezierCurve
581
- * @return {Vertex}
582
- **/
583
- CubicBezierCurve.prototype.getTangent = function (u) {
584
- return this.getTangentAt(this.convertU2T(u));
585
- };
586
- /**
587
- * Get the curve perpendicular at a given relative position u in [0,arcLength] as a vector.<br>
588
- * <br>
589
- * Note that the returned vector (end point) is not normalized.
590
- *
591
- * @method getPerpendicular
592
- * @param {number} u - The relative position on the curve in [0,arcLength].
593
- * @instance
594
- * @memberof CubicBezierCurve
595
- * @return {Vertex}
596
- **/
597
- CubicBezierCurve.prototype.getPerpendicular = function (u) {
598
- return this.getPerpendicularAt(this.convertU2T(u));
599
- };
600
- /**
601
- * Get the curve perpendicular at a given absolute position t in [0,1] as a vector.<br>
602
- * <br>
603
- * Note that the returned vector (end point) is not normalized.
604
- *
605
- * @method getPerpendicularAt
606
- * @param {number} u - The absolute position on the curve in [0,1].
607
- * @instance
608
- * @memberof CubicBezierCurve
609
- * @return {Vertex}
610
- **/
611
- CubicBezierCurve.prototype.getPerpendicularAt = function (t) {
612
- var tangentVector = this.getTangentAt(t);
613
- return new Vertex_1.Vertex(tangentVector.y, -tangentVector.x);
614
- };
615
- /**
616
- * Clone this Bézier curve (deep clone).
617
- *
618
- * @method clone
619
- * @instance
620
- * @memberof CubicBezierCurve
621
- * @return {CubicBezierCurve}
622
- **/
623
- CubicBezierCurve.prototype.clone = function () {
624
- return new CubicBezierCurve(this.getStartPoint().clone(), this.getEndPoint().clone(), this.getStartControlPoint().clone(), this.getEndControlPoint().clone());
625
- };
626
- //---BEGIN PathSegment-------------------------
627
- /**
628
- * Get the tangent's end point at the start point of this segment.
629
- *
630
- * @method getStartTangent
631
- * @memberof PathSegment
632
- * @return {Vertex} The end point of the starting point's tangent.
633
- */
634
- CubicBezierCurve.prototype.getStartTangent = function () {
635
- return this.startControlPoint;
636
- };
637
- /**
638
- * Get the tangent's end point at the end point of this segment.
639
- *
640
- * @method getEndTangent
641
- * @memberof PathSegment
642
- * @return {Vertex} The end point of the ending point's tangent.
643
- */
644
- CubicBezierCurve.prototype.getEndTangent = function () {
645
- return this.endControlPoint;
646
- };
647
- //---END PathSegment-------------------------
648
- //--- BEGIN --- Implement interface `Intersectable`
649
- /**
650
- * Get all line intersections with this shape.
651
- *
652
- * This method returns all intersections (as vertices) with this shape. The returned array of vertices is in no specific order.
653
- *
654
- * @param {VertTuple} line - The line to find intersections with.
655
- * @param {boolean} inVectorBoundsOnly - If set to true only intersecion points on the passed vector are returned (located strictly between start and end vertex).
656
- * @returns {Array<Vertex>} - An array of all intersections with the shape outline.
657
- */
658
- CubicBezierCurve.prototype.lineIntersections = function (line, inVectorBoundsOnly) {
659
- var _this = this;
660
- if (inVectorBoundsOnly === void 0) { inVectorBoundsOnly = false; }
661
- var intersectionTs = this.lineIntersectionTs(line);
662
- var intersectionPoints = intersectionTs.map(function (t) {
663
- return _this.getPointAt(t);
664
- });
665
- if (inVectorBoundsOnly) {
666
- // const maxDist = line.length();
667
- return intersectionPoints.filter(function (vert) { return line.hasPoint(vert, true); });
668
- }
669
- else {
670
- return intersectionPoints;
671
- }
672
- };
673
- /**
674
- * Get all line intersections of this polygon and their tangents along the shape.
675
- *
676
- * This method returns all intersection tangents (as vectors) with this shape. The returned array of vectors is in no specific order.
677
- *
678
- * @param line
679
- * @param lineIntersectionTangents
680
- * @returns
681
- */
682
- CubicBezierCurve.prototype.lineIntersectionTangents = function (line, inVectorBoundsOnly) {
683
- var _this = this;
684
- if (inVectorBoundsOnly === void 0) { inVectorBoundsOnly = false; }
685
- var intersectionTs = this.lineIntersectionTs(line);
686
- var intersectionTangents = intersectionTs.map(function (t) {
687
- var startPoint = _this.getPointAt(t);
688
- var endPoint = _this.getTangentAt(t);
689
- return new Vector_1.Vector(startPoint, endPoint.add(startPoint));
690
- });
691
- if (inVectorBoundsOnly) {
692
- return intersectionTangents.filter(function (vec) { return line.hasPoint(vec.a, true); });
693
- }
694
- else {
695
- return intersectionTangents;
696
- }
697
- };
698
- //--- END --- Implement interface `Intersectable`
699
- CubicBezierCurve.prototype.lineIntersectionTs = function (line) {
700
- var A = line.b.y - line.a.y; // A=y2-y1
701
- var B = line.a.x - line.b.x; // B=x1-x2
702
- var C = line.a.x * (line.a.y - line.b.y) + line.a.y * (line.b.x - line.a.x); //C=x1*(y1-y2)+y1*(x2-x1)
703
- // var bx = bezierCoeffs(px[0], px[1], px[2], px[3]);
704
- // var by = bezierCoeffs(py[0], py[1], py[2], py[3]);
705
- var bx = CubicBezierCurve.utils.bezierCoeffs(this.startPoint.x, this.startControlPoint.x, this.endControlPoint.x, this.endPoint.x);
706
- var by = CubicBezierCurve.utils.bezierCoeffs(this.startPoint.y, this.startControlPoint.y, this.endControlPoint.y, this.endPoint.y);
707
- var poly = Array(4);
708
- poly[0] = A * bx[0] + B * by[0]; /*t^3*/
709
- poly[1] = A * bx[1] + B * by[1]; /*t^2*/
710
- poly[2] = A * bx[2] + B * by[2]; /*t*/
711
- poly[3] = A * bx[3] + B * by[3] + C; /*1*/
712
- var roots = CubicBezierCurve.utils.cubicRoots(poly);
713
- return roots.filter(function (root) { return root != -1; });
714
- };
715
- /**
716
- * Check if this and the specified curve are equal.<br>
717
- * <br>
718
- * All four points need to be equal for this, the Vertex.equals function is used.<br>
719
- * <br>
720
- * Please note that this function is not type safe (comparison with any object will fail).
721
- *
722
- * @method clone
723
- * @param {CubicBezierCurve} curve - The curve to compare with.
724
- * @instance
725
- * @memberof CubicBezierCurve
726
- * @return {boolean}
727
- **/
728
- CubicBezierCurve.prototype.equals = function (curve) {
729
- // Note: in the earlier vanilla-JS version this was callable with plain objects.
730
- // Let's see if this restricted version works out.
731
- if (!curve)
732
- return false;
733
- if (!curve.startPoint || !curve.endPoint || !curve.startControlPoint || !curve.endControlPoint)
734
- return false;
735
- return (this.startPoint.equals(curve.startPoint) &&
736
- this.endPoint.equals(curve.endPoint) &&
737
- this.startControlPoint.equals(curve.startControlPoint) &&
738
- this.endControlPoint.equals(curve.endControlPoint));
739
- };
740
- /**
741
- * This function should invalidate any installed listeners and invalidate this object.
742
- * After calling this function the object might not hold valid data any more and
743
- * should not be used.
744
- */
745
- CubicBezierCurve.prototype.destroy = function () {
746
- this.startPoint.destroy();
747
- this.endPoint.destroy();
748
- this.startControlPoint.destroy();
749
- this.endControlPoint.destroy();
750
- this.isDestroyed = true;
751
- };
752
- /**
753
- * Quick check for class instance.
754
- * Is there a better way?
755
- *
756
- * @method isInstance
757
- * @param {any} obj - Check if the passed object/value is an instance of CubicBezierCurve.
758
- * @instance
759
- * @memberof CubicBezierCurve
760
- * @return {boolean}
761
- **/
762
- CubicBezierCurve.isInstance = function (obj) {
763
- // Note: check this again
764
- /* OLD VANILLA JS IMPLEMENTATION */
765
- /* if( typeof obj != "object" )
766
- return false;
767
- function hasXY(v) {
768
- return typeof v != "undefined" && typeof v.x == "number" && typeof v.y == "number";
769
- }
770
- return typeof obj.startPoint == "object" && hasXY(obj.startPoint)
771
- && typeof obj.endPoint == "object" && hasXY(obj.endPoint)
772
- && typeof obj.startControlPoint == "object" && hasXY(obj.startControlPoint)
773
- && typeof obj.endControlPoint == "object" && hasXY(obj.endControlPoint);
774
- */
775
- return obj instanceof CubicBezierCurve;
776
- };
777
- /**
778
- * Convert this curve to a JSON string.
779
- *
780
- * @method toJSON
781
- * @param {boolean=} [prettyFormat=false] - If set to true the function will add line breaks.
782
- * @instance
783
- * @memberof CubicBezierCurve
784
- * @return {string} The JSON data.
785
- **/
786
- CubicBezierCurve.prototype.toJSON = function (prettyFormat) {
787
- var jsonString = "{ " + // begin object
788
- (prettyFormat ? "\n\t" : "") +
789
- '"startPoint" : [' +
790
- this.getStartPoint().x +
791
- "," +
792
- this.getStartPoint().y +
793
- "], " +
794
- (prettyFormat ? "\n\t" : "") +
795
- '"endPoint" : [' +
796
- this.getEndPoint().x +
797
- "," +
798
- this.getEndPoint().y +
799
- "], " +
800
- (prettyFormat ? "\n\t" : "") +
801
- '"startControlPoint": [' +
802
- this.getStartControlPoint().x +
803
- "," +
804
- this.getStartControlPoint().y +
805
- "], " +
806
- (prettyFormat ? "\n\t" : "") +
807
- '"endControlPoint" : [' +
808
- this.getEndControlPoint().x +
809
- "," +
810
- this.getEndControlPoint().y +
811
- "]" +
812
- (prettyFormat ? "\n\t" : "") +
813
- " }"; // end object
814
- return jsonString;
815
- };
816
- /**
817
- * Parse a Bézier curve from the given JSON string.
818
- *
819
- * @method fromJSON
820
- * @param {string} jsonString - The JSON data to parse.
821
- * @memberof CubicBezierCurve
822
- * @static
823
- * @throws An exception if the JSON string is malformed.
824
- * @return {CubicBezierCurve}
825
- **/
826
- CubicBezierCurve.fromJSON = function (jsonString) {
827
- var obj = JSON.parse(jsonString);
828
- return CubicBezierCurve.fromObject(obj);
829
- };
830
- /**
831
- * Try to convert the passed object to a CubicBezierCurve.
832
- *
833
- * @method fromObject
834
- * @param {object} obj - The object to convert.
835
- * @memberof CubicBezierCurve
836
- * @static
837
- * @throws An exception if the passed object is malformed.
838
- * @return {CubicBezierCurve}
839
- **/
840
- CubicBezierCurve.fromObject = function (obj) {
841
- if (typeof obj !== "object")
842
- throw "Can only build from object.";
843
- if (!obj.startPoint)
844
- throw 'Object member "startPoint" missing.';
845
- if (!obj.endPoint)
846
- throw 'Object member "endPoint" missing.';
847
- if (!obj.startControlPoint)
848
- throw 'Object member "startControlPoint" missing.';
849
- if (!obj.endControlPoint)
850
- throw 'Object member "endControlPoint" missing.';
851
- return new CubicBezierCurve(new Vertex_1.Vertex(obj.startPoint[0], obj.startPoint[1]), new Vertex_1.Vertex(obj.endPoint[0], obj.endPoint[1]), new Vertex_1.Vertex(obj.startControlPoint[0], obj.startControlPoint[1]), new Vertex_1.Vertex(obj.endControlPoint[0], obj.endControlPoint[1]));
852
- };
853
- /**
854
- * Convert a 4-element array of vertices to a cubic bézier curve.
855
- *
856
- * @method fromArray
857
- * @param {Vertex[]} arr - [ startVertex, endVertex, startControlVertex, endControlVertex ]
858
- * @memberof CubicBezierCurve
859
- * @throws An exception if the passed array is malformed.
860
- * @return {CubicBezierCurve}
861
- **/
862
- CubicBezierCurve.fromArray = function (arr) {
863
- if (!Array.isArray(arr))
864
- throw "Can only build from object.";
865
- if (arr.length != 4)
866
- throw "Can only build from array with four elements.";
867
- return new CubicBezierCurve(arr[0], arr[1], arr[2], arr[3]);
868
- };
869
- /** @constant {number} */
870
- CubicBezierCurve.START_POINT = 0;
871
- /** @constant {number} */
872
- CubicBezierCurve.START_CONTROL_POINT = 1;
873
- /** @constant {number} */
874
- CubicBezierCurve.END_CONTROL_POINT = 2;
875
- /** @constant {number} */
876
- CubicBezierCurve.END_POINT = 3;
877
- /**
878
- * Helper utils.
879
- */
880
- CubicBezierCurve.utils = {
881
- evaluateT: function (p0, p1, p2, p3, t) {
882
- return p0 * Math.pow(1.0 - t, 3) +
883
- p1 * 3 * t * Math.pow(1.0 - t, 2) +
884
- p2 * 3 * Math.pow(t, 2) * (1.0 - t) +
885
- p3 * Math.pow(t, 3);
886
- },
887
- cubicPolyMinMax: function (p0, p1, p2, p3) {
888
- // var polyX = CubicBezierCurve.utils.cubicPoly2(
889
- // p0, // P[0].X, // bezierCurve.startPoint.x,
890
- // p1, // P[1].X, // bezierCurve.startControlPoint.x,
891
- // p2, // P[2].X, // bezierCurve.endControlPoint.x,
892
- // p3 // P[3].X // bezierCurve.endPoint.x
893
- // );
894
- // var a = polyX.a;
895
- // var b = polyX.b;
896
- // var c = polyX.c;
897
- // var disc = polyX.b * polyX.b - 4 * polyX.a * polyX.c;
898
- var polyX = CubicBezierCurve.utils.cubicPoly(p0, // P[0].X, // bezierCurve.startPoint.x,
899
- p1, // P[1].X, // bezierCurve.startControlPoint.x,
900
- p2, // P[2].X, // bezierCurve.endControlPoint.x,
901
- p3 // P[3].X // bezierCurve.endPoint.x
902
- );
903
- var a = polyX[0]; // .a;
904
- var b = polyX[1]; // .b;
905
- var c = polyX[2]; // .c;
906
- //alert("a "+a+" "+b+" "+c);
907
- // var disc = b * b - 4 * a * c;
908
- var disc = polyX[1] * polyX[1] - 4 * polyX[0] * polyX[2];
909
- // var polyX = CubicBezierCurve.utils.bezierCoeffs(p3,p2,p1,p0);
910
- // var a = polyX[0]; //polyX.a;
911
- // var b = polyX[1]; // .b;
912
- // var c = polyX[2]; //.c;
913
- // var disc = polyX[1] * polyX[1] - 4 * polyX[0] * polyX[2];
914
- // var xl = Math.min(bCurve.endPoint.x, bCurve.startPoint.x); // P[0].X;
915
- // var xh = Math.max(bCurve.endPoint.x, bCurve.startPoint.x); // P[0].X;
916
- var xl = Math.min(p3, p0); // P[0].X;
917
- var xh = Math.max(p3, p0); // P[0].X;
918
- // if (P[3].X < xl) xl = P[3].X;
919
- // if (P[3].X > xh) xh = P[3].X;
920
- if (disc >= 0) {
921
- var t1 = (-b + Math.sqrt(disc)) / (2 * a);
922
- // alert("t1 " + t1);
923
- if (t1 > 0 && t1 < 1) {
924
- // var x1 = evalBez(PX, t1);
925
- // var x1 = bCurve.getPointAt(t1).x;
926
- var x1 = CubicBezierCurve.utils.evaluateT(p0, p1, p2, p3, t1); // bCurve.getPointAt(t1).x;
927
- if (x1 < xl)
928
- xl = x1;
929
- if (x1 > xh)
930
- xh = x1;
931
- }
932
- var t2 = (-b - Math.sqrt(disc)) / (2 * a);
933
- // alert("t2 " + t2);
934
- if (t2 > 0 && t2 < 1) {
935
- // var x2 = evalBez(PX, t2);
936
- // var x2 = bCurve.getPointAt(t2).x;
937
- var x2 = CubicBezierCurve.utils.evaluateT(p0, p1, p2, p3, t2); //
938
- if (x2 < xl)
939
- xl = x2;
940
- if (x2 > xh)
941
- xh = x2;
942
- }
943
- }
944
- return { min: xl, max: xh };
945
- },
946
- /**
947
- * Get the points of a sub curve at the given start end end offsets (values between 0.0 and 1.0).
948
- *
949
- * tStart >= tEnd is allowed, you will get a reversed sub curve then.
950
- *
951
- * @method getSubCurvePointsAt
952
- * @param {CubicBezierCurve} curve – The curve to get the sub curve points from.
953
- * @param {number} tStart – The start offset of the desired sub curve (must be in [0..1]).
954
- * @param {number} tEnd – The end offset if the desired cub curve (must be in [0..1]).
955
- * @instance
956
- * @memberof CubicBezierCurve
957
- * @return {CubicBezierCurve} The sub curve as a new curve.
958
- **/
959
- getSubCurvePointsAt: function (curve, tStart, tEnd) {
960
- var startVec = new Vector_1.Vector(curve.getPointAt(tStart), curve.getTangentAt(tStart));
961
- var endVec = new Vector_1.Vector(curve.getPointAt(tEnd), curve.getTangentAt(tEnd).inv());
962
- // Tangents are relative. Make absolute.
963
- startVec.b.add(startVec.a);
964
- endVec.b.add(endVec.a);
965
- // This 'splits' the curve at the given point at t.
966
- startVec.scale(0.33333333 * (tEnd - tStart));
967
- endVec.scale(0.33333333 * (tEnd - tStart));
968
- return [startVec.a, endVec.a, startVec.b, endVec.b];
969
- },
970
- /**
971
- * Compute the cubic roots for the given cubic polynomial coefficients.
972
- *
973
- * Based on
974
- * http://mysite.verizon.net/res148h4j/javascript/script_exact_cubic.html#the%20source%20code
975
- * Inspired by
976
- * https://www.particleincell.com/2013/cubic-line-intersection/
977
- * Thanks to Stephan Schmitt and Particle-In-Cell!
978
- *
979
- * @param poly
980
- * @returns
981
- */
982
- cubicRoots: function (poly) {
983
- var a = poly[0];
984
- var b = poly[1];
985
- var c = poly[2];
986
- var d = poly[3];
987
- var A = b / a;
988
- var B = c / a;
989
- var C = d / a;
990
- var S, T, Im;
991
- var Q = (3 * B - Math.pow(A, 2)) / 9;
992
- var R = (9 * A * B - 27 * C - 2 * Math.pow(A, 3)) / 54;
993
- var D = Math.pow(Q, 3) + Math.pow(R, 2); // polynomial discriminant
994
- var ts = []; // Array();
995
- if (D >= 0) {
996
- // complex or duplicate roots
997
- S = CubicBezierCurve.utils.sgn(R + Math.sqrt(D)) * Math.pow(Math.abs(R + Math.sqrt(D)), 1 / 3);
998
- T = CubicBezierCurve.utils.sgn(R - Math.sqrt(D)) * Math.pow(Math.abs(R - Math.sqrt(D)), 1 / 3);
999
- ts[0] = -A / 3 + (S + T); // real root
1000
- ts[1] = -A / 3 - (S + T) / 2; // real part of complex root
1001
- ts[2] = -A / 3 - (S + T) / 2; // real part of complex root
1002
- Im = Math.abs((Math.sqrt(3) * (S - T)) / 2); // complex part of root pair
1003
- // Mark complex roots to be discarded
1004
- if (Im != 0) {
1005
- ts[1] = -1;
1006
- ts[2] = -1;
1007
- }
1008
- } // distinct real roots
1009
- else {
1010
- var th = Math.acos(R / Math.sqrt(-Math.pow(Q, 3)));
1011
- ts[0] = 2 * Math.sqrt(-Q) * Math.cos(th / 3) - A / 3;
1012
- ts[1] = 2 * Math.sqrt(-Q) * Math.cos((th + 2 * Math.PI) / 3) - A / 3;
1013
- ts[2] = 2 * Math.sqrt(-Q) * Math.cos((th + 4 * Math.PI) / 3) - A / 3;
1014
- Im = 0.0;
1015
- }
1016
- // Discard all t's out of spec and sort the rest
1017
- return ts.filter(function (t) { return t >= 0 && t <= 1.0; }).sort();
1018
- },
1019
- /**
1020
- * Compute the Bézier coefficients from the given Bézier point coordinates.
1021
- *
1022
- * @param {number} p0 - The start point coordinate.
1023
- * @param {number} p1 - The start control point coordinate.
1024
- * @param {number} p2 - The end control point coordinate.
1025
- * @param {number} p3 - The end point coordinate.
1026
- * @returns {[number,number,number,number]}
1027
- */
1028
- bezierCoeffs: function (p0, p1, p2, p3) {
1029
- var coeffs = [NaN, NaN, NaN, NaN]; //Array(4);
1030
- coeffs[0] = -p0 + 3 * p1 + -3 * p2 + p3;
1031
- coeffs[1] = 3 * p0 - 6 * p1 + 3 * p2;
1032
- coeffs[2] = -3 * p0 + 3 * p1;
1033
- coeffs[3] = p0;
1034
- return coeffs;
1035
- },
1036
- /**
1037
- * Calculate the cubic polynomial coefficients used to find the bounding box.
1038
- *
1039
- * @param {number} p0 - The start point coordinate.
1040
- * @param {number} p1 - The start control point coordinate.
1041
- * @param {number} p2 - The end control point coordinate.
1042
- * @param {number} p3 - The end point coordinate.
1043
- * @returns {[number,number,number]}
1044
- */
1045
- cubicPoly: function (p0, p1, p2, p3) {
1046
- return [
1047
- 3 * p3 - 9 * p2 + 9 * p1 - 3 * p0,
1048
- 6 * p0 - 12 * p1 + 6 * p2,
1049
- 3 * p1 - 3 * p0
1050
- ];
1051
- },
1052
- /**
1053
- * sign of number, but is division safe: no zero returned :)
1054
- */
1055
- sgn: function (x) {
1056
- return x < 0.0 ? -1 : 1;
1057
- }
1058
- };
1059
- return CubicBezierCurve;
1060
- }());
1061
- exports.CubicBezierCurve = CubicBezierCurve;
1062
- //# sourceMappingURL=CubicBezierCurve.js.map