plotboilerplate 1.28.0 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1087) hide show
  1. package/README.md +8 -0
  2. package/dist/index.esm.js +335 -39
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.esm.min.js +1 -1
  5. package/dist/index.esm.min.js.map +1 -1
  6. package/dist/plotboilerplate.browser.min.js +1 -1
  7. package/dist/plotboilerplate.browser.min.js.map +1 -1
  8. package/dist/plotboilerplate.js +335 -37
  9. package/dist/plotboilerplate.min.js +1 -1
  10. package/package.json +1 -1
  11. package/src/cjs/Circle.d.ts +70 -3
  12. package/src/cjs/Circle.js +159 -4
  13. package/src/cjs/Circle.js.map +1 -1
  14. package/src/cjs/Triangle.d.ts +40 -4
  15. package/src/cjs/Triangle.js +127 -31
  16. package/src/cjs/Triangle.js.map +1 -1
  17. package/src/cjs/VertTuple.d.ts +4 -1
  18. package/src/cjs/VertTuple.js +6 -1
  19. package/src/cjs/VertTuple.js.map +1 -1
  20. package/src/cjs/Vertex.d.ts +25 -2
  21. package/src/cjs/Vertex.js +43 -1
  22. package/src/cjs/Vertex.js.map +1 -1
  23. package/src/cjs/utils/algorithms/minimalContainingCircleFromPoints.d.ts +21 -0
  24. package/src/cjs/utils/algorithms/minimalContainingCircleFromPoints.js +73 -0
  25. package/src/cjs/utils/algorithms/minimalContainingCircleFromPoints.js.map +1 -0
  26. package/src/cjs/utils/algorithms/minimalEnclosingCircleFromPoints.d.ts +21 -0
  27. package/src/cjs/utils/algorithms/minimalEnclosingCircleFromPoints.js +73 -0
  28. package/src/cjs/utils/algorithms/minimalEnclosingCircleFromPoints.js.map +1 -0
  29. package/src/cjs/utils/algorithms/pointsMinimalContainingCircle.d.ts +21 -0
  30. package/src/cjs/utils/algorithms/pointsMinimalContainingCircle.js +73 -0
  31. package/src/cjs/utils/algorithms/pointsMinimalContainingCircle.js.map +1 -0
  32. package/src/cjs/utils/algorithms/solveApollonius3.d.ts +69 -0
  33. package/src/cjs/utils/algorithms/solveApollonius3.js +118 -0
  34. package/src/cjs/utils/algorithms/solveApollonius3.js.map +1 -0
  35. package/src/esm/Circle.d.ts +70 -3
  36. package/src/esm/Circle.js +159 -4
  37. package/src/esm/Circle.js.map +1 -1
  38. package/src/esm/Triangle.d.ts +40 -4
  39. package/src/esm/Triangle.js +128 -32
  40. package/src/esm/Triangle.js.map +1 -1
  41. package/src/esm/VertTuple.d.ts +4 -1
  42. package/src/esm/VertTuple.js +6 -1
  43. package/src/esm/VertTuple.js.map +1 -1
  44. package/src/esm/Vertex.d.ts +25 -2
  45. package/src/esm/Vertex.js +44 -2
  46. package/src/esm/Vertex.js.map +1 -1
  47. package/src/esm/utils/algorithms/minimalContainingCircleFromPoints.d.ts +21 -0
  48. package/src/esm/utils/algorithms/minimalContainingCircleFromPoints.js +69 -0
  49. package/src/esm/utils/algorithms/minimalContainingCircleFromPoints.js.map +1 -0
  50. package/src/esm/utils/algorithms/minimalEnclosingCircleFromPoints.d.ts +21 -0
  51. package/src/esm/utils/algorithms/minimalEnclosingCircleFromPoints.js +69 -0
  52. package/src/esm/utils/algorithms/minimalEnclosingCircleFromPoints.js.map +1 -0
  53. package/src/esm/utils/algorithms/pointsMinimalContainingCircle.d.ts +21 -0
  54. package/src/esm/utils/algorithms/pointsMinimalContainingCircle.js +69 -0
  55. package/src/esm/utils/algorithms/pointsMinimalContainingCircle.js.map +1 -0
  56. package/src/esm/utils/algorithms/solveApollonius3.d.ts +69 -0
  57. package/src/esm/utils/algorithms/solveApollonius3.js +114 -0
  58. package/src/esm/utils/algorithms/solveApollonius3.js.map +1 -0
  59. package/src/index-gl.js +5 -2
  60. package/src/index.js +25 -17
  61. package/src/ts/Circle.ts +178 -5
  62. package/src/ts/Triangle.ts +148 -41
  63. package/src/ts/VertTuple.ts +14 -1
  64. package/src/ts/Vertex.ts +44 -2
  65. package/src/ts/utils/algorithms/minimalEnclosingCircleFromPoints.ts +69 -0
  66. package/src/ts/utils/algorithms/solveApollonius3.ts +132 -0
  67. package/src/_cjs/BezierPath.d.ts +0 -610
  68. package/src/_cjs/BezierPath.js +0 -1127
  69. package/src/_cjs/BezierPath.js.map +0 -1
  70. package/src/_cjs/Bounds.d.ts +0 -252
  71. package/src/_cjs/Bounds.js +0 -320
  72. package/src/_cjs/Bounds.js.map +0 -1
  73. package/src/_cjs/Circle.d.ts +0 -214
  74. package/src/_cjs/Circle.js +0 -339
  75. package/src/_cjs/Circle.js.map +0 -1
  76. package/src/_cjs/CircleSector.d.ts +0 -211
  77. package/src/_cjs/CircleSector.js +0 -364
  78. package/src/_cjs/CircleSector.js.map +0 -1
  79. package/src/_cjs/CubicBezierCurve.d.ts +0 -656
  80. package/src/_cjs/CubicBezierCurve.js +0 -1062
  81. package/src/_cjs/CubicBezierCurve.js.map +0 -1
  82. package/src/_cjs/Grid.d.ts +0 -83
  83. package/src/_cjs/Grid.js +0 -90
  84. package/src/_cjs/Grid.js.map +0 -1
  85. package/src/_cjs/KeyHandler.d.ts +0 -177
  86. package/src/_cjs/KeyHandler.js +0 -435
  87. package/src/_cjs/KeyHandler.js.map +0 -1
  88. package/src/_cjs/Line.d.ts +0 -134
  89. package/src/_cjs/Line.js +0 -220
  90. package/src/_cjs/Line.js.map +0 -1
  91. package/src/_cjs/MouseHandler.d.ts +0 -283
  92. package/src/_cjs/MouseHandler.js +0 -423
  93. package/src/_cjs/MouseHandler.js.map +0 -1
  94. package/src/_cjs/PBImage.d.ts +0 -81
  95. package/src/_cjs/PBImage.js +0 -61
  96. package/src/_cjs/PBImage.js.map +0 -1
  97. package/src/_cjs/PBText.d.ts +0 -118
  98. package/src/_cjs/PBText.js +0 -63
  99. package/src/_cjs/PBText.js.map +0 -1
  100. package/src/_cjs/PlotBoilerplate.d.ts +0 -899
  101. package/src/_cjs/PlotBoilerplate.js +0 -2348
  102. package/src/_cjs/PlotBoilerplate.js.map +0 -1
  103. package/src/_cjs/Polygon.d.ts +0 -520
  104. package/src/_cjs/Polygon.js +0 -933
  105. package/src/_cjs/Polygon.js.map +0 -1
  106. package/src/_cjs/SVGBuilder.d.ts +0 -47
  107. package/src/_cjs/SVGBuilder.js +0 -100
  108. package/src/_cjs/SVGBuilder.js.map +0 -1
  109. package/src/_cjs/Triangle.d.ts +0 -392
  110. package/src/_cjs/Triangle.js +0 -497
  111. package/src/_cjs/Triangle.js.map +0 -1
  112. package/src/_cjs/UIDGenerator.d.ts +0 -12
  113. package/src/_cjs/UIDGenerator.js +0 -21
  114. package/src/_cjs/UIDGenerator.js.map +0 -1
  115. package/src/_cjs/VEllipse.d.ts +0 -319
  116. package/src/_cjs/VEllipse.js +0 -578
  117. package/src/_cjs/VEllipse.js.map +0 -1
  118. package/src/_cjs/VEllipseSector.d.ts +0 -230
  119. package/src/_cjs/VEllipseSector.js +0 -428
  120. package/src/_cjs/VEllipseSector.js.map +0 -1
  121. package/src/_cjs/Vector.d.ts +0 -126
  122. package/src/_cjs/Vector.js +0 -199
  123. package/src/_cjs/Vector.js.map +0 -1
  124. package/src/_cjs/VertTuple.d.ts +0 -284
  125. package/src/_cjs/VertTuple.js +0 -348
  126. package/src/_cjs/VertTuple.js.map +0 -1
  127. package/src/_cjs/Vertex.d.ts +0 -498
  128. package/src/_cjs/Vertex.js +0 -703
  129. package/src/_cjs/Vertex.js.map +0 -1
  130. package/src/_cjs/VertexAttr.d.ts +0 -72
  131. package/src/_cjs/VertexAttr.js +0 -59
  132. package/src/_cjs/VertexAttr.js.map +0 -1
  133. package/src/_cjs/VertexListeners.d.ts +0 -208
  134. package/src/_cjs/VertexListeners.js +0 -267
  135. package/src/_cjs/VertexListeners.js.map +0 -1
  136. package/src/_cjs/draw.d.ts +0 -657
  137. package/src/_cjs/draw.js +0 -1164
  138. package/src/_cjs/draw.js.map +0 -1
  139. package/src/_cjs/drawgl.d.ts +0 -544
  140. package/src/_cjs/drawgl.js +0 -794
  141. package/src/_cjs/drawgl.js.map +0 -1
  142. package/src/_cjs/drawutilssvg.d.ts +0 -954
  143. package/src/_cjs/drawutilssvg.js +0 -1713
  144. package/src/_cjs/drawutilssvg.js.map +0 -1
  145. package/src/_cjs/entry-glsupport.js +0 -28
  146. package/src/_cjs/entry.js +0 -29
  147. package/src/_cjs/geomutils.d.ts +0 -77
  148. package/src/_cjs/geomutils.js +0 -126
  149. package/src/_cjs/geomutils.js.map +0 -1
  150. package/src/_cjs/index.d.ts +0 -102
  151. package/src/_cjs/index.js +0 -128
  152. package/src/_cjs/index.js.map +0 -1
  153. package/src/_cjs/interfaces/DrawLib.d.ts +0 -582
  154. package/src/_cjs/interfaces/DrawLib.js +0 -32
  155. package/src/_cjs/interfaces/DrawLib.js.map +0 -1
  156. package/src/_cjs/interfaces/additionals.d.ts +0 -95
  157. package/src/_cjs/interfaces/additionals.js +0 -3
  158. package/src/_cjs/interfaces/additionals.js.map +0 -1
  159. package/src/_cjs/interfaces/core.d.ts +0 -286
  160. package/src/_cjs/interfaces/core.js +0 -30
  161. package/src/_cjs/interfaces/core.js.map +0 -1
  162. package/src/_cjs/interfaces/externals.d.ts +0 -56
  163. package/src/_cjs/interfaces/externals.js +0 -8
  164. package/src/_cjs/interfaces/externals.js.map +0 -1
  165. package/src/_cjs/interfaces/index.d.ts +0 -4
  166. package/src/_cjs/interfaces/index.js +0 -21
  167. package/src/_cjs/interfaces/index.js.map +0 -1
  168. package/src/_cjs/module.d.ts +0 -26
  169. package/src/_cjs/module.js +0 -60
  170. package/src/_cjs/module.js.map +0 -1
  171. package/src/_cjs/utils/InitializationObserver.d.ts +0 -18
  172. package/src/_cjs/utils/InitializationObserver.js +0 -63
  173. package/src/_cjs/utils/InitializationObserver.js.map +0 -1
  174. package/src/_cjs/utils/LissajousFigure.d.ts +0 -34
  175. package/src/_cjs/utils/LissajousFigure.js +0 -100
  176. package/src/_cjs/utils/LissajousFigure.js.map +0 -1
  177. package/src/_cjs/utils/NGons.d.ts +0 -13
  178. package/src/_cjs/utils/NGons.js +0 -36
  179. package/src/_cjs/utils/NGons.js.map +0 -1
  180. package/src/_cjs/utils/Params.d.ts +0 -17
  181. package/src/_cjs/utils/Params.js +0 -53
  182. package/src/_cjs/utils/Params.js.map +0 -1
  183. package/src/_cjs/utils/PerlinNoise.d.ts +0 -19
  184. package/src/_cjs/utils/PerlinNoise.js +0 -352
  185. package/src/_cjs/utils/PerlinNoise.js.map +0 -1
  186. package/src/_cjs/utils/SVGPathUtils.d.ts +0 -22
  187. package/src/_cjs/utils/SVGPathUtils.js +0 -45
  188. package/src/_cjs/utils/SVGPathUtils.js.map +0 -1
  189. package/src/_cjs/utils/WebColors.d.ts +0 -35
  190. package/src/_cjs/utils/WebColors.js +0 -58
  191. package/src/_cjs/utils/WebColors.js.map +0 -1
  192. package/src/_cjs/utils/WebColorsContrast.d.ts +0 -6
  193. package/src/_cjs/utils/WebColorsContrast.js +0 -12
  194. package/src/_cjs/utils/WebColorsContrast.js.map +0 -1
  195. package/src/_cjs/utils/WebColorsMalachite.d.ts +0 -12
  196. package/src/_cjs/utils/WebColorsMalachite.js +0 -28
  197. package/src/_cjs/utils/WebColorsMalachite.js.map +0 -1
  198. package/src/_cjs/utils/_gup.js_ +0 -13
  199. package/src/_cjs/utils/algorithms/CatmullRomPath.d.ts +0 -60
  200. package/src/_cjs/utils/algorithms/CatmullRomPath.js +0 -108
  201. package/src/_cjs/utils/algorithms/CatmullRomPath.js.map +0 -1
  202. package/src/_cjs/utils/algorithms/CircleIntersections.d.ts +0 -170
  203. package/src/_cjs/utils/algorithms/CircleIntersections.js +0 -310
  204. package/src/_cjs/utils/algorithms/CircleIntersections.js.map +0 -1
  205. package/src/_cjs/utils/algorithms/ContourLineDetection.d.ts +0 -150
  206. package/src/_cjs/utils/algorithms/ContourLineDetection.js +0 -367
  207. package/src/_cjs/utils/algorithms/ContourLineDetection.js.map +0 -1
  208. package/src/_cjs/utils/algorithms/CubicSplinePath.d.ts +0 -63
  209. package/src/_cjs/utils/algorithms/CubicSplinePath.js +0 -175
  210. package/src/_cjs/utils/algorithms/CubicSplinePath.js.map +0 -1
  211. package/src/_cjs/utils/algorithms/HobbyPath.d.ts +0 -81
  212. package/src/_cjs/utils/algorithms/HobbyPath.js +0 -278
  213. package/src/_cjs/utils/algorithms/HobbyPath.js.map +0 -1
  214. package/src/_cjs/utils/algorithms/Metaballs.d.ts +0 -30
  215. package/src/_cjs/utils/algorithms/Metaballs.js +0 -114
  216. package/src/_cjs/utils/algorithms/Metaballs.js.map +0 -1
  217. package/src/_cjs/utils/algorithms/PolygonInset.d.ts +0 -184
  218. package/src/_cjs/utils/algorithms/PolygonInset.js +0 -431
  219. package/src/_cjs/utils/algorithms/PolygonInset.js.map +0 -1
  220. package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.d.ts +0 -145
  221. package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.js +0 -269
  222. package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.js.map +0 -1
  223. package/src/_cjs/utils/algorithms/arrayFill.d.ts +0 -8
  224. package/src/_cjs/utils/algorithms/arrayFill.js +0 -18
  225. package/src/_cjs/utils/algorithms/arrayFill.js.map +0 -1
  226. package/src/_cjs/utils/algorithms/arrayResize.d.ts +0 -8
  227. package/src/_cjs/utils/algorithms/arrayResize.js +0 -24
  228. package/src/_cjs/utils/algorithms/arrayResize.js.map +0 -1
  229. package/src/_cjs/utils/algorithms/arrayShuffle.d.ts +0 -8
  230. package/src/_cjs/utils/algorithms/arrayShuffle.js +0 -15
  231. package/src/_cjs/utils/algorithms/arrayShuffle.js.map +0 -1
  232. package/src/_cjs/utils/algorithms/clearDuplicateVertices.d.ts +0 -22
  233. package/src/_cjs/utils/algorithms/clearDuplicateVertices.js +0 -51
  234. package/src/_cjs/utils/algorithms/clearDuplicateVertices.js.map +0 -1
  235. package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.d.ts +0 -24
  236. package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.js +0 -61
  237. package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.js.map +0 -1
  238. package/src/_cjs/utils/algorithms/convexHull.d.ts +0 -23
  239. package/src/_cjs/utils/algorithms/convexHull.js +0 -71
  240. package/src/_cjs/utils/algorithms/convexHull.js.map +0 -1
  241. package/src/_cjs/utils/algorithms/convexPolygonIncircle.d.ts +0 -41
  242. package/src/_cjs/utils/algorithms/convexPolygonIncircle.js +0 -145
  243. package/src/_cjs/utils/algorithms/convexPolygonIncircle.js.map +0 -1
  244. package/src/_cjs/utils/algorithms/delaunay.d.ts +0 -30
  245. package/src/_cjs/utils/algorithms/delaunay.js +0 -158
  246. package/src/_cjs/utils/algorithms/delaunay.js.map +0 -1
  247. package/src/_cjs/utils/algorithms/delaunay2voronoi.d.ts +0 -25
  248. package/src/_cjs/utils/algorithms/delaunay2voronoi.js +0 -104
  249. package/src/_cjs/utils/algorithms/delaunay2voronoi.js.map +0 -1
  250. package/src/_cjs/utils/algorithms/detectPaths.d.ts +0 -21
  251. package/src/_cjs/utils/algorithms/detectPaths.js +0 -169
  252. package/src/_cjs/utils/algorithms/detectPaths.js.map +0 -1
  253. package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.d.ts +0 -21
  254. package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.js +0 -51
  255. package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.js.map +0 -1
  256. package/src/_cjs/utils/algorithms/getContrastColor.d.ts +0 -13
  257. package/src/_cjs/utils/algorithms/getContrastColor.js +0 -26
  258. package/src/_cjs/utils/algorithms/getContrastColor.js.map +0 -1
  259. package/src/_cjs/utils/algorithms/matrixFill.d.ts +0 -10
  260. package/src/_cjs/utils/algorithms/matrixFill.js +0 -21
  261. package/src/_cjs/utils/algorithms/matrixFill.js.map +0 -1
  262. package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.d.ts +0 -23
  263. package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.js +0 -270
  264. package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.js.map +0 -1
  265. package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.d.ts +0 -28
  266. package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.js +0 -102
  267. package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.js.map +0 -1
  268. package/src/_cjs/utils/algorithms/sutherlandHodgman.d.ts +0 -16
  269. package/src/_cjs/utils/algorithms/sutherlandHodgman.js +0 -76
  270. package/src/_cjs/utils/algorithms/sutherlandHodgman.js.map +0 -1
  271. package/src/_cjs/utils/cloneVertexArray.d.ts +0 -13
  272. package/src/_cjs/utils/cloneVertexArray.js +0 -23
  273. package/src/_cjs/utils/cloneVertexArray.js.map +0 -1
  274. package/src/_cjs/utils/createRandomizedPolygon.d.ts +0 -14
  275. package/src/_cjs/utils/createRandomizedPolygon.js +0 -32
  276. package/src/_cjs/utils/createRandomizedPolygon.js.map +0 -1
  277. package/src/_cjs/utils/creategui.js +0 -434
  278. package/src/_cjs/utils/dat.gui.arrowbounce.polyfill.js +0 -128
  279. package/src/_cjs/utils/dat.gui.title.polyfill.js +0 -35
  280. package/src/_cjs/utils/datastructures/CircularIntervalSet.d.ts +0 -83
  281. package/src/_cjs/utils/datastructures/CircularIntervalSet.js +0 -163
  282. package/src/_cjs/utils/datastructures/CircularIntervalSet.js.map +0 -1
  283. package/src/_cjs/utils/datastructures/Color.d.ts +0 -391
  284. package/src/_cjs/utils/datastructures/Color.js +0 -1084
  285. package/src/_cjs/utils/datastructures/Color.js.map +0 -1
  286. package/src/_cjs/utils/datastructures/ColorGradient.d.ts +0 -81
  287. package/src/_cjs/utils/datastructures/ColorGradient.js +0 -176
  288. package/src/_cjs/utils/datastructures/ColorGradient.js.map +0 -1
  289. package/src/_cjs/utils/datastructures/DataGrid2d.d.ts +0 -53
  290. package/src/_cjs/utils/datastructures/DataGrid2d.js +0 -20
  291. package/src/_cjs/utils/datastructures/DataGrid2d.js.map +0 -1
  292. package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.d.ts +0 -88
  293. package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.js +0 -155
  294. package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.js.map +0 -1
  295. package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.d.ts +0 -59
  296. package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.js +0 -84
  297. package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.js.map +0 -1
  298. package/src/_cjs/utils/datastructures/GenericPath.d.ts +0 -86
  299. package/src/_cjs/utils/datastructures/GenericPath.js +0 -122
  300. package/src/_cjs/utils/datastructures/GenericPath.js.map +0 -1
  301. package/src/_cjs/utils/datastructures/GeometryMesh.d.ts +0 -49
  302. package/src/_cjs/utils/datastructures/GeometryMesh.js +0 -58
  303. package/src/_cjs/utils/datastructures/GeometryMesh.js.map +0 -1
  304. package/src/_cjs/utils/datastructures/Girih.d.ts +0 -181
  305. package/src/_cjs/utils/datastructures/Girih.js +0 -266
  306. package/src/_cjs/utils/datastructures/Girih.js.map +0 -1
  307. package/src/_cjs/utils/datastructures/GirihBowtie.d.ts +0 -37
  308. package/src/_cjs/utils/datastructures/GirihBowtie.js +0 -152
  309. package/src/_cjs/utils/datastructures/GirihBowtie.js.map +0 -1
  310. package/src/_cjs/utils/datastructures/GirihDecagon.d.ts +0 -52
  311. package/src/_cjs/utils/datastructures/GirihDecagon.js +0 -132
  312. package/src/_cjs/utils/datastructures/GirihDecagon.js.map +0 -1
  313. package/src/_cjs/utils/datastructures/GirihHexagon.d.ts +0 -39
  314. package/src/_cjs/utils/datastructures/GirihHexagon.js +0 -200
  315. package/src/_cjs/utils/datastructures/GirihHexagon.js.map +0 -1
  316. package/src/_cjs/utils/datastructures/GirihPenroseRhombus.d.ts +0 -46
  317. package/src/_cjs/utils/datastructures/GirihPenroseRhombus.js +0 -189
  318. package/src/_cjs/utils/datastructures/GirihPenroseRhombus.js.map +0 -1
  319. package/src/_cjs/utils/datastructures/GirihPentagon.d.ts +0 -37
  320. package/src/_cjs/utils/datastructures/GirihPentagon.js +0 -109
  321. package/src/_cjs/utils/datastructures/GirihPentagon.js.map +0 -1
  322. package/src/_cjs/utils/datastructures/GirihRhombus.d.ts +0 -38
  323. package/src/_cjs/utils/datastructures/GirihRhombus.js +0 -155
  324. package/src/_cjs/utils/datastructures/GirihRhombus.js.map +0 -1
  325. package/src/_cjs/utils/datastructures/GirihTile.d.ts +0 -283
  326. package/src/_cjs/utils/datastructures/GirihTile.js +0 -308
  327. package/src/_cjs/utils/datastructures/GirihTile.js.map +0 -1
  328. package/src/_cjs/utils/datastructures/Matrix4x4.d.ts +0 -244
  329. package/src/_cjs/utils/datastructures/Matrix4x4.js +0 -262
  330. package/src/_cjs/utils/datastructures/Matrix4x4.js.map +0 -1
  331. package/src/_cjs/utils/datastructures/VoronoiCell.d.ts +0 -122
  332. package/src/_cjs/utils/datastructures/VoronoiCell.js +0 -183
  333. package/src/_cjs/utils/datastructures/VoronoiCell.js.map +0 -1
  334. package/src/_cjs/utils/datastructures/interfaces.d.ts +0 -13
  335. package/src/_cjs/utils/datastructures/interfaces.js +0 -10
  336. package/src/_cjs/utils/datastructures/interfaces.js.map +0 -1
  337. package/src/_cjs/utils/detectDarkMode.d.ts +0 -10
  338. package/src/_cjs/utils/detectDarkMode.js +0 -41
  339. package/src/_cjs/utils/detectDarkMode.js.map +0 -1
  340. package/src/_cjs/utils/dom/components/ColorGradientPicker.d.ts +0 -246
  341. package/src/_cjs/utils/dom/components/ColorGradientPicker.js +0 -667
  342. package/src/_cjs/utils/dom/components/ColorGradientPicker.js.map +0 -1
  343. package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.d.ts +0 -129
  344. package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.js +0 -520
  345. package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.js.map +0 -1
  346. package/src/_cjs/utils/dom/components/ColorGradientSelector.d.ts +0 -118
  347. package/src/_cjs/utils/dom/components/ColorGradientSelector.js +0 -327
  348. package/src/_cjs/utils/dom/components/ColorGradientSelector.js.map +0 -1
  349. package/src/_cjs/utils/dom/components/Test.d.ts +0 -7
  350. package/src/_cjs/utils/dom/components/Test.js +0 -30
  351. package/src/_cjs/utils/dom/components/Test.js.map +0 -1
  352. package/src/_cjs/utils/dom/getAvailableContainerSpace.d.ts +0 -2
  353. package/src/_cjs/utils/dom/getAvailableContainerSpace.js +0 -29
  354. package/src/_cjs/utils/dom/getAvailableContainerSpace.js.map +0 -1
  355. package/src/_cjs/utils/dom/getFProp.d.ts +0 -5
  356. package/src/_cjs/utils/dom/getFProp.js +0 -12
  357. package/src/_cjs/utils/dom/getFProp.js.map +0 -1
  358. package/src/_cjs/utils/dom/guiSizeToggler.d.ts +0 -18
  359. package/src/_cjs/utils/dom/guiSizeToggler.js +0 -44
  360. package/src/_cjs/utils/dom/guiSizeToggler.js.map +0 -1
  361. package/src/_cjs/utils/findInVertexArray.d.ts +0 -19
  362. package/src/_cjs/utils/findInVertexArray.js +0 -29
  363. package/src/_cjs/utils/findInVertexArray.js.map +0 -1
  364. package/src/_cjs/utils/getFProp.d.ts +0 -5
  365. package/src/_cjs/utils/getFProp.js +0 -12
  366. package/src/_cjs/utils/getFProp.js.map +0 -1
  367. package/src/_cjs/utils/gup.d.ts +0 -14
  368. package/src/_cjs/utils/gup.js +0 -31
  369. package/src/_cjs/utils/gup.js.map +0 -1
  370. package/src/_cjs/utils/helpers/BezierPathInteractionHelper.d.ts +0 -272
  371. package/src/_cjs/utils/helpers/BezierPathInteractionHelper.js +0 -655
  372. package/src/_cjs/utils/helpers/BezierPathInteractionHelper.js.map +0 -1
  373. package/src/_cjs/utils/helpers/CircleHelper.d.ts +0 -73
  374. package/src/_cjs/utils/helpers/CircleHelper.js +0 -93
  375. package/src/_cjs/utils/helpers/CircleHelper.js.map +0 -1
  376. package/src/_cjs/utils/helpers/CircleSectorHelper.d.ts +0 -90
  377. package/src/_cjs/utils/helpers/CircleSectorHelper.js +0 -114
  378. package/src/_cjs/utils/helpers/CircleSectorHelper.js.map +0 -1
  379. package/src/_cjs/utils/helpers/TriangleHelper.d.ts +0 -57
  380. package/src/_cjs/utils/helpers/TriangleHelper.js +0 -83
  381. package/src/_cjs/utils/helpers/TriangleHelper.js.map +0 -1
  382. package/src/_cjs/utils/helpers/VEllipseHelper.d.ts +0 -32
  383. package/src/_cjs/utils/helpers/VEllipseHelper.js +0 -88
  384. package/src/_cjs/utils/helpers/VEllipseHelper.js.map +0 -1
  385. package/src/_cjs/utils/helpers/VEllipseSectorHelper.d.ts +0 -52
  386. package/src/_cjs/utils/helpers/VEllipseSectorHelper.js +0 -135
  387. package/src/_cjs/utils/helpers/VEllipseSectorHelper.js.map +0 -1
  388. package/src/_cjs/utils/io/DndFileHandler.d.ts +0 -63
  389. package/src/_cjs/utils/io/DndFileHandler.js +0 -112
  390. package/src/_cjs/utils/io/DndFileHandler.js.map +0 -1
  391. package/src/_cjs/utils/io/FileDrop.d.ts +0 -110
  392. package/src/_cjs/utils/io/FileDrop.js +0 -177
  393. package/src/_cjs/utils/io/FileDrop.js.map +0 -1
  394. package/src/_cjs/utils/lil.gui.arrowbounce.polyfill.js +0 -133
  395. package/src/_cjs/utils/lil.gui.title.polyfill.js +0 -32
  396. package/src/_cjs/utils/module.js +0 -18
  397. package/src/_cjs/utils/parsers/LinearColorGradientParser.d.ts +0 -78
  398. package/src/_cjs/utils/parsers/LinearColorGradientParser.js +0 -224
  399. package/src/_cjs/utils/parsers/LinearColorGradientParser.js.map +0 -1
  400. package/src/_cjs/utils/parsers/OBJParser.d.ts +0 -24
  401. package/src/_cjs/utils/parsers/OBJParser.js +0 -77
  402. package/src/_cjs/utils/parsers/OBJParser.js.map +0 -1
  403. package/src/_cjs/utils/parsers/STLParser.d.ts +0 -61
  404. package/src/_cjs/utils/parsers/STLParser.js +0 -182
  405. package/src/_cjs/utils/parsers/STLParser.js.map +0 -1
  406. package/src/_cjs/utils/parsers/svg/parseSVGPathData.d.ts +0 -27
  407. package/src/_cjs/utils/parsers/svg/parseSVGPathData.js +0 -486
  408. package/src/_cjs/utils/parsers/svg/parseSVGPathData.js.map +0 -1
  409. package/src/_cjs/utils/parsers/svg/splitSVGPathData.d.ts +0 -20
  410. package/src/_cjs/utils/parsers/svg/splitSVGPathData.js +0 -53
  411. package/src/_cjs/utils/parsers/svg/splitSVGPathData.js.map +0 -1
  412. package/src/_cjs/utils/parsers/svg/types.d.ts +0 -63
  413. package/src/_cjs/utils/parsers/svg/types.js +0 -17
  414. package/src/_cjs/utils/parsers/svg/types.js.map +0 -1
  415. package/src/_cjs/utils/ts-runner.js +0 -146
  416. package/src/_cjs/utils/tsAsyncScriptLoader.js +0 -74
  417. package/src/_esm/BezierPath.d.ts +0 -610
  418. package/src/_esm/BezierPath.js +0 -1124
  419. package/src/_esm/BezierPath.js.map +0 -1
  420. package/src/_esm/Bounds.d.ts +0 -252
  421. package/src/_esm/Bounds.js +0 -317
  422. package/src/_esm/Bounds.js.map +0 -1
  423. package/src/_esm/Circle.d.ts +0 -214
  424. package/src/_esm/Circle.js +0 -335
  425. package/src/_esm/Circle.js.map +0 -1
  426. package/src/_esm/CircleSector.d.ts +0 -211
  427. package/src/_esm/CircleSector.js +0 -359
  428. package/src/_esm/CircleSector.js.map +0 -1
  429. package/src/_esm/CubicBezierCurve.d.ts +0 -656
  430. package/src/_esm/CubicBezierCurve.js +0 -1057
  431. package/src/_esm/CubicBezierCurve.js.map +0 -1
  432. package/src/_esm/Grid.d.ts +0 -83
  433. package/src/_esm/Grid.js +0 -89
  434. package/src/_esm/Grid.js.map +0 -1
  435. package/src/_esm/KeyHandler.d.ts +0 -177
  436. package/src/_esm/KeyHandler.js +0 -434
  437. package/src/_esm/KeyHandler.js.map +0 -1
  438. package/src/_esm/Line.d.ts +0 -134
  439. package/src/_esm/Line.js +0 -200
  440. package/src/_esm/Line.js.map +0 -1
  441. package/src/_esm/MouseHandler.d.ts +0 -283
  442. package/src/_esm/MouseHandler.js +0 -397
  443. package/src/_esm/MouseHandler.js.map +0 -1
  444. package/src/_esm/PBImage.d.ts +0 -81
  445. package/src/_esm/PBImage.js +0 -60
  446. package/src/_esm/PBImage.js.map +0 -1
  447. package/src/_esm/PBText.d.ts +0 -118
  448. package/src/_esm/PBText.js +0 -62
  449. package/src/_esm/PBText.js.map +0 -1
  450. package/src/_esm/PlotBoilerplate.d.ts +0 -899
  451. package/src/_esm/PlotBoilerplate.js +0 -2347
  452. package/src/_esm/PlotBoilerplate.js.map +0 -1
  453. package/src/_esm/Polygon.d.ts +0 -520
  454. package/src/_esm/Polygon.js +0 -924
  455. package/src/_esm/Polygon.js.map +0 -1
  456. package/src/_esm/SVGBuilder.d.ts +0 -47
  457. package/src/_esm/SVGBuilder.js +0 -95
  458. package/src/_esm/SVGBuilder.js.map +0 -1
  459. package/src/_esm/Triangle.d.ts +0 -392
  460. package/src/_esm/Triangle.js +0 -493
  461. package/src/_esm/Triangle.js.map +0 -1
  462. package/src/_esm/UIDGenerator.d.ts +0 -12
  463. package/src/_esm/UIDGenerator.js +0 -18
  464. package/src/_esm/UIDGenerator.js.map +0 -1
  465. package/src/_esm/VEllipse.d.ts +0 -319
  466. package/src/_esm/VEllipse.js +0 -574
  467. package/src/_esm/VEllipse.js.map +0 -1
  468. package/src/_esm/VEllipseSector.d.ts +0 -230
  469. package/src/_esm/VEllipseSector.js +0 -422
  470. package/src/_esm/VEllipseSector.js.map +0 -1
  471. package/src/_esm/Vector.d.ts +0 -126
  472. package/src/_esm/Vector.js +0 -181
  473. package/src/_esm/Vector.js.map +0 -1
  474. package/src/_esm/VertTuple.d.ts +0 -284
  475. package/src/_esm/VertTuple.js +0 -347
  476. package/src/_esm/VertTuple.js.map +0 -1
  477. package/src/_esm/Vertex.d.ts +0 -498
  478. package/src/_esm/Vertex.js +0 -702
  479. package/src/_esm/Vertex.js.map +0 -1
  480. package/src/_esm/VertexAttr.d.ts +0 -72
  481. package/src/_esm/VertexAttr.js +0 -58
  482. package/src/_esm/VertexAttr.js.map +0 -1
  483. package/src/_esm/VertexListeners.d.ts +0 -209
  484. package/src/_esm/VertexListeners.js +0 -270
  485. package/src/_esm/VertexListeners.js.map +0 -1
  486. package/src/_esm/draw.d.ts +0 -657
  487. package/src/_esm/draw.js +0 -1159
  488. package/src/_esm/draw.js.map +0 -1
  489. package/src/_esm/drawgl.d.ts +0 -544
  490. package/src/_esm/drawgl.js +0 -812
  491. package/src/_esm/drawgl.js.map +0 -1
  492. package/src/_esm/drawutilssvg.d.ts +0 -954
  493. package/src/_esm/drawutilssvg.js +0 -1705
  494. package/src/_esm/drawutilssvg.js.map +0 -1
  495. package/src/_esm/entry-glsupport.js +0 -28
  496. package/src/_esm/entry.js +0 -29
  497. package/src/_esm/geomutils.d.ts +0 -77
  498. package/src/_esm/geomutils.js +0 -126
  499. package/src/_esm/geomutils.js.map +0 -1
  500. package/src/_esm/index.d.ts +0 -102
  501. package/src/_esm/index.js +0 -128
  502. package/src/_esm/index.js.map +0 -1
  503. package/src/_esm/interfaces/DrawLib.d.ts +0 -582
  504. package/src/_esm/interfaces/DrawLib.js +0 -32
  505. package/src/_esm/interfaces/DrawLib.js.map +0 -1
  506. package/src/_esm/interfaces/additionals.d.ts +0 -95
  507. package/src/_esm/interfaces/additionals.js +0 -3
  508. package/src/_esm/interfaces/additionals.js.map +0 -1
  509. package/src/_esm/interfaces/core.d.ts +0 -286
  510. package/src/_esm/interfaces/core.js +0 -30
  511. package/src/_esm/interfaces/core.js.map +0 -1
  512. package/src/_esm/interfaces/externals.d.ts +0 -56
  513. package/src/_esm/interfaces/externals.js +0 -8
  514. package/src/_esm/interfaces/externals.js.map +0 -1
  515. package/src/_esm/interfaces/index.d.ts +0 -4
  516. package/src/_esm/interfaces/index.js +0 -21
  517. package/src/_esm/interfaces/index.js.map +0 -1
  518. package/src/_esm/module.d.ts +0 -26
  519. package/src/_esm/module.js +0 -60
  520. package/src/_esm/module.js.map +0 -1
  521. package/src/_esm/src/ts/BezierPath.d.ts +0 -610
  522. package/src/_esm/src/ts/BezierPath.js +0 -1120
  523. package/src/_esm/src/ts/BezierPath.js.map +0 -1
  524. package/src/_esm/src/ts/Bounds.d.ts +0 -252
  525. package/src/_esm/src/ts/Bounds.js +0 -313
  526. package/src/_esm/src/ts/Bounds.js.map +0 -1
  527. package/src/_esm/src/ts/Circle.d.ts +0 -214
  528. package/src/_esm/src/ts/Circle.js +0 -331
  529. package/src/_esm/src/ts/Circle.js.map +0 -1
  530. package/src/_esm/src/ts/CircleSector.d.ts +0 -211
  531. package/src/_esm/src/ts/CircleSector.js +0 -355
  532. package/src/_esm/src/ts/CircleSector.js.map +0 -1
  533. package/src/_esm/src/ts/CubicBezierCurve.d.ts +0 -656
  534. package/src/_esm/src/ts/CubicBezierCurve.js +0 -1053
  535. package/src/_esm/src/ts/CubicBezierCurve.js.map +0 -1
  536. package/src/_esm/src/ts/Grid.d.ts +0 -83
  537. package/src/_esm/src/ts/Grid.js +0 -85
  538. package/src/_esm/src/ts/Grid.js.map +0 -1
  539. package/src/_esm/src/ts/KeyHandler.d.ts +0 -177
  540. package/src/_esm/src/ts/KeyHandler.js +0 -430
  541. package/src/_esm/src/ts/KeyHandler.js.map +0 -1
  542. package/src/_esm/src/ts/Line.d.ts +0 -134
  543. package/src/_esm/src/ts/Line.js +0 -196
  544. package/src/_esm/src/ts/Line.js.map +0 -1
  545. package/src/_esm/src/ts/MouseHandler.d.ts +0 -283
  546. package/src/_esm/src/ts/MouseHandler.js +0 -391
  547. package/src/_esm/src/ts/MouseHandler.js.map +0 -1
  548. package/src/_esm/src/ts/PBImage.d.ts +0 -81
  549. package/src/_esm/src/ts/PBImage.js +0 -56
  550. package/src/_esm/src/ts/PBImage.js.map +0 -1
  551. package/src/_esm/src/ts/PBText.d.ts +0 -118
  552. package/src/_esm/src/ts/PBText.js +0 -58
  553. package/src/_esm/src/ts/PBText.js.map +0 -1
  554. package/src/_esm/src/ts/PlotBoilerplate.d.ts +0 -899
  555. package/src/_esm/src/ts/PlotBoilerplate.js +0 -2340
  556. package/src/_esm/src/ts/PlotBoilerplate.js.map +0 -1
  557. package/src/_esm/src/ts/Polygon.d.ts +0 -520
  558. package/src/_esm/src/ts/Polygon.js +0 -920
  559. package/src/_esm/src/ts/Polygon.js.map +0 -1
  560. package/src/_esm/src/ts/Triangle.d.ts +0 -392
  561. package/src/_esm/src/ts/Triangle.js +0 -489
  562. package/src/_esm/src/ts/Triangle.js.map +0 -1
  563. package/src/_esm/src/ts/UIDGenerator.d.ts +0 -12
  564. package/src/_esm/src/ts/UIDGenerator.js +0 -14
  565. package/src/_esm/src/ts/UIDGenerator.js.map +0 -1
  566. package/src/_esm/src/ts/VEllipse.d.ts +0 -319
  567. package/src/_esm/src/ts/VEllipse.js +0 -570
  568. package/src/_esm/src/ts/VEllipse.js.map +0 -1
  569. package/src/_esm/src/ts/VEllipseSector.d.ts +0 -230
  570. package/src/_esm/src/ts/VEllipseSector.js +0 -418
  571. package/src/_esm/src/ts/VEllipseSector.js.map +0 -1
  572. package/src/_esm/src/ts/Vector.d.ts +0 -126
  573. package/src/_esm/src/ts/Vector.js +0 -177
  574. package/src/_esm/src/ts/Vector.js.map +0 -1
  575. package/src/_esm/src/ts/VertTuple.d.ts +0 -284
  576. package/src/_esm/src/ts/VertTuple.js +0 -343
  577. package/src/_esm/src/ts/VertTuple.js.map +0 -1
  578. package/src/_esm/src/ts/Vertex.d.ts +0 -498
  579. package/src/_esm/src/ts/Vertex.js +0 -698
  580. package/src/_esm/src/ts/Vertex.js.map +0 -1
  581. package/src/_esm/src/ts/VertexAttr.d.ts +0 -72
  582. package/src/_esm/src/ts/VertexAttr.js +0 -54
  583. package/src/_esm/src/ts/VertexAttr.js.map +0 -1
  584. package/src/_esm/src/ts/VertexListeners.d.ts +0 -209
  585. package/src/_esm/src/ts/VertexListeners.js +0 -266
  586. package/src/_esm/src/ts/VertexListeners.js.map +0 -1
  587. package/src/_esm/src/ts/draw.d.ts +0 -657
  588. package/src/_esm/src/ts/draw.js +0 -1155
  589. package/src/_esm/src/ts/draw.js.map +0 -1
  590. package/src/_esm/src/ts/drawgl.d.ts +0 -544
  591. package/src/_esm/src/ts/drawgl.js +0 -808
  592. package/src/_esm/src/ts/drawgl.js.map +0 -1
  593. package/src/_esm/src/ts/drawutilssvg.d.ts +0 -954
  594. package/src/_esm/src/ts/drawutilssvg.js +0 -1701
  595. package/src/_esm/src/ts/drawutilssvg.js.map +0 -1
  596. package/src/_esm/src/ts/geomutils.d.ts +0 -77
  597. package/src/_esm/src/ts/geomutils.js +0 -123
  598. package/src/_esm/src/ts/geomutils.js.map +0 -1
  599. package/src/_esm/src/ts/index.d.ts +0 -102
  600. package/src/_esm/src/ts/index.js +0 -112
  601. package/src/_esm/src/ts/index.js.map +0 -1
  602. package/src/_esm/src/ts/interfaces/DrawLib.d.ts +0 -582
  603. package/src/_esm/src/ts/interfaces/DrawLib.js +0 -31
  604. package/src/_esm/src/ts/interfaces/DrawLib.js.map +0 -1
  605. package/src/_esm/src/ts/interfaces/additionals.d.ts +0 -95
  606. package/src/_esm/src/ts/interfaces/additionals.js +0 -2
  607. package/src/_esm/src/ts/interfaces/additionals.js.map +0 -1
  608. package/src/_esm/src/ts/interfaces/core.d.ts +0 -286
  609. package/src/_esm/src/ts/interfaces/core.js +0 -29
  610. package/src/_esm/src/ts/interfaces/core.js.map +0 -1
  611. package/src/_esm/src/ts/interfaces/externals.d.ts +0 -56
  612. package/src/_esm/src/ts/interfaces/externals.js +0 -7
  613. package/src/_esm/src/ts/interfaces/externals.js.map +0 -1
  614. package/src/_esm/src/ts/interfaces/index.d.ts +0 -4
  615. package/src/_esm/src/ts/interfaces/index.js +0 -5
  616. package/src/_esm/src/ts/interfaces/index.js.map +0 -1
  617. package/src/_esm/src/ts/module.d.ts +0 -26
  618. package/src/_esm/src/ts/module.js +0 -38
  619. package/src/_esm/src/ts/module.js.map +0 -1
  620. package/src/_esm/src/ts/utils/InitializationObserver.d.ts +0 -18
  621. package/src/_esm/src/ts/utils/InitializationObserver.js +0 -57
  622. package/src/_esm/src/ts/utils/InitializationObserver.js.map +0 -1
  623. package/src/_esm/src/ts/utils/LissajousFigure.d.ts +0 -34
  624. package/src/_esm/src/ts/utils/LissajousFigure.js +0 -95
  625. package/src/_esm/src/ts/utils/LissajousFigure.js.map +0 -1
  626. package/src/_esm/src/ts/utils/NGons.d.ts +0 -13
  627. package/src/_esm/src/ts/utils/NGons.js +0 -33
  628. package/src/_esm/src/ts/utils/NGons.js.map +0 -1
  629. package/src/_esm/src/ts/utils/Params.d.ts +0 -17
  630. package/src/_esm/src/ts/utils/Params.js +0 -48
  631. package/src/_esm/src/ts/utils/Params.js.map +0 -1
  632. package/src/_esm/src/ts/utils/PerlinNoise.d.ts +0 -19
  633. package/src/_esm/src/ts/utils/PerlinNoise.js +0 -346
  634. package/src/_esm/src/ts/utils/PerlinNoise.js.map +0 -1
  635. package/src/_esm/src/ts/utils/SVGPathUtils.d.ts +0 -22
  636. package/src/_esm/src/ts/utils/SVGPathUtils.js +0 -42
  637. package/src/_esm/src/ts/utils/SVGPathUtils.js.map +0 -1
  638. package/src/_esm/src/ts/utils/WebColors.d.ts +0 -35
  639. package/src/_esm/src/ts/utils/WebColors.js +0 -54
  640. package/src/_esm/src/ts/utils/WebColors.js.map +0 -1
  641. package/src/_esm/src/ts/utils/WebColorsContrast.d.ts +0 -6
  642. package/src/_esm/src/ts/utils/WebColorsContrast.js +0 -9
  643. package/src/_esm/src/ts/utils/WebColorsContrast.js.map +0 -1
  644. package/src/_esm/src/ts/utils/WebColorsMalachite.d.ts +0 -12
  645. package/src/_esm/src/ts/utils/WebColorsMalachite.js +0 -25
  646. package/src/_esm/src/ts/utils/WebColorsMalachite.js.map +0 -1
  647. package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.d.ts +0 -60
  648. package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.js +0 -103
  649. package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.js.map +0 -1
  650. package/src/_esm/src/ts/utils/algorithms/CircleIntersections.d.ts +0 -170
  651. package/src/_esm/src/ts/utils/algorithms/CircleIntersections.js +0 -303
  652. package/src/_esm/src/ts/utils/algorithms/CircleIntersections.js.map +0 -1
  653. package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.d.ts +0 -150
  654. package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.js +0 -362
  655. package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.js.map +0 -1
  656. package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.d.ts +0 -63
  657. package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.js +0 -170
  658. package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.js.map +0 -1
  659. package/src/_esm/src/ts/utils/algorithms/HobbyPath.d.ts +0 -81
  660. package/src/_esm/src/ts/utils/algorithms/HobbyPath.js +0 -273
  661. package/src/_esm/src/ts/utils/algorithms/HobbyPath.js.map +0 -1
  662. package/src/_esm/src/ts/utils/algorithms/Metaballs.d.ts +0 -30
  663. package/src/_esm/src/ts/utils/algorithms/Metaballs.js +0 -109
  664. package/src/_esm/src/ts/utils/algorithms/Metaballs.js.map +0 -1
  665. package/src/_esm/src/ts/utils/algorithms/PolygonInset.d.ts +0 -184
  666. package/src/_esm/src/ts/utils/algorithms/PolygonInset.js +0 -424
  667. package/src/_esm/src/ts/utils/algorithms/PolygonInset.js.map +0 -1
  668. package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.d.ts +0 -145
  669. package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.js +0 -262
  670. package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.js.map +0 -1
  671. package/src/_esm/src/ts/utils/algorithms/arrayFill.d.ts +0 -8
  672. package/src/_esm/src/ts/utils/algorithms/arrayFill.js +0 -14
  673. package/src/_esm/src/ts/utils/algorithms/arrayFill.js.map +0 -1
  674. package/src/_esm/src/ts/utils/algorithms/arrayResize.d.ts +0 -8
  675. package/src/_esm/src/ts/utils/algorithms/arrayResize.js +0 -20
  676. package/src/_esm/src/ts/utils/algorithms/arrayResize.js.map +0 -1
  677. package/src/_esm/src/ts/utils/algorithms/arrayShuffle.d.ts +0 -8
  678. package/src/_esm/src/ts/utils/algorithms/arrayShuffle.js +0 -11
  679. package/src/_esm/src/ts/utils/algorithms/arrayShuffle.js.map +0 -1
  680. package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.d.ts +0 -22
  681. package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.js +0 -47
  682. package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.js.map +0 -1
  683. package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.d.ts +0 -24
  684. package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.js +0 -57
  685. package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.js.map +0 -1
  686. package/src/_esm/src/ts/utils/algorithms/convexHull.d.ts +0 -23
  687. package/src/_esm/src/ts/utils/algorithms/convexHull.js +0 -67
  688. package/src/_esm/src/ts/utils/algorithms/convexHull.js.map +0 -1
  689. package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.d.ts +0 -41
  690. package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.js +0 -141
  691. package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.js.map +0 -1
  692. package/src/_esm/src/ts/utils/algorithms/delaunay.d.ts +0 -30
  693. package/src/_esm/src/ts/utils/algorithms/delaunay.js +0 -153
  694. package/src/_esm/src/ts/utils/algorithms/delaunay.js.map +0 -1
  695. package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.d.ts +0 -25
  696. package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.js +0 -99
  697. package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.js.map +0 -1
  698. package/src/_esm/src/ts/utils/algorithms/detectPaths.d.ts +0 -21
  699. package/src/_esm/src/ts/utils/algorithms/detectPaths.js +0 -165
  700. package/src/_esm/src/ts/utils/algorithms/detectPaths.js.map +0 -1
  701. package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.d.ts +0 -21
  702. package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.js +0 -47
  703. package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.js.map +0 -1
  704. package/src/_esm/src/ts/utils/algorithms/getContrastColor.d.ts +0 -13
  705. package/src/_esm/src/ts/utils/algorithms/getContrastColor.js +0 -22
  706. package/src/_esm/src/ts/utils/algorithms/getContrastColor.js.map +0 -1
  707. package/src/_esm/src/ts/utils/algorithms/matrixFill.d.ts +0 -10
  708. package/src/_esm/src/ts/utils/algorithms/matrixFill.js +0 -17
  709. package/src/_esm/src/ts/utils/algorithms/matrixFill.js.map +0 -1
  710. package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.d.ts +0 -23
  711. package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.js +0 -266
  712. package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.js.map +0 -1
  713. package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.d.ts +0 -28
  714. package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.js +0 -99
  715. package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.js.map +0 -1
  716. package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.d.ts +0 -16
  717. package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.js +0 -72
  718. package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.js.map +0 -1
  719. package/src/_esm/src/ts/utils/cloneVertexArray.d.ts +0 -13
  720. package/src/_esm/src/ts/utils/cloneVertexArray.js +0 -19
  721. package/src/_esm/src/ts/utils/cloneVertexArray.js.map +0 -1
  722. package/src/_esm/src/ts/utils/createRandomizedPolygon.d.ts +0 -14
  723. package/src/_esm/src/ts/utils/createRandomizedPolygon.js +0 -28
  724. package/src/_esm/src/ts/utils/createRandomizedPolygon.js.map +0 -1
  725. package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.d.ts +0 -83
  726. package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.js +0 -158
  727. package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.js.map +0 -1
  728. package/src/_esm/src/ts/utils/datastructures/Color.d.ts +0 -391
  729. package/src/_esm/src/ts/utils/datastructures/Color.js +0 -1063
  730. package/src/_esm/src/ts/utils/datastructures/Color.js.map +0 -1
  731. package/src/_esm/src/ts/utils/datastructures/ColorGradient.d.ts +0 -81
  732. package/src/_esm/src/ts/utils/datastructures/ColorGradient.js +0 -171
  733. package/src/_esm/src/ts/utils/datastructures/ColorGradient.js.map +0 -1
  734. package/src/_esm/src/ts/utils/datastructures/DataGrid2d.d.ts +0 -53
  735. package/src/_esm/src/ts/utils/datastructures/DataGrid2d.js +0 -19
  736. package/src/_esm/src/ts/utils/datastructures/DataGrid2d.js.map +0 -1
  737. package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.d.ts +0 -88
  738. package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.js +0 -150
  739. package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.js.map +0 -1
  740. package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.d.ts +0 -59
  741. package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.js +0 -79
  742. package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.js.map +0 -1
  743. package/src/_esm/src/ts/utils/datastructures/GenericPath.d.ts +0 -86
  744. package/src/_esm/src/ts/utils/datastructures/GenericPath.js +0 -117
  745. package/src/_esm/src/ts/utils/datastructures/GenericPath.js.map +0 -1
  746. package/src/_esm/src/ts/utils/datastructures/GeometryMesh.d.ts +0 -49
  747. package/src/_esm/src/ts/utils/datastructures/GeometryMesh.js +0 -53
  748. package/src/_esm/src/ts/utils/datastructures/GeometryMesh.js.map +0 -1
  749. package/src/_esm/src/ts/utils/datastructures/Girih.d.ts +0 -181
  750. package/src/_esm/src/ts/utils/datastructures/Girih.js +0 -261
  751. package/src/_esm/src/ts/utils/datastructures/Girih.js.map +0 -1
  752. package/src/_esm/src/ts/utils/datastructures/GirihBowtie.d.ts +0 -37
  753. package/src/_esm/src/ts/utils/datastructures/GirihBowtie.js +0 -130
  754. package/src/_esm/src/ts/utils/datastructures/GirihBowtie.js.map +0 -1
  755. package/src/_esm/src/ts/utils/datastructures/GirihDecagon.d.ts +0 -52
  756. package/src/_esm/src/ts/utils/datastructures/GirihDecagon.js +0 -110
  757. package/src/_esm/src/ts/utils/datastructures/GirihDecagon.js.map +0 -1
  758. package/src/_esm/src/ts/utils/datastructures/GirihHexagon.d.ts +0 -39
  759. package/src/_esm/src/ts/utils/datastructures/GirihHexagon.js +0 -178
  760. package/src/_esm/src/ts/utils/datastructures/GirihHexagon.js.map +0 -1
  761. package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.d.ts +0 -46
  762. package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.js +0 -167
  763. package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.js.map +0 -1
  764. package/src/_esm/src/ts/utils/datastructures/GirihPentagon.d.ts +0 -37
  765. package/src/_esm/src/ts/utils/datastructures/GirihPentagon.js +0 -87
  766. package/src/_esm/src/ts/utils/datastructures/GirihPentagon.js.map +0 -1
  767. package/src/_esm/src/ts/utils/datastructures/GirihRhombus.d.ts +0 -38
  768. package/src/_esm/src/ts/utils/datastructures/GirihRhombus.js +0 -133
  769. package/src/_esm/src/ts/utils/datastructures/GirihRhombus.js.map +0 -1
  770. package/src/_esm/src/ts/utils/datastructures/GirihTile.d.ts +0 -283
  771. package/src/_esm/src/ts/utils/datastructures/GirihTile.js +0 -286
  772. package/src/_esm/src/ts/utils/datastructures/GirihTile.js.map +0 -1
  773. package/src/_esm/src/ts/utils/datastructures/Matrix4x4.d.ts +0 -244
  774. package/src/_esm/src/ts/utils/datastructures/Matrix4x4.js +0 -246
  775. package/src/_esm/src/ts/utils/datastructures/Matrix4x4.js.map +0 -1
  776. package/src/_esm/src/ts/utils/datastructures/VoronoiCell.d.ts +0 -122
  777. package/src/_esm/src/ts/utils/datastructures/VoronoiCell.js +0 -178
  778. package/src/_esm/src/ts/utils/datastructures/VoronoiCell.js.map +0 -1
  779. package/src/_esm/src/ts/utils/datastructures/interfaces.d.ts +0 -13
  780. package/src/_esm/src/ts/utils/datastructures/interfaces.js +0 -9
  781. package/src/_esm/src/ts/utils/datastructures/interfaces.js.map +0 -1
  782. package/src/_esm/src/ts/utils/detectDarkMode.d.ts +0 -10
  783. package/src/_esm/src/ts/utils/detectDarkMode.js +0 -37
  784. package/src/_esm/src/ts/utils/detectDarkMode.js.map +0 -1
  785. package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.d.ts +0 -246
  786. package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.js +0 -743
  787. package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.js.map +0 -1
  788. package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.d.ts +0 -118
  789. package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.js +0 -339
  790. package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.js.map +0 -1
  791. package/src/_esm/src/ts/utils/dom/components/Test.d.ts +0 -7
  792. package/src/_esm/src/ts/utils/dom/components/Test.js +0 -26
  793. package/src/_esm/src/ts/utils/dom/components/Test.js.map +0 -1
  794. package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.d.ts +0 -2
  795. package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.js +0 -25
  796. package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.js.map +0 -1
  797. package/src/_esm/src/ts/utils/dom/getFProp.d.ts +0 -5
  798. package/src/_esm/src/ts/utils/dom/getFProp.js +0 -8
  799. package/src/_esm/src/ts/utils/dom/getFProp.js.map +0 -1
  800. package/src/_esm/src/ts/utils/dom/guiSizeToggler.d.ts +0 -18
  801. package/src/_esm/src/ts/utils/dom/guiSizeToggler.js +0 -40
  802. package/src/_esm/src/ts/utils/dom/guiSizeToggler.js.map +0 -1
  803. package/src/_esm/src/ts/utils/findInVertexArray.d.ts +0 -19
  804. package/src/_esm/src/ts/utils/findInVertexArray.js +0 -25
  805. package/src/_esm/src/ts/utils/findInVertexArray.js.map +0 -1
  806. package/src/_esm/src/ts/utils/gup.d.ts +0 -14
  807. package/src/_esm/src/ts/utils/gup.js +0 -27
  808. package/src/_esm/src/ts/utils/gup.js.map +0 -1
  809. package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.d.ts +0 -272
  810. package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.js +0 -648
  811. package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.js.map +0 -1
  812. package/src/_esm/src/ts/utils/helpers/CircleHelper.d.ts +0 -73
  813. package/src/_esm/src/ts/utils/helpers/CircleHelper.js +0 -88
  814. package/src/_esm/src/ts/utils/helpers/CircleHelper.js.map +0 -1
  815. package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.d.ts +0 -90
  816. package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.js +0 -109
  817. package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.js.map +0 -1
  818. package/src/_esm/src/ts/utils/helpers/TriangleHelper.d.ts +0 -57
  819. package/src/_esm/src/ts/utils/helpers/TriangleHelper.js +0 -78
  820. package/src/_esm/src/ts/utils/helpers/TriangleHelper.js.map +0 -1
  821. package/src/_esm/src/ts/utils/helpers/VEllipseHelper.d.ts +0 -32
  822. package/src/_esm/src/ts/utils/helpers/VEllipseHelper.js +0 -83
  823. package/src/_esm/src/ts/utils/helpers/VEllipseHelper.js.map +0 -1
  824. package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.d.ts +0 -52
  825. package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.js +0 -130
  826. package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.js.map +0 -1
  827. package/src/_esm/src/ts/utils/io/FileDrop.d.ts +0 -110
  828. package/src/_esm/src/ts/utils/io/FileDrop.js +0 -171
  829. package/src/_esm/src/ts/utils/io/FileDrop.js.map +0 -1
  830. package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.d.ts +0 -78
  831. package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.js +0 -217
  832. package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.js.map +0 -1
  833. package/src/_esm/src/ts/utils/parsers/OBJParser.d.ts +0 -24
  834. package/src/_esm/src/ts/utils/parsers/OBJParser.js +0 -72
  835. package/src/_esm/src/ts/utils/parsers/OBJParser.js.map +0 -1
  836. package/src/_esm/src/ts/utils/parsers/STLParser.d.ts +0 -61
  837. package/src/_esm/src/ts/utils/parsers/STLParser.js +0 -175
  838. package/src/_esm/src/ts/utils/parsers/STLParser.js.map +0 -1
  839. package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.d.ts +0 -27
  840. package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.js +0 -482
  841. package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.js.map +0 -1
  842. package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.d.ts +0 -20
  843. package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.js +0 -49
  844. package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.js.map +0 -1
  845. package/src/_esm/src/ts/utils/parsers/svg/types.d.ts +0 -63
  846. package/src/_esm/src/ts/utils/parsers/svg/types.js +0 -16
  847. package/src/_esm/src/ts/utils/parsers/svg/types.js.map +0 -1
  848. package/src/_esm/utils/InitializationObserver.d.ts +0 -18
  849. package/src/_esm/utils/InitializationObserver.js +0 -61
  850. package/src/_esm/utils/InitializationObserver.js.map +0 -1
  851. package/src/_esm/utils/LissajousFigure.d.ts +0 -34
  852. package/src/_esm/utils/LissajousFigure.js +0 -99
  853. package/src/_esm/utils/LissajousFigure.js.map +0 -1
  854. package/src/_esm/utils/NGons.d.ts +0 -13
  855. package/src/_esm/utils/NGons.js +0 -36
  856. package/src/_esm/utils/NGons.js.map +0 -1
  857. package/src/_esm/utils/Params.d.ts +0 -17
  858. package/src/_esm/utils/Params.js +0 -52
  859. package/src/_esm/utils/Params.js.map +0 -1
  860. package/src/_esm/utils/PerlinNoise.d.ts +0 -19
  861. package/src/_esm/utils/PerlinNoise.js +0 -350
  862. package/src/_esm/utils/PerlinNoise.js.map +0 -1
  863. package/src/_esm/utils/SVGPathUtils.d.ts +0 -22
  864. package/src/_esm/utils/SVGPathUtils.js +0 -45
  865. package/src/_esm/utils/SVGPathUtils.js.map +0 -1
  866. package/src/_esm/utils/WebColors.d.ts +0 -35
  867. package/src/_esm/utils/WebColors.js +0 -58
  868. package/src/_esm/utils/WebColors.js.map +0 -1
  869. package/src/_esm/utils/WebColorsContrast.d.ts +0 -6
  870. package/src/_esm/utils/WebColorsContrast.js +0 -12
  871. package/src/_esm/utils/WebColorsContrast.js.map +0 -1
  872. package/src/_esm/utils/WebColorsMalachite.d.ts +0 -12
  873. package/src/_esm/utils/WebColorsMalachite.js +0 -28
  874. package/src/_esm/utils/WebColorsMalachite.js.map +0 -1
  875. package/src/_esm/utils/algorithms/CatmullRomPath.d.ts +0 -60
  876. package/src/_esm/utils/algorithms/CatmullRomPath.js +0 -107
  877. package/src/_esm/utils/algorithms/CatmullRomPath.js.map +0 -1
  878. package/src/_esm/utils/algorithms/CircleIntersections.d.ts +0 -170
  879. package/src/_esm/utils/algorithms/CircleIntersections.js +0 -307
  880. package/src/_esm/utils/algorithms/CircleIntersections.js.map +0 -1
  881. package/src/_esm/utils/algorithms/ContourLineDetection.d.ts +0 -150
  882. package/src/_esm/utils/algorithms/ContourLineDetection.js +0 -366
  883. package/src/_esm/utils/algorithms/ContourLineDetection.js.map +0 -1
  884. package/src/_esm/utils/algorithms/CubicSplinePath.d.ts +0 -63
  885. package/src/_esm/utils/algorithms/CubicSplinePath.js +0 -174
  886. package/src/_esm/utils/algorithms/CubicSplinePath.js.map +0 -1
  887. package/src/_esm/utils/algorithms/HobbyPath.d.ts +0 -81
  888. package/src/_esm/utils/algorithms/HobbyPath.js +0 -277
  889. package/src/_esm/utils/algorithms/HobbyPath.js.map +0 -1
  890. package/src/_esm/utils/algorithms/Metaballs.d.ts +0 -30
  891. package/src/_esm/utils/algorithms/Metaballs.js +0 -113
  892. package/src/_esm/utils/algorithms/Metaballs.js.map +0 -1
  893. package/src/_esm/utils/algorithms/PolygonInset.d.ts +0 -184
  894. package/src/_esm/utils/algorithms/PolygonInset.js +0 -428
  895. package/src/_esm/utils/algorithms/PolygonInset.js.map +0 -1
  896. package/src/_esm/utils/algorithms/PolygonTesselationOutlines.d.ts +0 -145
  897. package/src/_esm/utils/algorithms/PolygonTesselationOutlines.js +0 -267
  898. package/src/_esm/utils/algorithms/PolygonTesselationOutlines.js.map +0 -1
  899. package/src/_esm/utils/algorithms/arrayFill.d.ts +0 -8
  900. package/src/_esm/utils/algorithms/arrayFill.js +0 -18
  901. package/src/_esm/utils/algorithms/arrayFill.js.map +0 -1
  902. package/src/_esm/utils/algorithms/arrayResize.d.ts +0 -8
  903. package/src/_esm/utils/algorithms/arrayResize.js +0 -24
  904. package/src/_esm/utils/algorithms/arrayResize.js.map +0 -1
  905. package/src/_esm/utils/algorithms/arrayShuffle.d.ts +0 -8
  906. package/src/_esm/utils/algorithms/arrayShuffle.js +0 -15
  907. package/src/_esm/utils/algorithms/arrayShuffle.js.map +0 -1
  908. package/src/_esm/utils/algorithms/clearDuplicateVertices.d.ts +0 -22
  909. package/src/_esm/utils/algorithms/clearDuplicateVertices.js +0 -51
  910. package/src/_esm/utils/algorithms/clearDuplicateVertices.js.map +0 -1
  911. package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.d.ts +0 -24
  912. package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.js +0 -61
  913. package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.js.map +0 -1
  914. package/src/_esm/utils/algorithms/convexHull.d.ts +0 -23
  915. package/src/_esm/utils/algorithms/convexHull.js +0 -71
  916. package/src/_esm/utils/algorithms/convexHull.js.map +0 -1
  917. package/src/_esm/utils/algorithms/convexPolygonIncircle.d.ts +0 -41
  918. package/src/_esm/utils/algorithms/convexPolygonIncircle.js +0 -145
  919. package/src/_esm/utils/algorithms/convexPolygonIncircle.js.map +0 -1
  920. package/src/_esm/utils/algorithms/createRandomizedPolygon.d.ts +0 -14
  921. package/src/_esm/utils/algorithms/createRandomizedPolygon.js +0 -28
  922. package/src/_esm/utils/algorithms/createRandomizedPolygon.js.map +0 -1
  923. package/src/_esm/utils/algorithms/delaunay.d.ts +0 -30
  924. package/src/_esm/utils/algorithms/delaunay.js +0 -157
  925. package/src/_esm/utils/algorithms/delaunay.js.map +0 -1
  926. package/src/_esm/utils/algorithms/delaunay2voronoi.d.ts +0 -25
  927. package/src/_esm/utils/algorithms/delaunay2voronoi.js +0 -103
  928. package/src/_esm/utils/algorithms/delaunay2voronoi.js.map +0 -1
  929. package/src/_esm/utils/algorithms/detectPaths.d.ts +0 -21
  930. package/src/_esm/utils/algorithms/detectPaths.js +0 -169
  931. package/src/_esm/utils/algorithms/detectPaths.js.map +0 -1
  932. package/src/_esm/utils/algorithms/findPolygonSelfIntersections.d.ts +0 -21
  933. package/src/_esm/utils/algorithms/findPolygonSelfIntersections.js +0 -51
  934. package/src/_esm/utils/algorithms/findPolygonSelfIntersections.js.map +0 -1
  935. package/src/_esm/utils/algorithms/getContrastColor.d.ts +0 -13
  936. package/src/_esm/utils/algorithms/getContrastColor.js +0 -26
  937. package/src/_esm/utils/algorithms/getContrastColor.js.map +0 -1
  938. package/src/_esm/utils/algorithms/matrixFill.d.ts +0 -10
  939. package/src/_esm/utils/algorithms/matrixFill.js +0 -21
  940. package/src/_esm/utils/algorithms/matrixFill.js.map +0 -1
  941. package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.d.ts +0 -23
  942. package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.js +0 -270
  943. package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.js.map +0 -1
  944. package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.d.ts +0 -28
  945. package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.js +0 -102
  946. package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.js.map +0 -1
  947. package/src/_esm/utils/algorithms/sutherlandHodgman.d.ts +0 -16
  948. package/src/_esm/utils/algorithms/sutherlandHodgman.js +0 -76
  949. package/src/_esm/utils/algorithms/sutherlandHodgman.js.map +0 -1
  950. package/src/_esm/utils/cloneVertexArray.d.ts +0 -13
  951. package/src/_esm/utils/cloneVertexArray.js +0 -23
  952. package/src/_esm/utils/cloneVertexArray.js.map +0 -1
  953. package/src/_esm/utils/createRandomizedPolygon.d.ts +0 -14
  954. package/src/_esm/utils/createRandomizedPolygon.js +0 -32
  955. package/src/_esm/utils/createRandomizedPolygon.js.map +0 -1
  956. package/src/_esm/utils/datastructures/CircularIntervalSet.d.ts +0 -83
  957. package/src/_esm/utils/datastructures/CircularIntervalSet.js +0 -162
  958. package/src/_esm/utils/datastructures/CircularIntervalSet.js.map +0 -1
  959. package/src/_esm/utils/datastructures/Color.d.ts +0 -391
  960. package/src/_esm/utils/datastructures/Color.js +0 -1067
  961. package/src/_esm/utils/datastructures/Color.js.map +0 -1
  962. package/src/_esm/utils/datastructures/ColorGradient.d.ts +0 -81
  963. package/src/_esm/utils/datastructures/ColorGradient.js +0 -175
  964. package/src/_esm/utils/datastructures/ColorGradient.js.map +0 -1
  965. package/src/_esm/utils/datastructures/DataGrid2d.d.ts +0 -53
  966. package/src/_esm/utils/datastructures/DataGrid2d.js +0 -20
  967. package/src/_esm/utils/datastructures/DataGrid2d.js.map +0 -1
  968. package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.d.ts +0 -88
  969. package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.js +0 -154
  970. package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.js.map +0 -1
  971. package/src/_esm/utils/datastructures/DataGrid2dListAdapter.d.ts +0 -59
  972. package/src/_esm/utils/datastructures/DataGrid2dListAdapter.js +0 -83
  973. package/src/_esm/utils/datastructures/DataGrid2dListAdapter.js.map +0 -1
  974. package/src/_esm/utils/datastructures/GenericPath.d.ts +0 -86
  975. package/src/_esm/utils/datastructures/GenericPath.js +0 -121
  976. package/src/_esm/utils/datastructures/GenericPath.js.map +0 -1
  977. package/src/_esm/utils/datastructures/GeometryMesh.d.ts +0 -49
  978. package/src/_esm/utils/datastructures/GeometryMesh.js +0 -57
  979. package/src/_esm/utils/datastructures/GeometryMesh.js.map +0 -1
  980. package/src/_esm/utils/datastructures/Girih.d.ts +0 -181
  981. package/src/_esm/utils/datastructures/Girih.js +0 -265
  982. package/src/_esm/utils/datastructures/Girih.js.map +0 -1
  983. package/src/_esm/utils/datastructures/GirihBowtie.d.ts +0 -37
  984. package/src/_esm/utils/datastructures/GirihBowtie.js +0 -134
  985. package/src/_esm/utils/datastructures/GirihBowtie.js.map +0 -1
  986. package/src/_esm/utils/datastructures/GirihDecagon.d.ts +0 -52
  987. package/src/_esm/utils/datastructures/GirihDecagon.js +0 -114
  988. package/src/_esm/utils/datastructures/GirihDecagon.js.map +0 -1
  989. package/src/_esm/utils/datastructures/GirihHexagon.d.ts +0 -39
  990. package/src/_esm/utils/datastructures/GirihHexagon.js +0 -182
  991. package/src/_esm/utils/datastructures/GirihHexagon.js.map +0 -1
  992. package/src/_esm/utils/datastructures/GirihPenroseRhombus.d.ts +0 -46
  993. package/src/_esm/utils/datastructures/GirihPenroseRhombus.js +0 -171
  994. package/src/_esm/utils/datastructures/GirihPenroseRhombus.js.map +0 -1
  995. package/src/_esm/utils/datastructures/GirihPentagon.d.ts +0 -37
  996. package/src/_esm/utils/datastructures/GirihPentagon.js +0 -91
  997. package/src/_esm/utils/datastructures/GirihPentagon.js.map +0 -1
  998. package/src/_esm/utils/datastructures/GirihRhombus.d.ts +0 -38
  999. package/src/_esm/utils/datastructures/GirihRhombus.js +0 -137
  1000. package/src/_esm/utils/datastructures/GirihRhombus.js.map +0 -1
  1001. package/src/_esm/utils/datastructures/GirihTile.d.ts +0 -283
  1002. package/src/_esm/utils/datastructures/GirihTile.js +0 -290
  1003. package/src/_esm/utils/datastructures/GirihTile.js.map +0 -1
  1004. package/src/_esm/utils/datastructures/Matrix4x4.d.ts +0 -244
  1005. package/src/_esm/utils/datastructures/Matrix4x4.js +0 -250
  1006. package/src/_esm/utils/datastructures/Matrix4x4.js.map +0 -1
  1007. package/src/_esm/utils/datastructures/VoronoiCell.d.ts +0 -122
  1008. package/src/_esm/utils/datastructures/VoronoiCell.js +0 -182
  1009. package/src/_esm/utils/datastructures/VoronoiCell.js.map +0 -1
  1010. package/src/_esm/utils/datastructures/interfaces.d.ts +0 -13
  1011. package/src/_esm/utils/datastructures/interfaces.js +0 -10
  1012. package/src/_esm/utils/datastructures/interfaces.js.map +0 -1
  1013. package/src/_esm/utils/detectDarkMode.d.ts +0 -10
  1014. package/src/_esm/utils/detectDarkMode.js +0 -41
  1015. package/src/_esm/utils/detectDarkMode.js.map +0 -1
  1016. package/src/_esm/utils/dom/components/ColorGradientPicker.d.ts +0 -246
  1017. package/src/_esm/utils/dom/components/ColorGradientPicker.js +0 -780
  1018. package/src/_esm/utils/dom/components/ColorGradientPicker.js.map +0 -1
  1019. package/src/_esm/utils/dom/components/ColorGradientPickerJSX.d.ts +0 -129
  1020. package/src/_esm/utils/dom/components/ColorGradientPickerJSX.js +0 -582
  1021. package/src/_esm/utils/dom/components/ColorGradientPickerJSX.js.map +0 -1
  1022. package/src/_esm/utils/dom/components/ColorGradientSelector.d.ts +0 -118
  1023. package/src/_esm/utils/dom/components/ColorGradientSelector.js +0 -376
  1024. package/src/_esm/utils/dom/components/ColorGradientSelector.js.map +0 -1
  1025. package/src/_esm/utils/dom/components/Test.d.ts +0 -7
  1026. package/src/_esm/utils/dom/components/Test.js +0 -63
  1027. package/src/_esm/utils/dom/components/Test.js.map +0 -1
  1028. package/src/_esm/utils/dom/getAvailableContainerSpace.d.ts +0 -2
  1029. package/src/_esm/utils/dom/getAvailableContainerSpace.js +0 -29
  1030. package/src/_esm/utils/dom/getAvailableContainerSpace.js.map +0 -1
  1031. package/src/_esm/utils/dom/getFProp.d.ts +0 -5
  1032. package/src/_esm/utils/dom/getFProp.js +0 -12
  1033. package/src/_esm/utils/dom/getFProp.js.map +0 -1
  1034. package/src/_esm/utils/dom/guiSizeToggler.d.ts +0 -18
  1035. package/src/_esm/utils/dom/guiSizeToggler.js +0 -44
  1036. package/src/_esm/utils/dom/guiSizeToggler.js.map +0 -1
  1037. package/src/_esm/utils/findInVertexArray.d.ts +0 -19
  1038. package/src/_esm/utils/findInVertexArray.js +0 -29
  1039. package/src/_esm/utils/findInVertexArray.js.map +0 -1
  1040. package/src/_esm/utils/getFProp.d.ts +0 -5
  1041. package/src/_esm/utils/getFProp.js +0 -8
  1042. package/src/_esm/utils/getFProp.js.map +0 -1
  1043. package/src/_esm/utils/gup.d.ts +0 -14
  1044. package/src/_esm/utils/gup.js +0 -31
  1045. package/src/_esm/utils/gup.js.map +0 -1
  1046. package/src/_esm/utils/helpers/BezierPathInteractionHelper.d.ts +0 -272
  1047. package/src/_esm/utils/helpers/BezierPathInteractionHelper.js +0 -655
  1048. package/src/_esm/utils/helpers/BezierPathInteractionHelper.js.map +0 -1
  1049. package/src/_esm/utils/helpers/CircleHelper.d.ts +0 -73
  1050. package/src/_esm/utils/helpers/CircleHelper.js +0 -92
  1051. package/src/_esm/utils/helpers/CircleHelper.js.map +0 -1
  1052. package/src/_esm/utils/helpers/CircleSectorHelper.d.ts +0 -90
  1053. package/src/_esm/utils/helpers/CircleSectorHelper.js +0 -113
  1054. package/src/_esm/utils/helpers/CircleSectorHelper.js.map +0 -1
  1055. package/src/_esm/utils/helpers/TriangleHelper.d.ts +0 -57
  1056. package/src/_esm/utils/helpers/TriangleHelper.js +0 -82
  1057. package/src/_esm/utils/helpers/TriangleHelper.js.map +0 -1
  1058. package/src/_esm/utils/helpers/VEllipseHelper.d.ts +0 -32
  1059. package/src/_esm/utils/helpers/VEllipseHelper.js +0 -87
  1060. package/src/_esm/utils/helpers/VEllipseHelper.js.map +0 -1
  1061. package/src/_esm/utils/helpers/VEllipseSectorHelper.d.ts +0 -52
  1062. package/src/_esm/utils/helpers/VEllipseSectorHelper.js +0 -134
  1063. package/src/_esm/utils/helpers/VEllipseSectorHelper.js.map +0 -1
  1064. package/src/_esm/utils/io/DndFileHandler.d.ts +0 -63
  1065. package/src/_esm/utils/io/DndFileHandler.js +0 -106
  1066. package/src/_esm/utils/io/DndFileHandler.js.map +0 -1
  1067. package/src/_esm/utils/io/FileDrop.d.ts +0 -110
  1068. package/src/_esm/utils/io/FileDrop.js +0 -175
  1069. package/src/_esm/utils/io/FileDrop.js.map +0 -1
  1070. package/src/_esm/utils/parsers/LinearColorGradientParser.d.ts +0 -78
  1071. package/src/_esm/utils/parsers/LinearColorGradientParser.js +0 -223
  1072. package/src/_esm/utils/parsers/LinearColorGradientParser.js.map +0 -1
  1073. package/src/_esm/utils/parsers/OBJParser.d.ts +0 -25
  1074. package/src/_esm/utils/parsers/OBJParser.js +0 -78
  1075. package/src/_esm/utils/parsers/OBJParser.js.map +0 -1
  1076. package/src/_esm/utils/parsers/STLParser.d.ts +0 -61
  1077. package/src/_esm/utils/parsers/STLParser.js +0 -179
  1078. package/src/_esm/utils/parsers/STLParser.js.map +0 -1
  1079. package/src/_esm/utils/parsers/svg/parseSVGPathData.d.ts +0 -27
  1080. package/src/_esm/utils/parsers/svg/parseSVGPathData.js +0 -486
  1081. package/src/_esm/utils/parsers/svg/parseSVGPathData.js.map +0 -1
  1082. package/src/_esm/utils/parsers/svg/splitSVGPathData.d.ts +0 -20
  1083. package/src/_esm/utils/parsers/svg/splitSVGPathData.js +0 -53
  1084. package/src/_esm/utils/parsers/svg/splitSVGPathData.js.map +0 -1
  1085. package/src/_esm/utils/parsers/svg/types.d.ts +0 -63
  1086. package/src/_esm/utils/parsers/svg/types.js +0 -17
  1087. package/src/_esm/utils/parsers/svg/types.js.map +0 -1
package/src/_esm/draw.js DELETED
@@ -1,1159 +0,0 @@
1
- "use strict";
2
- /**
3
- * @author Ikaros Kappler
4
- * @date 2018-04-22
5
- * @modified 2018-08-16 Added the curve() function to draw cubic bézier curves.
6
- * @modified 2018-10-23 Recognizing the offset param in the circle() function.
7
- * @modified 2018-11-27 Added the diamondHandle() function.
8
- * @modified 2018-11-28 Added the grid() function and the ellipse() function.
9
- * @modified 2018-11-30 Renamed the text() function to label() as it is not scaling.
10
- * @modified 2018-12-06 Added a test function for drawing arc in SVG style.
11
- * @modified 2018-12-09 Added the dot(Vertex,color) function (copied from Feigenbaum-plot-script).
12
- * @modified 2019-01-30 Added the arrow(Vertex,Vertex,color) function for drawing arrow heads.
13
- * @modified 2019-01-30 Added the image(Image,Vertex,Vertex) function for drawing images.
14
- * @modified 2019-04-27 Fixed a severe drawing bug in the arrow(...) function. Scaling arrows did not work properly.
15
- * @modified 2019-04-28 Added Math.round to the dot() drawing parameters to really draw a singlt dot.
16
- * @modified 2019-06-07 Fixed an issue in the cubicBezier() function. Paths were always closed.
17
- * @modified 2019-10-03 Added the beginDrawCycle hook.
18
- * @modified 2019-10-25 Polygons are no longer drawn with dashed lines (solid lines instead).
19
- * @modified 2019-11-18 Added the polyline function.
20
- * @modified 2019-11-22 Added a second workaround for th drawImage bug in Safari.
21
- * @modified 2019-12-07 Added the 'lineWidth' param to the line(...) function.
22
- * @modified 2019-12-07 Added the 'lineWidth' param to the cubicBezier(...) function.
23
- * @modified 2019-12-11 Added the 'color' param to the label(...) function.
24
- * @modified 2019-12-18 Added the quadraticBezier(...) function (for the sake of approximating Lissajous curves).
25
- * @modified 2019-12-20 Added the 'lineWidth' param to the polyline(...) function.
26
- * @modified 2020-01-09 Added the 'lineWidth' param to the ellipse(...) function.
27
- * @modified 2020-03-25 Ported this class from vanilla-JS to Typescript.
28
- * @modified 2020-05-05 Added the 'lineWidth' param to the circle(...) function.
29
- * @modified 2020-05-12 Drawing any handles (square, circle, diamond) with lineWidth 1 now; this was not reset before.
30
- * @modified 2020-06-22 Added a context.clearRect() call to the clear() function; clearing with alpha channel did not work as expected.
31
- * @modified 2020-09-07 Added the circleArc(...) function to draw sections of circles.
32
- * @modified 2020-10-06 Removed the .closePath() instruction from the circleArc function.
33
- * @modified 2020-10-15 Re-added the text() function.
34
- * @modified 2020-10-28 Added the path(Path2D) function.
35
- * @modified 2020-12-28 Added the `singleSegment` mode (test).
36
- * @modified 2021-01-05 Added the image-loaded/broken check.
37
- * @modified 2021-01-24 Added the `setCurrentId` function from the `DrawLib` interface.
38
- * @modified 2021-02-22 Added the `path` drawing function to draw SVG path data.
39
- * @modified 2021-03-31 Added the `endDrawCycle` function from `DrawLib`.
40
- * @modified 2021-05-31 Added the `setConfiguration` function from `DrawLib`.
41
- * @modified 2021-11-12 Adding more parameters tot the `text()` function: fontSize, textAlign, fontFamily, lineHeight.
42
- * @modified 2021-11-19 Added the `color` param to the `label(...)` function.
43
- * @modified 2022-02-03 Added the `lineWidth` param to the `crosshair` function.
44
- * @modified 2022-02-03 Added the `cross(...)` function.
45
- * @modified 2022-03-27 Added the `texturedPoly` function.
46
- * @modified 2022-06-01 Tweaked the `polyline` function; lineWidth now scales with scale.x.
47
- * @modified 2022-07-26 Adding `alpha` to the `image(...)` function.
48
- * @modified 2022-08-23 Fixed a type issue in the `polyline` function.
49
- * @modified 2022-08-23 Fixed a type issue in the `setConfiguration` function.
50
- * @modified 2022-08-23 Fixed a type issue in the `path` function.
51
- * @modified 2023-02-10 The methods `setCurrentClassName` and `setCurrentId` also accept `null` now.
52
- * @modified 2023-09-29 Removed unused method stub for texturedPoly helper function (cleanup).
53
- * @modified 2023-09-29 Downgrading all `Vertex` param type to the more generic `XYCoords` type in these render functions: line, arrow, texturedPoly, cubicBezier, cubicBezierPath, handle, handleLine, dot, point, circle, circleArc, ellipse, grid, raster.
54
- * @modified 2023-09-29 Added the `headLength` parameter to the 'DrawLib.arrow()` function.
55
- * @modified 2023-09-29 Added the `arrowHead(...)` function to the 'DrawLib.arrow()` interface.
56
- * @modified 2023-09-29 Added the `cubicBezierArrow(...)` function to the 'DrawLib.arrow()` interface.
57
- * @modified 2023-09-29 Added the `lineDashes` attribute.
58
- * @modified 2023-09-30 Adding `strokeOptions` param to these draw function: line, arrow, cubicBezierArrow, cubicBezier, cubicBezierPath, circle, circleArc, ellipse, square, rect, polygon, polyline.
59
- * @modified 2023-10-07 Adding the optional `arrowHeadBasePositionBuffer` param to the arrowHead(...) method.
60
- * @modified 2024-09-13 Remoed the scaling of `lineWidth` in the `polygon` and `polyline` methods. This makes no sense here and doesn't match up with the behavior of other line functions.
61
- * @modified 2026-01-04 Adding `lineJoin` attribute to the `StrokeOptions`.
62
- * @modified 2026-03-18 Adding `isOpen` parameter to `cubicBezierPath` draw method.
63
- * @version 1.14.0
64
- **/
65
- Object.defineProperty(exports, "__esModule", { value: true });
66
- exports.drawutils = void 0;
67
- const CubicBezierCurve_1 = require("./CubicBezierCurve");
68
- const Vertex_1 = require("./Vertex");
69
- const drawutilssvg_1 = require("./drawutilssvg");
70
- const Vector_1 = require("./Vector");
71
- // Todo: rename this class to Drawutils?
72
- /**
73
- * @classdesc A wrapper class for basic drawing operations.
74
- *
75
- * @requires CubicBzierCurvce
76
- * @requires Polygon
77
- * @requires Vertex
78
- * @requires XYCoords
79
- */
80
- class drawutils {
81
- /**
82
- * The constructor.
83
- *
84
- * @constructor
85
- * @name drawutils
86
- * @param {anvasRenderingContext2D} context - The drawing context.
87
- * @param {boolean} fillShaped - Indicates if the constructed drawutils should fill all drawn shapes (if possible).
88
- **/
89
- constructor(context, fillShapes) {
90
- this.ctx = context;
91
- // this.lineDash = [];
92
- this.offset = new Vertex_1.Vertex(0, 0);
93
- this.scale = new Vertex_1.Vertex(1, 1);
94
- this.fillShapes = fillShapes;
95
- }
96
- /**
97
- * A private helper method to apply stroke options to the current
98
- * context.
99
- * @param {StrokeOptions=} strokeOptions -
100
- */
101
- applyStrokeOpts(strokeOptions) {
102
- var _a, _b, _c;
103
- this.ctx.setLineDash(((_a = strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.dashArray) !== null && _a !== void 0 ? _a : []).map((dashArrayElem) => {
104
- // Note assume scale.x === scale.y
105
- // Invariant scale makes funny stuff anyway.
106
- return dashArrayElem * this.scale.x;
107
- }));
108
- this.ctx.lineDashOffset = ((_b = strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.dashOffset) !== null && _b !== void 0 ? _b : 0) * this.scale.x;
109
- this.ctx.lineJoin = (_c = strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.lineJoin) !== null && _c !== void 0 ? _c : null;
110
- }
111
- // +---------------------------------------------------------------------------------
112
- // | This is the final helper function for drawing and filling stuff. It is not
113
- // | intended to be used from the outside.
114
- // |
115
- // | When in draw mode it draws the current shape.
116
- // | When in fill mode it fills the current shape.
117
- // |
118
- // | This function is usually only called internally.
119
- // |
120
- // | @param color A stroke/fill color to use.
121
- // +-------------------------------
122
- // TODO: convert this to a STATIC function.
123
- _fillOrDraw(color) {
124
- if (this.fillShapes) {
125
- this.ctx.fillStyle = color;
126
- this.ctx.fill();
127
- }
128
- else {
129
- this.ctx.strokeStyle = color;
130
- this.ctx.stroke();
131
- }
132
- }
133
- /**
134
- * Called before each draw cycle.
135
- * @param {UID=} uid - (optional) A UID identifying the currently drawn element(s).
136
- **/
137
- beginDrawCycle(renderTime) {
138
- // NOOP
139
- }
140
- /**
141
- * Called after each draw cycle.
142
- *
143
- * This is required for compatibility with other draw classes in the library (like drawgl).
144
- *
145
- * @name endDrawCycle
146
- * @method
147
- * @param {number} renderTime
148
- * @instance
149
- **/
150
- endDrawCycle(renderTime) {
151
- // NOOP
152
- }
153
- /**
154
- * Set the current drawlib configuration.
155
- *
156
- * @name setConfiguration
157
- * @method
158
- * @param {DrawLibConfiguration} configuration - The new configuration settings to use for the next render methods.
159
- */
160
- setConfiguration(configuration) {
161
- this.ctx.globalCompositeOperation = configuration.blendMode || "source-over";
162
- }
163
- // /**
164
- // * Set or clear the line-dash configuration. Pass `null` for un-dashed lines.
165
- // *
166
- // * See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray
167
- // * and https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash
168
- // * for how line dashes work.
169
- // *
170
- // * @method
171
- // * @param {Array<number> lineDashes - The line-dash array configuration.
172
- // * @returns {void}
173
- // */
174
- // setLineDash(lineDash: Array<number>) {
175
- // this.lineDash = lineDash;
176
- // }
177
- /**
178
- * This method shouled be called each time the currently drawn `Drawable` changes.
179
- * It is used by some libraries for identifying elemente on re-renders.
180
- *
181
- * @name setCurrentId
182
- * @method
183
- * @param {UID|null} uid - A UID identifying the currently drawn element(s).
184
- **/
185
- setCurrentId(uid) {
186
- // NOOP
187
- }
188
- /**
189
- * This method shouled be called each time the currently drawn `Drawable` changes.
190
- * Determine the class name for further usage here.
191
- *
192
- * @name setCurrentClassName
193
- * @method
194
- * @param {string|null} className - A class name for further custom use cases.
195
- **/
196
- setCurrentClassName(className) {
197
- // NOOP
198
- }
199
- /**
200
- * Draw the line between the given two points with the specified (CSS-) color.
201
- *
202
- * @method line
203
- * @param {XYCoords} zA - The start point of the line.
204
- * @param {XYCoords} zB - The end point of the line.
205
- * @param {string} color - Any valid CSS color string.
206
- * @param {number} lineWidth? - [optional] The line's width.
207
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
208
- *
209
- * @return {void}
210
- * @instance
211
- * @memberof drawutils
212
- **/
213
- line(zA, zB, color, lineWidth, strokeOptions) {
214
- this.ctx.save();
215
- this.ctx.beginPath();
216
- this.applyStrokeOpts(strokeOptions);
217
- this.ctx.moveTo(this.offset.x + zA.x * this.scale.x, this.offset.y + zA.y * this.scale.y);
218
- this.ctx.lineTo(this.offset.x + zB.x * this.scale.x, this.offset.y + zB.y * this.scale.y);
219
- this.ctx.strokeStyle = color;
220
- this.ctx.lineWidth = lineWidth || 1;
221
- this.ctx.stroke();
222
- this.ctx.restore();
223
- }
224
- /**
225
- * Draw a line and an arrow at the end (zB) of the given line with the specified (CSS-) color.
226
- *
227
- * @method arrow
228
- * @param {XYCoords} zA - The start point of the arrow-line.
229
- * @param {XYCoords} zB - The end point of the arrow-line.
230
- * @param {string} color - Any valid CSS color string.
231
- * @param {number=} lineWidth - (optional) The line width to use; default is 1.
232
- * @param {headLength=8} headLength - (optional) The length of the arrow head (default is 8 units).
233
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
234
- *
235
- * @return {void}
236
- * @instance
237
- * @memberof drawutils
238
- **/
239
- arrow(zA, zB, color, lineWidth, headLength = 8, strokeOptions) {
240
- const arrowHeadBasePosition = new Vertex_1.Vertex(0, 0);
241
- this.arrowHead(zA, zB, color, lineWidth, headLength, undefined, arrowHeadBasePosition); // Will NOT use dash configuration
242
- this.line(zA, arrowHeadBasePosition, color, lineWidth, strokeOptions); // Will use dash configuration
243
- }
244
- /**
245
- * Draw a cubic Bézier curve and and an arrow at the end (endControlPoint) of the given line width the specified (CSS-) color and arrow size.
246
- *
247
- * @method cubicBezierArrow
248
- * @param {XYCoords} startPoint - The start point of the cubic Bézier curve
249
- * @param {XYCoords} endPoint - The end point the cubic Bézier curve.
250
- * @param {XYCoords} startControlPoint - The start control point the cubic Bézier curve.
251
- * @param {XYCoords} endControlPoint - The end control point the cubic Bézier curve.
252
- * @param {string} color - The CSS color to draw the curve with.
253
- * @param {number} lineWidth - (optional) The line width to use.
254
- * @param {headLength=8} headLength - (optional) The length of the arrow head (default is 8 units).
255
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
256
- *
257
- * @return {void}
258
- * @instance
259
- * @memberof DrawLib
260
- */
261
- cubicBezierArrow(startPoint, endPoint, startControlPoint, endControlPoint, color, lineWidth, headLength, strokeOptions) {
262
- const arrowHeadBasePosition = new Vertex_1.Vertex(0, 0);
263
- // Will NOT use dash configuration
264
- this.arrowHead(endControlPoint, endPoint, color, lineWidth, headLength, undefined, arrowHeadBasePosition);
265
- const diff = arrowHeadBasePosition.difference(endPoint);
266
- // Will use dash configuration
267
- this.cubicBezier(startPoint, { x: endPoint.x - diff.x, y: endPoint.y - diff.y }, startControlPoint, { x: endControlPoint.x - diff.x, y: endControlPoint.y - diff.y }, color, lineWidth, strokeOptions);
268
- }
269
- /**
270
- * Draw just an arrow head a the end of an imaginary line (zB) of the given line width the specified (CSS-) color and size.
271
- *
272
- * @method arrow
273
- * @param {XYCoords} zA - The start point of the arrow-line.
274
- * @param {XYCoords} zB - The end point of the arrow-line.
275
- * @param {string} color - Any valid CSS color string.
276
- * @param {number=1} lineWidth - (optional) The line width to use; default is 1.
277
- * @param {number=8} headLength - (optional) The length of the arrow head (default is 8 pixels).
278
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
279
- * @param {XYCoords=} arrowHeadBasePositionBuffer - (optional) If not null, then this position will contain the arrow head's start point (after execution). Some sort of OUT variable.
280
- *
281
- * @return {void}
282
- * @instance
283
- * @memberof DrawLib
284
- **/
285
- arrowHead(zA, zB, color, lineWidth, headLength = 8, strokeOptions, arrowHeadBasePositionBuffer) {
286
- // var headLength: number = 8; // length of head in pixels
287
- this.ctx.save();
288
- this.ctx.beginPath();
289
- this.applyStrokeOpts(strokeOptions);
290
- var vertices = Vector_1.Vector.utils.buildArrowHead(zA, zB, headLength, this.scale.x, this.scale.y);
291
- if (arrowHeadBasePositionBuffer) {
292
- arrowHeadBasePositionBuffer.x = vertices[0].x / this.scale.x;
293
- arrowHeadBasePositionBuffer.y = vertices[0].y / this.scale.y;
294
- }
295
- this.ctx.moveTo(this.offset.x + vertices[0].x, this.offset.y + vertices[0].y);
296
- for (var i = 0; i < vertices.length; i++) {
297
- this.ctx.lineTo(this.offset.x + vertices[i].x, this.offset.y + vertices[i].y);
298
- }
299
- this.ctx.lineTo(this.offset.x + vertices[0].x, this.offset.y + vertices[0].y);
300
- this.ctx.lineWidth = lineWidth || 1;
301
- this._fillOrDraw(color);
302
- this.ctx.restore();
303
- }
304
- /**
305
- * Draw an image at the given position with the given size.<br>
306
- * <br>
307
- * Note: SVG images may have resizing issues at the moment.Draw a line and an arrow at the end (zB) of the given line with the specified (CSS-) color.
308
- *
309
- * @method image
310
- * @param {Image} image - The image object to draw.
311
- * @param {XYCoords} position - The position to draw the the upper left corner at.
312
- * @param {XYCoords} size - The x/y-size to draw the image with.
313
- * @param {number=0.0} alpha - (optional, default=0.0) The transparency (1.0=opaque, 0.0=transparent).
314
- * @return {void}
315
- * @instance
316
- * @memberof drawutils
317
- **/
318
- image(image, position, size, alpha = 1.0) {
319
- if (!image.complete || !image.naturalWidth) {
320
- // Avoid drawing un-unloaded or broken images
321
- return;
322
- }
323
- this.ctx.save();
324
- this.ctx.globalAlpha = alpha;
325
- // Note that there is a Safari bug with the 3 or 5 params variant.
326
- // Only the 9-param varaint works.
327
- this.ctx.drawImage(image, 0, 0, image.naturalWidth - 1, // There is this horrible Safari bug (fixed in newer versions)
328
- image.naturalHeight - 1, // To avoid errors substract 1 here.
329
- this.offset.x + position.x * this.scale.x, this.offset.y + position.y * this.scale.y, size.x * this.scale.x, size.y * this.scale.y);
330
- this.ctx.restore();
331
- }
332
- /**
333
- * Draw an image at the given position with the given size.<br>
334
- * <br>
335
- * Note: SVG images may have resizing issues at the moment.Draw a line and an arrow at the end (zB) of the given line with the specified (CSS-) color.
336
- *
337
- * @method texturedPoly
338
- * @param {Image} textureImage - The image object to draw.
339
- * @param {Bounds} textureSize - The texture size to use; these are the original bounds to map the polygon vertices to.
340
- * @param {Polygon} polygon - The polygon to use as clip path.
341
- * @param {XYCoords} polygonPosition - The polygon's position (relative), measured at the bounding box's center.
342
- * @param {number} rotation - The rotation to use for the polygon (and for the texture).
343
- * @param {XYCoords={x:0,y:0}} rotationCenter - (optional) The rotational center; default is center of bounding box.
344
- * @return {void}
345
- * @instance
346
- * @memberof drawutils
347
- **/
348
- texturedPoly(textureImage, textureSize, polygon, polygonPosition, rotation) {
349
- var basePolygonBounds = polygon.getBounds();
350
- // var targetCenterDifference = polygonPosition.clone().difference(basePolygonBounds.getCenter());
351
- var targetCenterDifference = new Vertex_1.Vertex(polygonPosition.x, polygonPosition.y).difference(basePolygonBounds.getCenter());
352
- // var tileCenter = basePolygonBounds.getCenter().sub(targetCenterDifference);
353
- // Get the position offset of the polygon
354
- var targetTextureSize = new Vertex_1.Vertex(textureSize.width, textureSize.height);
355
- // var targetTextureOffset = new Vertex(-textureSize.width / 2, -textureSize.height / 2).sub(targetCenterDifference);
356
- var targetTextureOffset = new Vertex_1.Vertex(textureSize.min.x, textureSize.min.y).sub(polygonPosition);
357
- this.ctx.save();
358
- // this.ctx.translate(this.offset.x + rotationCenter.x * this.scale.x, this.offset.y + rotationCenter.y * this.scale.y);
359
- this.ctx.translate(this.offset.x + polygonPosition.x * this.scale.x, this.offset.y + polygonPosition.y * this.scale.y);
360
- drawutils.helpers.clipPoly(this.ctx, {
361
- x: -polygonPosition.x * this.scale.x,
362
- y: -polygonPosition.y * this.scale.y
363
- }, this.scale, polygon.vertices);
364
- this.ctx.scale(this.scale.x, this.scale.y);
365
- this.ctx.rotate(rotation);
366
- this.ctx.drawImage(textureImage, 0, 0, textureImage.naturalWidth - 1, // There is this horrible Safari bug (fixed in newer versions)
367
- textureImage.naturalHeight - 1, // To avoid errors substract 1 here.
368
- targetTextureOffset.x, // * this.scale.x,
369
- targetTextureOffset.y, // * this.scale.y,
370
- targetTextureSize.x, // * this.scale.x,
371
- targetTextureSize.y // * this.scale.y
372
- );
373
- this.ctx.restore();
374
- }
375
- /*
376
- _texturedPoly(
377
- textureImage: HTMLImageElement,
378
- textureSize: Bounds,
379
- polygon: Polygon,
380
- polygonPosition: XYCoords,
381
- rotation: number,
382
- rotationCenter: XYCoords = { x: 0, y: 0 }
383
- ): void {
384
- var basePolygonBounds = polygon.getBounds();
385
- var targetCenterDifference = polygonPosition.clone().difference(basePolygonBounds.getCenter());
386
- var rotationalOffset = rotationCenter ? polygonPosition.difference(rotationCenter) : { x: 0, y: 0 };
387
- // var rotationalOffset = { x: 0, y: 0 };
388
- var tileCenter = basePolygonBounds.getCenter().sub(targetCenterDifference);
389
-
390
- // Get the position offset of the polygon
391
- var targetTextureSize = new Vertex(textureSize.width, textureSize.height);
392
- var targetTextureOffset = new Vertex(-textureSize.width / 2, -textureSize.height / 2).sub(targetCenterDifference);
393
-
394
- this.ctx.save();
395
-
396
- // this.ctx.translate(
397
- // this.offset.x + (tileCenter.x - rotationalOffset.x * 0 + targetTextureOffset.x * 0.0) * this.scale.x,
398
- // this.offset.y + (tileCenter.y - rotationalOffset.y * 0 + targetTextureOffset.y * 0.0) * this.scale.y
399
- // );
400
- this.ctx.translate(
401
- this.offset.x + (tileCenter.x - rotationalOffset.x * 0 + targetTextureOffset.x * 0.0) * this.scale.x,
402
- this.offset.y + (tileCenter.y - rotationalOffset.y * 0 + targetTextureOffset.y * 0.0) * this.scale.y
403
- );
404
- this.ctx.rotate(rotation);
405
-
406
- drawutils.helpers.clipPoly(
407
- this.ctx,
408
- {
409
- x: (-targetCenterDifference.x * 1 - tileCenter.x - rotationalOffset.x) * this.scale.x,
410
- y: (-targetCenterDifference.y * 1 - tileCenter.y - rotationalOffset.y) * this.scale.y
411
- },
412
- this.scale,
413
- polygon.vertices
414
- );
415
- this.ctx.drawImage(
416
- textureImage,
417
- 0,
418
- 0,
419
- textureImage.naturalWidth - 1, // There is this horrible Safari bug (fixed in newer versions)
420
- textureImage.naturalHeight - 1, // To avoid errors substract 1 here.
421
- (-polygonPosition.x + targetTextureOffset.x * 1 - rotationalOffset.x * 1) * this.scale.x,
422
- (-polygonPosition.y + targetTextureOffset.y * 1 - rotationalOffset.y * 1) * this.scale.y,
423
- targetTextureSize.x * this.scale.x,
424
- targetTextureSize.y * this.scale.y
425
- );
426
-
427
- // const scaledTextureSize = new Bounds(
428
- // new Vertex(
429
- // -polygonPosition.x + targetTextureOffset.x - rotationalOffset.x,
430
- // -polygonPosition.y + targetTextureOffset.y - rotationalOffset.y
431
- // ).scaleXY(this.scale, rotationCenter),
432
- // new Vertex(
433
- // -polygonPosition.x + targetTextureOffset.x - rotationalOffset.x + targetTextureSize.x,
434
- // -polygonPosition.y + targetTextureOffset.y - rotationalOffset.y + targetTextureSize.y
435
- // ).scaleXY(this.scale, rotationCenter)
436
- // );
437
- // this.ctx.drawImage(
438
- // textureImage,
439
- // 0,
440
- // 0,
441
- // textureImage.naturalWidth - 1, // There is this horrible Safari bug (fixed in newer versions)
442
- // textureImage.naturalHeight - 1, // To avoid errors substract 1 here.
443
- // scaledTextureSize.min.x,
444
- // scaledTextureSize.min.y,
445
- // scaledTextureSize.width,
446
- // scaledTextureSize.height
447
- // );
448
-
449
- this.ctx.restore();
450
- }
451
- */
452
- /**
453
- * Draw a rectangle.
454
- *
455
- * @param {XYCoords} position - The upper left corner of the rectangle.
456
- * @param {number} width - The width of the rectangle.
457
- * @param {number} height - The height of the rectangle.
458
- * @param {string} color - The color to use.
459
- * @param {number=1} lineWidth - (optional) The line with to use (default is 1).
460
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
461
- *
462
- * @return {void}
463
- * @instance
464
- * @memberof drawutils
465
- **/
466
- rect(position, width, height, color, lineWidth, strokeOptions) {
467
- this.ctx.save();
468
- this.ctx.beginPath();
469
- this.applyStrokeOpts(strokeOptions);
470
- this.ctx.moveTo(this.offset.x + position.x * this.scale.x, this.offset.y + position.y * this.scale.y);
471
- this.ctx.lineTo(this.offset.x + (position.x + width) * this.scale.x, this.offset.y + position.y * this.scale.y);
472
- this.ctx.lineTo(this.offset.x + (position.x + width) * this.scale.x, this.offset.y + (position.y + height) * this.scale.y);
473
- this.ctx.lineTo(this.offset.x + position.x * this.scale.x, this.offset.y + (position.y + height) * this.scale.y);
474
- // this.ctx.lineTo( this.offset.x+position.x*this.scale.x, this.offset.y+position.y*this.scale.y );
475
- this.ctx.closePath();
476
- this.ctx.lineWidth = lineWidth || 1;
477
- this._fillOrDraw(color);
478
- this.ctx.restore();
479
- }
480
- /**
481
- * Draw the given (cubic) bézier curve.
482
- *
483
- * @method cubicBezier
484
- * @param {XYCoords} startPoint - The start point of the cubic Bézier curve
485
- * @param {XYCoords} endPoint - The end point the cubic Bézier curve.
486
- * @param {XYCoords} startControlPoint - The start control point the cubic Bézier curve.
487
- * @param {XYCoords} endControlPoint - The end control point the cubic Bézier curve.
488
- * @param {string} color - The CSS color to draw the curve with.
489
- * @param {number} lineWidth - (optional) The line width to use.
490
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
491
- *
492
- * @return {void}
493
- * @instance
494
- * @memberof drawutils
495
- */
496
- cubicBezier(startPoint, endPoint, startControlPoint, endControlPoint, color, lineWidth, strokeOptions) {
497
- if (startPoint instanceof CubicBezierCurve_1.CubicBezierCurve) {
498
- this.cubicBezier(startPoint.startPoint, startPoint.endPoint, startPoint.startControlPoint, startPoint.endControlPoint, color, lineWidth);
499
- return;
500
- }
501
- // Draw curve
502
- this.ctx.save();
503
- this.ctx.beginPath();
504
- this.applyStrokeOpts(strokeOptions);
505
- this.ctx.moveTo(this.offset.x + startPoint.x * this.scale.x, this.offset.y + startPoint.y * this.scale.y);
506
- this.ctx.bezierCurveTo(this.offset.x + startControlPoint.x * this.scale.x, this.offset.y + startControlPoint.y * this.scale.y, this.offset.x + endControlPoint.x * this.scale.x, this.offset.y + endControlPoint.y * this.scale.y, this.offset.x + endPoint.x * this.scale.x, this.offset.y + endPoint.y * this.scale.y);
507
- //this.ctx.closePath();
508
- this.ctx.lineWidth = lineWidth || 2;
509
- this._fillOrDraw(color);
510
- this.ctx.restore();
511
- }
512
- /**
513
- * Draw the given (quadratic) bézier curve.
514
- *
515
- * @method quadraticBezier
516
- * @param {XYCoords} startPoint - The start point of the cubic Bézier curve
517
- * @param {XYCoords} controlPoint - The control point the cubic Bézier curve.
518
- * @param {XYCoords} endPoint - The end control point the cubic Bézier curve.
519
- * @param {string} color - The CSS color to draw the curve with.
520
- * @param {number|string} lineWidth - (optional) The line width to use.
521
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
522
- *
523
- * @return {void}
524
- * @instance
525
- * @memberof drawutils
526
- */
527
- quadraticBezier(startPoint, controlPoint, endPoint, color, lineWidth, strokeOptions) {
528
- // Draw curve
529
- this.ctx.save();
530
- this.ctx.beginPath();
531
- this.applyStrokeOpts(strokeOptions);
532
- this.ctx.moveTo(this.offset.x + startPoint.x * this.scale.x, this.offset.y + startPoint.y * this.scale.y);
533
- this.ctx.quadraticCurveTo(this.offset.x + controlPoint.x * this.scale.x, this.offset.y + controlPoint.y * this.scale.y, this.offset.x + endPoint.x * this.scale.x, this.offset.y + endPoint.y * this.scale.y);
534
- this.ctx.lineWidth = lineWidth || 2;
535
- this._fillOrDraw(color);
536
- this.ctx.restore();
537
- }
538
- /**
539
- * Draw the given (cubic) Bézier path.
540
- *
541
- * The given path must be an array with n*3+1 vertices, where n is the number of
542
- * curves in the path:
543
- * <pre> [ point1, point1_startControl, point2_endControl, point2, point2_startControl, point3_endControl, point3, ... pointN_endControl, pointN ]</pre>
544
- *
545
- * @method cubicBezierPath
546
- * @param {XYCoords[]} path - The cubic bezier path as described above.
547
- * @param {string} color - The CSS colot to draw the path with.
548
- * @param {number=1} lineWidth - (optional) The line width to use.
549
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
550
- *
551
- * @return {void}
552
- * @instance
553
- * @memberof drawutils
554
- */
555
- cubicBezierPath(path, color, lineWidth, strokeOptions, isOpen) {
556
- if (!path || path.length == 0) {
557
- return;
558
- }
559
- // Draw curve
560
- this.ctx.save();
561
- this.ctx.beginPath();
562
- var endPoint;
563
- var startControlPoint;
564
- var endControlPoint;
565
- this.applyStrokeOpts(strokeOptions);
566
- this.ctx.moveTo(this.offset.x + path[0].x * this.scale.x, this.offset.y + path[0].y * this.scale.y);
567
- for (var i = 1; i < path.length; i += 3) {
568
- startControlPoint = path[i];
569
- endControlPoint = path[i + 1];
570
- endPoint = path[i + 2];
571
- this.ctx.bezierCurveTo(this.offset.x + startControlPoint.x * this.scale.x, this.offset.y + startControlPoint.y * this.scale.y, this.offset.x + endControlPoint.x * this.scale.x, this.offset.y + endControlPoint.y * this.scale.y, this.offset.x + endPoint.x * this.scale.x, this.offset.y + endPoint.y * this.scale.y);
572
- }
573
- if (!isOpen) {
574
- this.ctx.closePath();
575
- }
576
- this.ctx.lineWidth = lineWidth || 1;
577
- this._fillOrDraw(color);
578
- this.ctx.restore();
579
- }
580
- /**
581
- * Draw the given handle and handle point (used to draw interactive Bézier curves).
582
- *
583
- * The colors for this are fixed and cannot be specified.
584
- *
585
- * @method handle
586
- * @param {XYCoords} startPoint - The start of the handle.
587
- * @param {XYCoords} endPoint - The end point of the handle.
588
- * @return {void}
589
- * @instance
590
- * @memberof drawutils
591
- */
592
- handle(startPoint, endPoint) {
593
- // Draw handles
594
- // (No need to save and restore here)
595
- this.point(startPoint, "rgb(0,32,192)");
596
- this.square(endPoint, 5, "rgba(0,128,192,0.5)");
597
- }
598
- /**
599
- * Draw a handle line (with a light grey).
600
- *
601
- * @method handleLine
602
- * @param {XYCoords} startPoint - The start point to draw the handle at.
603
- * @param {XYCoords} endPoint - The end point to draw the handle at.
604
- * @return {void}
605
- * @instance
606
- * @memberof drawutils
607
- */
608
- handleLine(startPoint, endPoint) {
609
- // Draw handle lines
610
- this.line(startPoint, endPoint, "rgba(128,128,128, 0.5)", undefined);
611
- }
612
- /**
613
- * Draw a 1x1 dot with the specified (CSS-) color.
614
- *
615
- * @method dot
616
- * @param {XYCoords} p - The position to draw the dot at.
617
- * @param {string} color - The CSS color to draw the dot with.
618
- * @return {void}
619
- * @instance
620
- * @memberof drawutils
621
- */
622
- dot(p, color) {
623
- this.ctx.save();
624
- this.ctx.beginPath();
625
- this.ctx.setLineDash([]); // Clear line-dash settings
626
- this.ctx.moveTo(Math.round(this.offset.x + this.scale.x * p.x), Math.round(this.offset.y + this.scale.y * p.y));
627
- this.ctx.lineTo(Math.round(this.offset.x + this.scale.x * p.x + 1), Math.round(this.offset.y + this.scale.y * p.y + 1));
628
- this.ctx.closePath();
629
- this.ctx.lineWidth = 1;
630
- this._fillOrDraw(color);
631
- this.ctx.restore();
632
- }
633
- /**
634
- * Draw the given point with the specified (CSS-) color and radius 3.
635
- *
636
- * @method point
637
- * @param {XYCoords} p - The position to draw the point at.
638
- * @param {string} color - The CSS color to draw the point with.
639
- * @return {void}
640
- * @instance
641
- * @memberof drawutils
642
- */
643
- point(p, color) {
644
- var radius = 3;
645
- this.ctx.setLineDash([]); // Clear line-dash settings
646
- this.ctx.beginPath();
647
- this.ctx.arc(this.offset.x + p.x * this.scale.x, this.offset.y + p.y * this.scale.y, radius, 0, 2 * Math.PI, false);
648
- this.ctx.closePath();
649
- this.ctx.lineWidth = 1;
650
- this._fillOrDraw(color);
651
- }
652
- /**
653
- * Draw a circle with the specified (CSS-) color and radius.<br>
654
- * <br>
655
- * Note that if the x- and y- scales are different the result will be an ellipse rather than a circle.
656
- *
657
- * @method circle
658
- * @param {XYCoords} center - The center of the circle.
659
- * @param {number} radius - The radius of the circle.
660
- * @param {string} color - The CSS color to draw the circle with.
661
- * @param {number} lineWidth - The line width (optional, default=1).
662
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
663
- *
664
- * @return {void}
665
- * @instance
666
- * @memberof drawutils
667
- */
668
- circle(center, radius, color, lineWidth, strokeOptions) {
669
- this.applyStrokeOpts(strokeOptions);
670
- this.ctx.beginPath();
671
- this.ctx.ellipse(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y, radius * this.scale.x, radius * this.scale.y, 0.0, 0.0, Math.PI * 2);
672
- this.ctx.closePath();
673
- this.ctx.lineWidth = lineWidth || 1;
674
- this._fillOrDraw(color);
675
- }
676
- /**
677
- * Draw a circular arc (section of a circle) with the given CSS color.
678
- *
679
- * @method circleArc
680
- * @param {XYCoords} center - The center of the circle.
681
- * @param {number} radius - The radius of the circle.
682
- * @param {number} startAngle - The angle to start at.
683
- * @param {number} endAngle - The angle to end at.
684
- * @param {string=#000000} color - The CSS color to draw the circle with.
685
- * @param {number=1} lineWidth - The line width to use
686
- * @param {boolean=false} options.asSegment - If `true` then no beginPath and no draw will be applied (as part of larger path).
687
- * @param {number=} options.dashOffset - (optional) `See StrokeOptions`.
688
- * @param {number=[]} options.dashArray - (optional) `See StrokeOptions`.
689
- *
690
- * @return {void}
691
- * @instance
692
- * @memberof drawutils
693
- */
694
- circleArc(center, radius, startAngle, endAngle, color, lineWidth, options) {
695
- if (!options || !options.asSegment) {
696
- this.ctx.beginPath();
697
- }
698
- this.applyStrokeOpts(options);
699
- this.ctx.ellipse(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y, radius * this.scale.x, radius * this.scale.y, 0.0, startAngle, endAngle, false);
700
- if (!options || !options.asSegment) {
701
- // this.ctx.closePath();
702
- this.ctx.lineWidth = lineWidth || 1;
703
- this._fillOrDraw(color || "#000000");
704
- }
705
- }
706
- /**
707
- * Draw an ellipse with the specified (CSS-) color and thw two radii.
708
- *
709
- * @method ellipse
710
- * @param {XYCoords} center - The center of the ellipse.
711
- * @param {number} radiusX - The radius of the ellipse.
712
- * @param {number} radiusY - The radius of the ellipse.
713
- * @param {string} color - The CSS color to draw the ellipse with.
714
- * @param {number} lineWidth=1 - An optional line width param (default is 1).
715
- * @param {number=} rotation - (optional, default=0) The rotation of the ellipse.
716
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
717
- *
718
- * @return {void}
719
- * @instance
720
- * @memberof drawutils
721
- */
722
- ellipse(center, radiusX, radiusY, color, lineWidth, rotation, strokeOptions) {
723
- if (typeof rotation === "undefined") {
724
- rotation = 0.0;
725
- }
726
- this.applyStrokeOpts(strokeOptions);
727
- this.ctx.beginPath();
728
- this.ctx.ellipse(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y, radiusX * this.scale.x, radiusY * this.scale.y, rotation, 0.0, Math.PI * 2);
729
- this.ctx.closePath();
730
- this.ctx.lineWidth = lineWidth || 1;
731
- this._fillOrDraw(color);
732
- }
733
- /**
734
- * Draw square at the given center, size and with the specified (CSS-) color.<br>
735
- * <br>
736
- * Note that if the x-scale and the y-scale are different the result will be a rectangle rather than a square.
737
- *
738
- * @method square
739
- * @param {XYCoords} center - The center of the square.
740
- * @param {number} size - The size of the square.
741
- * @param {string} color - The CSS color to draw the square with.
742
- * @param {number} lineWidth - The line with to use (optional, default is 1).
743
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
744
- *
745
- * @return {void}
746
- * @instance
747
- * @memberof drawutils
748
- */
749
- square(center, size, color, lineWidth, strokeOptions) {
750
- this.applyStrokeOpts(strokeOptions);
751
- this.ctx.beginPath();
752
- this.ctx.rect(this.offset.x + (center.x - size / 2.0) * this.scale.x, this.offset.y + (center.y - size / 2.0) * this.scale.y, size * this.scale.x, size * this.scale.y);
753
- this.ctx.closePath();
754
- this.ctx.lineWidth = lineWidth || 1;
755
- this._fillOrDraw(color);
756
- }
757
- /**
758
- * Draw a grid of horizontal and vertical lines with the given (CSS-) color.
759
- *
760
- * @method grid
761
- * @param {XYCoords} center - The center of the grid.
762
- * @param {number} width - The total width of the grid (width/2 each to the left and to the right).
763
- * @param {number} height - The total height of the grid (height/2 each to the top and to the bottom).
764
- * @param {number} sizeX - The horizontal grid size.
765
- * @param {number} sizeY - The vertical grid size.
766
- * @param {string} color - The CSS color to draw the grid with.
767
- * @return {void}
768
- * @instance
769
- * @memberof drawutils
770
- */
771
- grid(center, width, height, sizeX, sizeY, color) {
772
- this.ctx.setLineDash([]); // Clear line-dash settings
773
- this.ctx.beginPath();
774
- var yMin = -Math.ceil((height * 0.5) / sizeY) * sizeY;
775
- var yMax = height / 2;
776
- for (var x = -Math.ceil((width * 0.5) / sizeX) * sizeX; x < width / 2; x += sizeX) {
777
- this.ctx.moveTo(this.offset.x + (center.x + x) * this.scale.x, this.offset.y + (center.y + yMin) * this.scale.y);
778
- this.ctx.lineTo(this.offset.x + (center.x + x) * this.scale.x, this.offset.y + (center.y + yMax) * this.scale.y);
779
- }
780
- var xMin = -Math.ceil((width * 0.5) / sizeX) * sizeX; // -Math.ceil((height*0.5)/sizeY)*sizeY;
781
- var xMax = width / 2; // height/2;
782
- for (var y = -Math.ceil((height * 0.5) / sizeY) * sizeY; y < height / 2; y += sizeY) {
783
- this.ctx.moveTo(this.offset.x + (center.x + xMin) * this.scale.x - 4, this.offset.y + (center.y + y) * this.scale.y);
784
- this.ctx.lineTo(this.offset.x + (center.x + xMax) * this.scale.x + 4, this.offset.y + (center.y + y) * this.scale.y);
785
- }
786
- this.ctx.strokeStyle = color;
787
- this.ctx.lineWidth = 1.0;
788
- this.ctx.stroke();
789
- this.ctx.closePath();
790
- }
791
- /**
792
- * Draw a raster of crosshairs in the given grid.<br>
793
- *
794
- * This works analogue to the grid() function
795
- *
796
- * @method raster
797
- * @param {XYCoords} center - The center of the raster.
798
- * @param {number} width - The total width of the raster (width/2 each to the left and to the right).
799
- * @param {number} height - The total height of the raster (height/2 each to the top and to the bottom).
800
- * @param {number} sizeX - The horizontal raster size.
801
- * @param {number} sizeY - The vertical raster size.
802
- * @param {string} color - The CSS color to draw the raster with.
803
- * @return {void}
804
- * @instance
805
- * @memberof drawutils
806
- */
807
- raster(center, width, height, sizeX, sizeY, color) {
808
- this.ctx.save();
809
- this.ctx.setLineDash([]); // Clear line-dash settings
810
- this.ctx.beginPath();
811
- for (var x = -Math.ceil((width * 0.5) / sizeX) * sizeX; x < width / 2; x += sizeX) {
812
- for (var y = -Math.ceil((height * 0.5) / sizeY) * sizeY; y < height / 2; y += sizeY) {
813
- // Draw a crosshair
814
- this.ctx.moveTo(this.offset.x + (center.x + x) * this.scale.x - 4, this.offset.y + (center.y + y) * this.scale.y);
815
- this.ctx.lineTo(this.offset.x + (center.x + x) * this.scale.x + 4, this.offset.y + (center.y + y) * this.scale.y);
816
- this.ctx.moveTo(this.offset.x + (center.x + x) * this.scale.x, this.offset.y + (center.y + y) * this.scale.y - 4);
817
- this.ctx.lineTo(this.offset.x + (center.x + x) * this.scale.x, this.offset.y + (center.y + y) * this.scale.y + 4);
818
- }
819
- }
820
- this.ctx.strokeStyle = color;
821
- this.ctx.lineWidth = 1.0;
822
- this.ctx.stroke();
823
- this.ctx.closePath();
824
- this.ctx.restore();
825
- }
826
- /**
827
- * Draw a diamond handle (square rotated by 45°) with the given CSS color.
828
- *
829
- * It is an inherent feature of the handle functions that the drawn elements are not scaled and not
830
- * distorted. So even if the user zooms in or changes the aspect ratio, the handles will be drawn
831
- * as even shaped diamonds.
832
- *
833
- * @method diamondHandle
834
- * @param {XYCoords} center - The center of the diamond.
835
- * @param {number} size - The x/y-size of the diamond.
836
- * @param {string} color - The CSS color to draw the diamond with.
837
- * @return {void}
838
- * @instance
839
- * @memberof drawutils
840
- */
841
- diamondHandle(center, size, color) {
842
- this.ctx.setLineDash([]); // Clear line-dash settings
843
- this.ctx.beginPath();
844
- this.ctx.moveTo(this.offset.x + center.x * this.scale.x - size / 2.0, this.offset.y + center.y * this.scale.y);
845
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y - size / 2.0);
846
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x + size / 2.0, this.offset.y + center.y * this.scale.y);
847
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y + size / 2.0);
848
- this.ctx.closePath();
849
- this.ctx.lineWidth = 1;
850
- this._fillOrDraw(color);
851
- }
852
- /**
853
- * Draw a square handle with the given CSS color.<br>
854
- * <br>
855
- * It is an inherent feature of the handle functions that the drawn elements are not scaled and not
856
- * distorted. So even if the user zooms in or changes the aspect ratio, the handles will be drawn
857
- * as even shaped squares.
858
- *
859
- * @method squareHandle
860
- * @param {XYCoords} center - The center of the square.
861
- * @param {number} size - The x/y-size of the square.
862
- * @param {string} color - The CSS color to draw the square with.
863
- * @return {void}
864
- * @instance
865
- * @memberof drawutils
866
- */
867
- squareHandle(center, size, color) {
868
- this.ctx.setLineDash([]); // Clear line-dash settings
869
- this.ctx.beginPath();
870
- this.ctx.rect(this.offset.x + center.x * this.scale.x - size / 2.0, this.offset.y + center.y * this.scale.y - size / 2.0, size, size);
871
- this.ctx.closePath();
872
- this.ctx.lineWidth = 1;
873
- this._fillOrDraw(color);
874
- }
875
- /**
876
- * Draw a circle handle with the given CSS color.<br>
877
- * <br>
878
- * It is an inherent feature of the handle functions that the drawn elements are not scaled and not
879
- * distorted. So even if the user zooms in or changes the aspect ratio, the handles will be drawn
880
- * as even shaped circles.
881
- *
882
- * @method circleHandle
883
- * @param {XYCoords} center - The center of the circle.
884
- * @param {number} radius - The radius of the circle.
885
- * @param {string} color - The CSS color to draw the circle with.
886
- * @return {void}
887
- * @instance
888
- * @memberof drawutils
889
- */
890
- circleHandle(center, radius, color) {
891
- radius = radius || 3;
892
- this.ctx.setLineDash([]); // Clear line-dash settings
893
- this.ctx.beginPath();
894
- this.ctx.arc(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y, radius, 0, 2 * Math.PI, false);
895
- this.ctx.closePath();
896
- this.ctx.lineWidth = 1;
897
- this._fillOrDraw(color);
898
- }
899
- /**
900
- * Draw a crosshair with given radius and color at the given position.<br>
901
- * <br>
902
- * Note that the crosshair radius will not be affected by scaling.
903
- *
904
- * @method crosshair
905
- * @param {XYCoords} center - The center of the crosshair.
906
- * @param {number} radius - The radius of the crosshair.
907
- * @param {string} color - The CSS color to draw the crosshair with.
908
- * @param {number=0.5} lineWidth - (optional, default=0.5) The line width to use.
909
- * @return {void}
910
- * @instance
911
- * @memberof drawutils
912
- */
913
- crosshair(center, radius, color, lineWidth) {
914
- this.ctx.save();
915
- this.ctx.setLineDash([]); // Clear line-dash settings
916
- this.ctx.beginPath();
917
- this.ctx.moveTo(this.offset.x + center.x * this.scale.x - radius, this.offset.y + center.y * this.scale.y);
918
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x + radius, this.offset.y + center.y * this.scale.y);
919
- this.ctx.moveTo(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y - radius);
920
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x, this.offset.y + center.y * this.scale.y + radius);
921
- this.ctx.strokeStyle = color;
922
- this.ctx.lineWidth = lineWidth || 0.5;
923
- this.ctx.stroke();
924
- this.ctx.closePath();
925
- this.ctx.restore();
926
- }
927
- /**
928
- * Draw a cross with diagonal axes with given radius, color and lineWidth at the given position.<br>
929
- * <br>
930
- * Note that the x's radius will not be affected by scaling.
931
- *
932
- * @method crosshair
933
- * @param {XYCoords} center - The center of the crosshair.
934
- * @param {number} radius - The radius of the crosshair.
935
- * @param {string} color - The CSS color to draw the crosshair with.
936
- * @param {number=1} lineWidth - (optional, default=1.0) The line width to use.
937
- * @return {void}
938
- * @instance
939
- * @memberof drawutils
940
- */
941
- cross(center, radius, color, lineWidth) {
942
- this.ctx.save();
943
- this.ctx.setLineDash([]); // Clear line-dash settings
944
- this.ctx.beginPath();
945
- this.ctx.moveTo(this.offset.x + center.x * this.scale.x - radius, this.offset.y + center.y * this.scale.y - radius);
946
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x + radius, this.offset.y + center.y * this.scale.y + radius);
947
- this.ctx.moveTo(this.offset.x + center.x * this.scale.x - radius, this.offset.y + center.y * this.scale.y + radius);
948
- this.ctx.lineTo(this.offset.x + center.x * this.scale.x + radius, this.offset.y + center.y * this.scale.y - radius);
949
- this.ctx.strokeStyle = color;
950
- this.ctx.lineWidth = lineWidth || 1.0;
951
- this.ctx.stroke();
952
- this.ctx.closePath();
953
- this.ctx.restore();
954
- }
955
- /**
956
- * Draw a polygon.
957
- *
958
- * @method polygon
959
- * @param {Polygon} polygon - The polygon to draw.
960
- * @param {string} color - The CSS color to draw the polygon with.
961
- * @param {string} lineWidth - The line width to use.
962
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
963
- *
964
- * @return {void}
965
- * @instance
966
- * @memberof drawutils
967
- */
968
- polygon(polygon, color, lineWidth, strokeOptions) {
969
- this.polyline(polygon.vertices, polygon.isOpen, color, lineWidth, strokeOptions);
970
- }
971
- /**
972
- * Draw a polygon line (alternative function to the polygon).
973
- *
974
- * @method polyline
975
- * @param {XYCoords[]} vertices - The polygon vertices to draw.
976
- * @param {boolan} isOpen - If true the polyline will not be closed at its end.
977
- * @param {string} color - The CSS color to draw the polygon with.
978
- * @param {number} lineWidth - The line width (default is 1.0);
979
- * @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
980
- *
981
- * @return {void}
982
- * @instance
983
- * @memberof drawutils
984
- */
985
- polyline(vertices, isOpen, color, lineWidth, strokeOptions) {
986
- if (vertices.length <= 1) {
987
- return;
988
- }
989
- this.ctx.save();
990
- this.applyStrokeOpts(strokeOptions);
991
- this.ctx.beginPath();
992
- this.ctx.lineWidth = lineWidth || 1.0;
993
- this.ctx.moveTo(this.offset.x + vertices[0].x * this.scale.x, this.offset.y + vertices[0].y * this.scale.y);
994
- for (var i = 0; i < vertices.length; i++) {
995
- this.ctx.lineTo(this.offset.x + vertices[i].x * this.scale.x, this.offset.y + vertices[i].y * this.scale.y);
996
- }
997
- if (!isOpen)
998
- // && vertices.length > 2 )
999
- this.ctx.closePath();
1000
- this._fillOrDraw(color);
1001
- this.ctx.closePath();
1002
- this.ctx.setLineDash([]);
1003
- this.ctx.restore();
1004
- }
1005
- /**
1006
- * Draw a text at the given relative position.
1007
- *
1008
- * @method text
1009
- * @param {string} text - The text to draw.
1010
- * @param {number} x - The x-position to draw the text at.
1011
- * @param {number} y - The y-position to draw the text at.
1012
- * @param {string=} options.color - The Color to use.
1013
- * @param {string=} options.fontFamily - The font family to use.
1014
- * @param {number=} options.fontSize - The font size (in pixels) to use.
1015
- * @param {FontStyle=} options.fontStyle - The font style to use.
1016
- * @param {FontWeight=} options.fontWeight - The font weight to use.
1017
- * @param {number=} options.lineHeight - The line height (in pixels) to use.
1018
- * @param {number=} options.rotation - The (optional) rotation in radians.
1019
- * @param {string=} options.textAlign - The text align to use. According to the specifiactions (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textAlign) valid values are `"left" || "right" || "center" || "start" || "end"`.
1020
- * @return {void}
1021
- * @instance
1022
- * @memberof drawutils
1023
- */
1024
- text(text, x, y, options) {
1025
- // See https://stackoverflow.com/a/23523697
1026
- var _a, _b, _c;
1027
- options = options || {};
1028
- this.ctx.save();
1029
- let relX = this.offset.x + x * this.scale.x;
1030
- let relY = this.offset.y + y * this.scale.y;
1031
- const color = options.color || "black";
1032
- if (options.fontSize || options.fontFamily) {
1033
- // Scaling of text only works in uniform mode
1034
- this.ctx.font =
1035
- (options.fontWeight ? options.fontWeight + " " : "") +
1036
- (options.fontStyle ? options.fontStyle + " " : "") +
1037
- (options.fontSize ? options.fontSize * this.scale.x + "px " : " ") +
1038
- (options.fontFamily
1039
- ? options.fontFamily.indexOf(" ") === -1
1040
- ? options.fontFamily
1041
- : `"${options.fontFamily}"`
1042
- : "Arial");
1043
- }
1044
- if (options.textAlign) {
1045
- this.ctx.textAlign = options.textAlign;
1046
- }
1047
- const rotation = (_a = options.rotation) !== null && _a !== void 0 ? _a : 0.0;
1048
- const lineHeight = ((_c = (_b = options.lineHeight) !== null && _b !== void 0 ? _b : options.fontSize) !== null && _c !== void 0 ? _c : 0) * this.scale.x;
1049
- this.ctx.translate(relX, relY);
1050
- this.ctx.rotate(rotation);
1051
- if (this.fillShapes) {
1052
- this.ctx.fillStyle = color;
1053
- this.ctx.fillText(text, 0, lineHeight / 2);
1054
- }
1055
- else {
1056
- this.ctx.strokeStyle = color;
1057
- this.ctx.strokeText(text, 0, lineHeight / 2);
1058
- }
1059
- // this.ctx.translate(-relX, -relY);
1060
- // this.ctx.rotate(-rotation); // is this necessary before 'restore()'?
1061
- this.ctx.restore();
1062
- }
1063
- /**
1064
- * Draw a non-scaling text label at the given position.
1065
- *
1066
- * Note that these are absolute label positions, they are not affected by offset or scale.
1067
- *
1068
- * @method label
1069
- * @param {string} text - The text to draw.
1070
- * @param {number} x - The x-position to draw the text at.
1071
- * @param {number} y - The y-position to draw the text at.
1072
- * @param {number=} rotation - The (optional) rotation in radians (default=0).
1073
- * @param {string=} color - The color to render the text with (default=black).
1074
- * @return {void}
1075
- * @instance
1076
- * @memberof drawutils
1077
- */
1078
- label(text, x, y, rotation, color) {
1079
- this.ctx.save();
1080
- this.ctx.font = "lighter 9pt Arial";
1081
- this.ctx.translate(x, y);
1082
- if (typeof rotation !== "undefined")
1083
- this.ctx.rotate(rotation);
1084
- this.ctx.fillStyle = color || "black";
1085
- if (this.fillShapes) {
1086
- this.ctx.fillText(text, 0, 0);
1087
- }
1088
- else {
1089
- this.ctx.strokeText(text, 0, 0);
1090
- }
1091
- this.ctx.restore();
1092
- }
1093
- /**
1094
- * Draw an SVG-like path given by the specified path data.
1095
- *
1096
- *
1097
- * @method path
1098
- * @param {SVGPathData} pathData - An array of path commands and params.
1099
- * @param {string=null} color - (optional) The color to draw this path with (default is null).
1100
- * @param {number=1} lineWidth - (optional) the line width to use (default is 1).
1101
- * @param {boolean=false} options.inplace - (optional) If set to true then path transforamtions (scale and translate) will be done in-place in the array. This can boost the performance.
1102
- * @param {number=} options.dashOffset - (optional) `See StrokeOptions`.
1103
- * @param {number=[]} options.dashArray - (optional) `See StrokeOptions`.
1104
- * @instance
1105
- * @memberof drawutils
1106
- * @return {R} An instance representing the drawn path.
1107
- */
1108
- path(pathData, color, lineWidth, options) {
1109
- const d = options && options.inplace ? pathData : drawutilssvg_1.drawutilssvg.copyPathData(pathData);
1110
- drawutilssvg_1.drawutilssvg.transformPathData(d, this.offset, this.scale);
1111
- if (color) {
1112
- this.ctx.strokeStyle = color;
1113
- }
1114
- this.ctx.lineWidth = lineWidth || 1;
1115
- this.applyStrokeOpts(options);
1116
- if (this.fillShapes) {
1117
- if (color) {
1118
- this.ctx.fillStyle = color;
1119
- }
1120
- this.ctx.fill(new Path2D(d.join(" ")));
1121
- }
1122
- else {
1123
- if (color) {
1124
- this.ctx.strokeStyle = color;
1125
- }
1126
- this.ctx.stroke(new Path2D(d.join(" ")));
1127
- }
1128
- }
1129
- /**
1130
- * Due to gl compatibility there is a generic 'clear' function required
1131
- * to avoid accessing the context object itself directly.
1132
- *
1133
- * This function just fills the whole canvas with a single color.
1134
- *
1135
- * @param {string} color - The color to clear with.
1136
- **/
1137
- clear(color) {
1138
- this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);
1139
- this.ctx.fillStyle = color;
1140
- this.ctx.fillRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);
1141
- }
1142
- }
1143
- exports.drawutils = drawutils;
1144
- drawutils.helpers = {
1145
- // A helper function to define the clipping path.
1146
- // This could be a candidate for the draw library.
1147
- clipPoly: (ctx, offset, scale, vertices) => {
1148
- ctx.beginPath();
1149
- // Set clip mask
1150
- ctx.moveTo(offset.x + vertices[0].x * scale.x, offset.y + vertices[0].y * scale.y);
1151
- for (var i = 1; i < vertices.length; i++) {
1152
- const vert = vertices[i];
1153
- ctx.lineTo(offset.x + vert.x * scale.x, offset.y + vert.y * scale.y);
1154
- }
1155
- ctx.closePath();
1156
- ctx.clip();
1157
- }
1158
- };
1159
- //# sourceMappingURL=draw.js.map