plotboilerplate 1.27.1 → 1.28.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.
- package/dist/index.esm.js +135 -36
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/plotboilerplate.browser.min.js +1 -1
- package/dist/plotboilerplate.browser.min.js.map +1 -1
- package/dist/plotboilerplate.js +96 -17
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +2 -1
- package/src/_cjs/BezierPath.d.ts +610 -0
- package/src/_cjs/BezierPath.js +1127 -0
- package/src/_cjs/BezierPath.js.map +1 -0
- package/src/_cjs/Bounds.d.ts +252 -0
- package/src/_cjs/Bounds.js +320 -0
- package/src/_cjs/Bounds.js.map +1 -0
- package/src/_cjs/Circle.d.ts +214 -0
- package/src/_cjs/Circle.js +339 -0
- package/src/_cjs/Circle.js.map +1 -0
- package/src/_cjs/CircleSector.d.ts +211 -0
- package/src/_cjs/CircleSector.js +364 -0
- package/src/_cjs/CircleSector.js.map +1 -0
- package/src/_cjs/CubicBezierCurve.d.ts +656 -0
- package/src/_cjs/CubicBezierCurve.js +1062 -0
- package/src/_cjs/CubicBezierCurve.js.map +1 -0
- package/src/_cjs/Grid.d.ts +83 -0
- package/src/_cjs/Grid.js +90 -0
- package/src/_cjs/Grid.js.map +1 -0
- package/src/_cjs/KeyHandler.d.ts +177 -0
- package/src/_cjs/KeyHandler.js +435 -0
- package/src/_cjs/KeyHandler.js.map +1 -0
- package/src/_cjs/Line.d.ts +134 -0
- package/src/_cjs/Line.js +220 -0
- package/src/_cjs/Line.js.map +1 -0
- package/src/_cjs/MouseHandler.d.ts +283 -0
- package/src/_cjs/MouseHandler.js +423 -0
- package/src/_cjs/MouseHandler.js.map +1 -0
- package/src/_cjs/PBImage.d.ts +81 -0
- package/src/_cjs/PBImage.js +61 -0
- package/src/_cjs/PBImage.js.map +1 -0
- package/src/_cjs/PBText.d.ts +118 -0
- package/src/_cjs/PBText.js +63 -0
- package/src/_cjs/PBText.js.map +1 -0
- package/src/_cjs/PlotBoilerplate.d.ts +899 -0
- package/src/_cjs/PlotBoilerplate.js +2348 -0
- package/src/_cjs/PlotBoilerplate.js.map +1 -0
- package/src/_cjs/Polygon.d.ts +520 -0
- package/src/_cjs/Polygon.js +933 -0
- package/src/_cjs/Polygon.js.map +1 -0
- package/src/_cjs/SVGBuilder.d.ts +47 -0
- package/src/_cjs/SVGBuilder.js +100 -0
- package/src/_cjs/SVGBuilder.js.map +1 -0
- package/src/_cjs/Triangle.d.ts +392 -0
- package/src/_cjs/Triangle.js +497 -0
- package/src/_cjs/Triangle.js.map +1 -0
- package/src/_cjs/UIDGenerator.d.ts +12 -0
- package/src/_cjs/UIDGenerator.js +21 -0
- package/src/_cjs/UIDGenerator.js.map +1 -0
- package/src/_cjs/VEllipse.d.ts +319 -0
- package/src/_cjs/VEllipse.js +578 -0
- package/src/_cjs/VEllipse.js.map +1 -0
- package/src/_cjs/VEllipseSector.d.ts +230 -0
- package/src/_cjs/VEllipseSector.js +428 -0
- package/src/_cjs/VEllipseSector.js.map +1 -0
- package/src/_cjs/Vector.d.ts +126 -0
- package/src/_cjs/Vector.js +199 -0
- package/src/_cjs/Vector.js.map +1 -0
- package/src/_cjs/VertTuple.d.ts +284 -0
- package/src/_cjs/VertTuple.js +348 -0
- package/src/_cjs/VertTuple.js.map +1 -0
- package/src/_cjs/Vertex.d.ts +498 -0
- package/src/_cjs/Vertex.js +703 -0
- package/src/_cjs/Vertex.js.map +1 -0
- package/src/_cjs/VertexAttr.d.ts +72 -0
- package/src/_cjs/VertexAttr.js +59 -0
- package/src/_cjs/VertexAttr.js.map +1 -0
- package/src/_cjs/VertexListeners.d.ts +208 -0
- package/src/_cjs/VertexListeners.js +267 -0
- package/src/_cjs/VertexListeners.js.map +1 -0
- package/src/_cjs/draw.d.ts +657 -0
- package/src/_cjs/draw.js +1164 -0
- package/src/_cjs/draw.js.map +1 -0
- package/src/_cjs/drawgl.d.ts +544 -0
- package/src/_cjs/drawgl.js +794 -0
- package/src/_cjs/drawgl.js.map +1 -0
- package/src/_cjs/drawutilssvg.d.ts +954 -0
- package/src/_cjs/drawutilssvg.js +1713 -0
- package/src/_cjs/drawutilssvg.js.map +1 -0
- package/src/_cjs/entry-glsupport.js +28 -0
- package/src/_cjs/entry.js +29 -0
- package/src/_cjs/geomutils.d.ts +77 -0
- package/src/_cjs/geomutils.js +126 -0
- package/src/_cjs/geomutils.js.map +1 -0
- package/src/_cjs/index.d.ts +102 -0
- package/src/_cjs/index.js +128 -0
- package/src/_cjs/index.js.map +1 -0
- package/src/_cjs/interfaces/DrawLib.d.ts +582 -0
- package/src/_cjs/interfaces/DrawLib.js +32 -0
- package/src/_cjs/interfaces/DrawLib.js.map +1 -0
- package/src/_cjs/interfaces/additionals.d.ts +95 -0
- package/src/_cjs/interfaces/additionals.js +3 -0
- package/src/_cjs/interfaces/additionals.js.map +1 -0
- package/src/_cjs/interfaces/core.d.ts +286 -0
- package/src/_cjs/interfaces/core.js +30 -0
- package/src/_cjs/interfaces/core.js.map +1 -0
- package/src/_cjs/interfaces/externals.d.ts +56 -0
- package/src/_cjs/interfaces/externals.js +8 -0
- package/src/_cjs/interfaces/externals.js.map +1 -0
- package/src/_cjs/interfaces/index.d.ts +4 -0
- package/src/_cjs/interfaces/index.js +21 -0
- package/src/_cjs/interfaces/index.js.map +1 -0
- package/src/_cjs/module.d.ts +26 -0
- package/src/_cjs/module.js +60 -0
- package/src/_cjs/module.js.map +1 -0
- package/src/_cjs/utils/InitializationObserver.d.ts +18 -0
- package/src/_cjs/utils/InitializationObserver.js +63 -0
- package/src/_cjs/utils/InitializationObserver.js.map +1 -0
- package/src/_cjs/utils/LissajousFigure.d.ts +34 -0
- package/src/_cjs/utils/LissajousFigure.js +100 -0
- package/src/_cjs/utils/LissajousFigure.js.map +1 -0
- package/src/_cjs/utils/NGons.d.ts +13 -0
- package/src/_cjs/utils/NGons.js +36 -0
- package/src/_cjs/utils/NGons.js.map +1 -0
- package/src/_cjs/utils/Params.d.ts +17 -0
- package/src/_cjs/utils/Params.js +53 -0
- package/src/_cjs/utils/Params.js.map +1 -0
- package/src/_cjs/utils/PerlinNoise.d.ts +19 -0
- package/src/_cjs/utils/PerlinNoise.js +352 -0
- package/src/_cjs/utils/PerlinNoise.js.map +1 -0
- package/src/_cjs/utils/SVGPathUtils.d.ts +22 -0
- package/src/_cjs/utils/SVGPathUtils.js +45 -0
- package/src/_cjs/utils/SVGPathUtils.js.map +1 -0
- package/src/_cjs/utils/WebColors.d.ts +35 -0
- package/src/_cjs/utils/WebColors.js +58 -0
- package/src/_cjs/utils/WebColors.js.map +1 -0
- package/src/_cjs/utils/WebColorsContrast.d.ts +6 -0
- package/src/_cjs/utils/WebColorsContrast.js +12 -0
- package/src/_cjs/utils/WebColorsContrast.js.map +1 -0
- package/src/_cjs/utils/WebColorsMalachite.d.ts +12 -0
- package/src/_cjs/utils/WebColorsMalachite.js +28 -0
- package/src/_cjs/utils/WebColorsMalachite.js.map +1 -0
- package/src/_cjs/utils/algorithms/CatmullRomPath.d.ts +60 -0
- package/src/_cjs/utils/algorithms/CatmullRomPath.js +108 -0
- package/src/_cjs/utils/algorithms/CatmullRomPath.js.map +1 -0
- package/src/_cjs/utils/algorithms/CircleIntersections.d.ts +170 -0
- package/src/_cjs/utils/algorithms/CircleIntersections.js +310 -0
- package/src/_cjs/utils/algorithms/CircleIntersections.js.map +1 -0
- package/src/_cjs/utils/algorithms/ContourLineDetection.d.ts +150 -0
- package/src/_cjs/utils/algorithms/ContourLineDetection.js +367 -0
- package/src/_cjs/utils/algorithms/ContourLineDetection.js.map +1 -0
- package/src/_cjs/utils/algorithms/CubicSplinePath.d.ts +63 -0
- package/src/_cjs/utils/algorithms/CubicSplinePath.js +175 -0
- package/src/_cjs/utils/algorithms/CubicSplinePath.js.map +1 -0
- package/src/_cjs/utils/algorithms/HobbyPath.d.ts +81 -0
- package/src/_cjs/utils/algorithms/HobbyPath.js +278 -0
- package/src/_cjs/utils/algorithms/HobbyPath.js.map +1 -0
- package/src/_cjs/utils/algorithms/Metaballs.d.ts +30 -0
- package/src/_cjs/utils/algorithms/Metaballs.js +114 -0
- package/src/_cjs/utils/algorithms/Metaballs.js.map +1 -0
- package/src/_cjs/utils/algorithms/PolygonInset.d.ts +184 -0
- package/src/_cjs/utils/algorithms/PolygonInset.js +431 -0
- package/src/_cjs/utils/algorithms/PolygonInset.js.map +1 -0
- package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.d.ts +145 -0
- package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.js +269 -0
- package/src/_cjs/utils/algorithms/PolygonTesselationOutlines.js.map +1 -0
- package/src/_cjs/utils/algorithms/arrayFill.d.ts +8 -0
- package/src/_cjs/utils/algorithms/arrayFill.js +18 -0
- package/src/_cjs/utils/algorithms/arrayFill.js.map +1 -0
- package/src/_cjs/utils/algorithms/arrayResize.d.ts +8 -0
- package/src/_cjs/utils/algorithms/arrayResize.js +24 -0
- package/src/_cjs/utils/algorithms/arrayResize.js.map +1 -0
- package/src/_cjs/utils/algorithms/arrayShuffle.d.ts +8 -0
- package/src/_cjs/utils/algorithms/arrayShuffle.js +15 -0
- package/src/_cjs/utils/algorithms/arrayShuffle.js.map +1 -0
- package/src/_cjs/utils/algorithms/clearDuplicateVertices.d.ts +22 -0
- package/src/_cjs/utils/algorithms/clearDuplicateVertices.js +51 -0
- package/src/_cjs/utils/algorithms/clearDuplicateVertices.js.map +1 -0
- package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.d.ts +24 -0
- package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.js +61 -0
- package/src/_cjs/utils/algorithms/clearPolygonDuplicateVertices.js.map +1 -0
- package/src/_cjs/utils/algorithms/convexHull.d.ts +23 -0
- package/src/_cjs/utils/algorithms/convexHull.js +71 -0
- package/src/_cjs/utils/algorithms/convexHull.js.map +1 -0
- package/src/_cjs/utils/algorithms/convexPolygonIncircle.d.ts +41 -0
- package/src/_cjs/utils/algorithms/convexPolygonIncircle.js +145 -0
- package/src/_cjs/utils/algorithms/convexPolygonIncircle.js.map +1 -0
- package/src/_cjs/utils/algorithms/delaunay.d.ts +30 -0
- package/src/_cjs/utils/algorithms/delaunay.js +158 -0
- package/src/_cjs/utils/algorithms/delaunay.js.map +1 -0
- package/src/_cjs/utils/algorithms/delaunay2voronoi.d.ts +25 -0
- package/src/_cjs/utils/algorithms/delaunay2voronoi.js +104 -0
- package/src/_cjs/utils/algorithms/delaunay2voronoi.js.map +1 -0
- package/src/_cjs/utils/algorithms/detectPaths.d.ts +21 -0
- package/src/_cjs/utils/algorithms/detectPaths.js +169 -0
- package/src/_cjs/utils/algorithms/detectPaths.js.map +1 -0
- package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.d.ts +21 -0
- package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.js +51 -0
- package/src/_cjs/utils/algorithms/findPolygonSelfIntersections.js.map +1 -0
- package/src/_cjs/utils/algorithms/getContrastColor.d.ts +13 -0
- package/src/_cjs/utils/algorithms/getContrastColor.js +26 -0
- package/src/_cjs/utils/algorithms/getContrastColor.js.map +1 -0
- package/src/_cjs/utils/algorithms/matrixFill.d.ts +10 -0
- package/src/_cjs/utils/algorithms/matrixFill.js +21 -0
- package/src/_cjs/utils/algorithms/matrixFill.js.map +1 -0
- package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.d.ts +23 -0
- package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.js +270 -0
- package/src/_cjs/utils/algorithms/pixelCornersToRoundPaths.js.map +1 -0
- package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.d.ts +28 -0
- package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.js +102 -0
- package/src/_cjs/utils/algorithms/splitPolygonToNonIntersecting.js.map +1 -0
- package/src/_cjs/utils/algorithms/sutherlandHodgman.d.ts +16 -0
- package/src/_cjs/utils/algorithms/sutherlandHodgman.js +76 -0
- package/src/_cjs/utils/algorithms/sutherlandHodgman.js.map +1 -0
- package/src/_cjs/utils/cloneVertexArray.d.ts +13 -0
- package/src/_cjs/utils/cloneVertexArray.js +23 -0
- package/src/_cjs/utils/cloneVertexArray.js.map +1 -0
- package/src/_cjs/utils/createRandomizedPolygon.d.ts +14 -0
- package/src/_cjs/utils/createRandomizedPolygon.js +32 -0
- package/src/_cjs/utils/createRandomizedPolygon.js.map +1 -0
- package/src/_cjs/utils/creategui.js +434 -0
- package/src/_cjs/utils/dat.gui.arrowbounce.polyfill.js +128 -0
- package/src/_cjs/utils/dat.gui.title.polyfill.js +35 -0
- package/src/_cjs/utils/datastructures/CircularIntervalSet.d.ts +83 -0
- package/src/_cjs/utils/datastructures/CircularIntervalSet.js +163 -0
- package/src/_cjs/utils/datastructures/CircularIntervalSet.js.map +1 -0
- package/src/_cjs/utils/datastructures/Color.d.ts +391 -0
- package/src/_cjs/utils/datastructures/Color.js +1084 -0
- package/src/_cjs/utils/datastructures/Color.js.map +1 -0
- package/src/_cjs/utils/datastructures/ColorGradient.d.ts +81 -0
- package/src/_cjs/utils/datastructures/ColorGradient.js +176 -0
- package/src/_cjs/utils/datastructures/ColorGradient.js.map +1 -0
- package/src/_cjs/utils/datastructures/DataGrid2d.d.ts +53 -0
- package/src/_cjs/utils/datastructures/DataGrid2d.js +20 -0
- package/src/_cjs/utils/datastructures/DataGrid2d.js.map +1 -0
- package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.d.ts +88 -0
- package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.js +155 -0
- package/src/_cjs/utils/datastructures/DataGrid2dArrayMatrix.js.map +1 -0
- package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.d.ts +59 -0
- package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.js +84 -0
- package/src/_cjs/utils/datastructures/DataGrid2dListAdapter.js.map +1 -0
- package/src/_cjs/utils/datastructures/GenericPath.d.ts +86 -0
- package/src/_cjs/utils/datastructures/GenericPath.js +122 -0
- package/src/_cjs/utils/datastructures/GenericPath.js.map +1 -0
- package/src/_cjs/utils/datastructures/GeometryMesh.d.ts +49 -0
- package/src/_cjs/utils/datastructures/GeometryMesh.js +58 -0
- package/src/_cjs/utils/datastructures/GeometryMesh.js.map +1 -0
- package/src/_cjs/utils/datastructures/Girih.d.ts +181 -0
- package/src/_cjs/utils/datastructures/Girih.js +266 -0
- package/src/_cjs/utils/datastructures/Girih.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihBowtie.d.ts +37 -0
- package/src/_cjs/utils/datastructures/GirihBowtie.js +152 -0
- package/src/_cjs/utils/datastructures/GirihBowtie.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihDecagon.d.ts +52 -0
- package/src/_cjs/utils/datastructures/GirihDecagon.js +132 -0
- package/src/_cjs/utils/datastructures/GirihDecagon.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihHexagon.d.ts +39 -0
- package/src/_cjs/utils/datastructures/GirihHexagon.js +200 -0
- package/src/_cjs/utils/datastructures/GirihHexagon.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihPenroseRhombus.d.ts +46 -0
- package/src/_cjs/utils/datastructures/GirihPenroseRhombus.js +189 -0
- package/src/_cjs/utils/datastructures/GirihPenroseRhombus.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihPentagon.d.ts +37 -0
- package/src/_cjs/utils/datastructures/GirihPentagon.js +109 -0
- package/src/_cjs/utils/datastructures/GirihPentagon.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihRhombus.d.ts +38 -0
- package/src/_cjs/utils/datastructures/GirihRhombus.js +155 -0
- package/src/_cjs/utils/datastructures/GirihRhombus.js.map +1 -0
- package/src/_cjs/utils/datastructures/GirihTile.d.ts +283 -0
- package/src/_cjs/utils/datastructures/GirihTile.js +308 -0
- package/src/_cjs/utils/datastructures/GirihTile.js.map +1 -0
- package/src/_cjs/utils/datastructures/Matrix4x4.d.ts +244 -0
- package/src/_cjs/utils/datastructures/Matrix4x4.js +262 -0
- package/src/_cjs/utils/datastructures/Matrix4x4.js.map +1 -0
- package/src/_cjs/utils/datastructures/VoronoiCell.d.ts +122 -0
- package/src/_cjs/utils/datastructures/VoronoiCell.js +183 -0
- package/src/_cjs/utils/datastructures/VoronoiCell.js.map +1 -0
- package/src/_cjs/utils/datastructures/interfaces.d.ts +13 -0
- package/src/_cjs/utils/datastructures/interfaces.js +10 -0
- package/src/_cjs/utils/datastructures/interfaces.js.map +1 -0
- package/src/_cjs/utils/detectDarkMode.d.ts +10 -0
- package/src/_cjs/utils/detectDarkMode.js +41 -0
- package/src/_cjs/utils/detectDarkMode.js.map +1 -0
- package/src/_cjs/utils/dom/components/ColorGradientPicker.d.ts +246 -0
- package/src/_cjs/utils/dom/components/ColorGradientPicker.js +667 -0
- package/src/_cjs/utils/dom/components/ColorGradientPicker.js.map +1 -0
- package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.d.ts +129 -0
- package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.js +520 -0
- package/src/_cjs/utils/dom/components/ColorGradientPickerJSX.js.map +1 -0
- package/src/_cjs/utils/dom/components/ColorGradientSelector.d.ts +118 -0
- package/src/_cjs/utils/dom/components/ColorGradientSelector.js +327 -0
- package/src/_cjs/utils/dom/components/ColorGradientSelector.js.map +1 -0
- package/src/_cjs/utils/dom/components/Test.d.ts +7 -0
- package/src/_cjs/utils/dom/components/Test.js +30 -0
- package/src/_cjs/utils/dom/components/Test.js.map +1 -0
- package/src/_cjs/utils/dom/getAvailableContainerSpace.d.ts +2 -0
- package/src/_cjs/utils/dom/getAvailableContainerSpace.js +29 -0
- package/src/_cjs/utils/dom/getAvailableContainerSpace.js.map +1 -0
- package/src/_cjs/utils/dom/getFProp.d.ts +5 -0
- package/src/_cjs/utils/dom/getFProp.js +12 -0
- package/src/_cjs/utils/dom/getFProp.js.map +1 -0
- package/src/_cjs/utils/dom/guiSizeToggler.d.ts +18 -0
- package/src/_cjs/utils/dom/guiSizeToggler.js +44 -0
- package/src/_cjs/utils/dom/guiSizeToggler.js.map +1 -0
- package/src/_cjs/utils/findInVertexArray.d.ts +19 -0
- package/src/_cjs/utils/findInVertexArray.js +29 -0
- package/src/_cjs/utils/findInVertexArray.js.map +1 -0
- package/src/_cjs/utils/getFProp.d.ts +5 -0
- package/src/_cjs/utils/getFProp.js +12 -0
- package/src/_cjs/utils/getFProp.js.map +1 -0
- package/src/_cjs/utils/gup.d.ts +14 -0
- package/src/_cjs/utils/gup.js +31 -0
- package/src/_cjs/utils/gup.js.map +1 -0
- package/src/_cjs/utils/helpers/BezierPathInteractionHelper.d.ts +272 -0
- package/src/_cjs/utils/helpers/BezierPathInteractionHelper.js +655 -0
- package/src/_cjs/utils/helpers/BezierPathInteractionHelper.js.map +1 -0
- package/src/_cjs/utils/helpers/CircleHelper.d.ts +73 -0
- package/src/_cjs/utils/helpers/CircleHelper.js +93 -0
- package/src/_cjs/utils/helpers/CircleHelper.js.map +1 -0
- package/src/_cjs/utils/helpers/CircleSectorHelper.d.ts +90 -0
- package/src/_cjs/utils/helpers/CircleSectorHelper.js +114 -0
- package/src/_cjs/utils/helpers/CircleSectorHelper.js.map +1 -0
- package/src/_cjs/utils/helpers/TriangleHelper.d.ts +57 -0
- package/src/_cjs/utils/helpers/TriangleHelper.js +83 -0
- package/src/_cjs/utils/helpers/TriangleHelper.js.map +1 -0
- package/src/_cjs/utils/helpers/VEllipseHelper.d.ts +32 -0
- package/src/_cjs/utils/helpers/VEllipseHelper.js +88 -0
- package/src/_cjs/utils/helpers/VEllipseHelper.js.map +1 -0
- package/src/_cjs/utils/helpers/VEllipseSectorHelper.d.ts +52 -0
- package/src/_cjs/utils/helpers/VEllipseSectorHelper.js +135 -0
- package/src/_cjs/utils/helpers/VEllipseSectorHelper.js.map +1 -0
- package/src/_cjs/utils/io/DndFileHandler.d.ts +63 -0
- package/src/_cjs/utils/io/DndFileHandler.js +112 -0
- package/src/_cjs/utils/io/DndFileHandler.js.map +1 -0
- package/src/_cjs/utils/io/FileDrop.d.ts +110 -0
- package/src/_cjs/utils/io/FileDrop.js +177 -0
- package/src/_cjs/utils/io/FileDrop.js.map +1 -0
- package/src/_cjs/utils/lil.gui.arrowbounce.polyfill.js +133 -0
- package/src/_cjs/utils/lil.gui.title.polyfill.js +32 -0
- package/src/_cjs/utils/module.js +18 -0
- package/src/_cjs/utils/parsers/LinearColorGradientParser.d.ts +78 -0
- package/src/_cjs/utils/parsers/LinearColorGradientParser.js +224 -0
- package/src/_cjs/utils/parsers/LinearColorGradientParser.js.map +1 -0
- package/src/_cjs/utils/parsers/OBJParser.d.ts +24 -0
- package/src/_cjs/utils/parsers/OBJParser.js +77 -0
- package/src/_cjs/utils/parsers/OBJParser.js.map +1 -0
- package/src/_cjs/utils/parsers/STLParser.d.ts +61 -0
- package/src/_cjs/utils/parsers/STLParser.js +182 -0
- package/src/_cjs/utils/parsers/STLParser.js.map +1 -0
- package/src/_cjs/utils/parsers/svg/parseSVGPathData.d.ts +27 -0
- package/src/_cjs/utils/parsers/svg/parseSVGPathData.js +486 -0
- package/src/_cjs/utils/parsers/svg/parseSVGPathData.js.map +1 -0
- package/src/_cjs/utils/parsers/svg/splitSVGPathData.d.ts +20 -0
- package/src/_cjs/utils/parsers/svg/splitSVGPathData.js +53 -0
- package/src/_cjs/utils/parsers/svg/splitSVGPathData.js.map +1 -0
- package/src/_cjs/utils/parsers/svg/types.d.ts +63 -0
- package/src/_cjs/utils/parsers/svg/types.js +17 -0
- package/src/_cjs/utils/parsers/svg/types.js.map +1 -0
- package/src/_cjs/utils/ts-runner.js +146 -0
- package/src/_cjs/utils/tsAsyncScriptLoader.js +74 -0
- package/src/_esm/BezierPath.d.ts +610 -0
- package/src/_esm/BezierPath.js +1124 -0
- package/src/_esm/BezierPath.js.map +1 -0
- package/src/_esm/Bounds.d.ts +252 -0
- package/src/_esm/Bounds.js +317 -0
- package/src/_esm/Bounds.js.map +1 -0
- package/src/_esm/Circle.d.ts +214 -0
- package/src/_esm/Circle.js +335 -0
- package/src/_esm/Circle.js.map +1 -0
- package/src/_esm/CircleSector.d.ts +211 -0
- package/src/_esm/CircleSector.js +359 -0
- package/src/_esm/CircleSector.js.map +1 -0
- package/src/_esm/CubicBezierCurve.d.ts +656 -0
- package/src/_esm/CubicBezierCurve.js +1057 -0
- package/src/_esm/CubicBezierCurve.js.map +1 -0
- package/src/_esm/Grid.d.ts +83 -0
- package/src/_esm/Grid.js +89 -0
- package/src/_esm/Grid.js.map +1 -0
- package/src/_esm/KeyHandler.d.ts +177 -0
- package/src/_esm/KeyHandler.js +434 -0
- package/src/_esm/KeyHandler.js.map +1 -0
- package/src/_esm/Line.d.ts +134 -0
- package/src/_esm/Line.js +200 -0
- package/src/_esm/Line.js.map +1 -0
- package/src/_esm/MouseHandler.d.ts +283 -0
- package/src/_esm/MouseHandler.js +397 -0
- package/src/_esm/MouseHandler.js.map +1 -0
- package/src/_esm/PBImage.d.ts +81 -0
- package/src/_esm/PBImage.js +60 -0
- package/src/_esm/PBImage.js.map +1 -0
- package/src/_esm/PBText.d.ts +118 -0
- package/src/_esm/PBText.js +62 -0
- package/src/_esm/PBText.js.map +1 -0
- package/src/_esm/PlotBoilerplate.d.ts +899 -0
- package/src/_esm/PlotBoilerplate.js +2347 -0
- package/src/_esm/PlotBoilerplate.js.map +1 -0
- package/src/_esm/Polygon.d.ts +520 -0
- package/src/_esm/Polygon.js +924 -0
- package/src/_esm/Polygon.js.map +1 -0
- package/src/_esm/SVGBuilder.d.ts +47 -0
- package/src/_esm/SVGBuilder.js +95 -0
- package/src/_esm/SVGBuilder.js.map +1 -0
- package/src/_esm/Triangle.d.ts +392 -0
- package/src/_esm/Triangle.js +493 -0
- package/src/_esm/Triangle.js.map +1 -0
- package/src/_esm/UIDGenerator.d.ts +12 -0
- package/src/_esm/UIDGenerator.js +18 -0
- package/src/_esm/UIDGenerator.js.map +1 -0
- package/src/_esm/VEllipse.d.ts +319 -0
- package/src/_esm/VEllipse.js +574 -0
- package/src/_esm/VEllipse.js.map +1 -0
- package/src/_esm/VEllipseSector.d.ts +230 -0
- package/src/_esm/VEllipseSector.js +422 -0
- package/src/_esm/VEllipseSector.js.map +1 -0
- package/src/_esm/Vector.d.ts +126 -0
- package/src/_esm/Vector.js +181 -0
- package/src/_esm/Vector.js.map +1 -0
- package/src/_esm/VertTuple.d.ts +284 -0
- package/src/_esm/VertTuple.js +347 -0
- package/src/_esm/VertTuple.js.map +1 -0
- package/src/_esm/Vertex.d.ts +498 -0
- package/src/_esm/Vertex.js +702 -0
- package/src/_esm/Vertex.js.map +1 -0
- package/src/_esm/VertexAttr.d.ts +72 -0
- package/src/_esm/VertexAttr.js +58 -0
- package/src/_esm/VertexAttr.js.map +1 -0
- package/src/_esm/VertexListeners.d.ts +209 -0
- package/src/_esm/VertexListeners.js +270 -0
- package/src/_esm/VertexListeners.js.map +1 -0
- package/src/_esm/draw.d.ts +657 -0
- package/src/_esm/draw.js +1159 -0
- package/src/_esm/draw.js.map +1 -0
- package/src/_esm/drawgl.d.ts +544 -0
- package/src/_esm/drawgl.js +812 -0
- package/src/_esm/drawgl.js.map +1 -0
- package/src/_esm/drawutilssvg.d.ts +954 -0
- package/src/_esm/drawutilssvg.js +1705 -0
- package/src/_esm/drawutilssvg.js.map +1 -0
- package/src/_esm/entry-glsupport.js +28 -0
- package/src/_esm/entry.js +29 -0
- package/src/_esm/geomutils.d.ts +77 -0
- package/src/_esm/geomutils.js +126 -0
- package/src/_esm/geomutils.js.map +1 -0
- package/src/_esm/index.d.ts +102 -0
- package/src/_esm/index.js +128 -0
- package/src/_esm/index.js.map +1 -0
- package/src/_esm/interfaces/DrawLib.d.ts +582 -0
- package/src/_esm/interfaces/DrawLib.js +32 -0
- package/src/_esm/interfaces/DrawLib.js.map +1 -0
- package/src/_esm/interfaces/additionals.d.ts +95 -0
- package/src/_esm/interfaces/additionals.js +3 -0
- package/src/_esm/interfaces/additionals.js.map +1 -0
- package/src/_esm/interfaces/core.d.ts +286 -0
- package/src/_esm/interfaces/core.js +30 -0
- package/src/_esm/interfaces/core.js.map +1 -0
- package/src/_esm/interfaces/externals.d.ts +56 -0
- package/src/_esm/interfaces/externals.js +8 -0
- package/src/_esm/interfaces/externals.js.map +1 -0
- package/src/_esm/interfaces/index.d.ts +4 -0
- package/src/_esm/interfaces/index.js +21 -0
- package/src/_esm/interfaces/index.js.map +1 -0
- package/src/_esm/module.d.ts +26 -0
- package/src/_esm/module.js +60 -0
- package/src/_esm/module.js.map +1 -0
- package/src/_esm/src/ts/BezierPath.d.ts +610 -0
- package/src/_esm/src/ts/BezierPath.js +1120 -0
- package/src/_esm/src/ts/BezierPath.js.map +1 -0
- package/src/_esm/src/ts/Bounds.d.ts +252 -0
- package/src/_esm/src/ts/Bounds.js +313 -0
- package/src/_esm/src/ts/Bounds.js.map +1 -0
- package/src/_esm/src/ts/Circle.d.ts +214 -0
- package/src/_esm/src/ts/Circle.js +331 -0
- package/src/_esm/src/ts/Circle.js.map +1 -0
- package/src/_esm/src/ts/CircleSector.d.ts +211 -0
- package/src/_esm/src/ts/CircleSector.js +355 -0
- package/src/_esm/src/ts/CircleSector.js.map +1 -0
- package/src/_esm/src/ts/CubicBezierCurve.d.ts +656 -0
- package/src/_esm/src/ts/CubicBezierCurve.js +1053 -0
- package/src/_esm/src/ts/CubicBezierCurve.js.map +1 -0
- package/src/_esm/src/ts/Grid.d.ts +83 -0
- package/src/_esm/src/ts/Grid.js +85 -0
- package/src/_esm/src/ts/Grid.js.map +1 -0
- package/src/_esm/src/ts/KeyHandler.d.ts +177 -0
- package/src/_esm/src/ts/KeyHandler.js +430 -0
- package/src/_esm/src/ts/KeyHandler.js.map +1 -0
- package/src/_esm/src/ts/Line.d.ts +134 -0
- package/src/_esm/src/ts/Line.js +196 -0
- package/src/_esm/src/ts/Line.js.map +1 -0
- package/src/_esm/src/ts/MouseHandler.d.ts +283 -0
- package/src/_esm/src/ts/MouseHandler.js +391 -0
- package/src/_esm/src/ts/MouseHandler.js.map +1 -0
- package/src/_esm/src/ts/PBImage.d.ts +81 -0
- package/src/_esm/src/ts/PBImage.js +56 -0
- package/src/_esm/src/ts/PBImage.js.map +1 -0
- package/src/_esm/src/ts/PBText.d.ts +118 -0
- package/src/_esm/src/ts/PBText.js +58 -0
- package/src/_esm/src/ts/PBText.js.map +1 -0
- package/src/_esm/src/ts/PlotBoilerplate.d.ts +899 -0
- package/src/_esm/src/ts/PlotBoilerplate.js +2340 -0
- package/src/_esm/src/ts/PlotBoilerplate.js.map +1 -0
- package/src/_esm/src/ts/Polygon.d.ts +520 -0
- package/src/_esm/src/ts/Polygon.js +920 -0
- package/src/_esm/src/ts/Polygon.js.map +1 -0
- package/src/_esm/src/ts/Triangle.d.ts +392 -0
- package/src/_esm/src/ts/Triangle.js +489 -0
- package/src/_esm/src/ts/Triangle.js.map +1 -0
- package/src/_esm/src/ts/UIDGenerator.d.ts +12 -0
- package/src/_esm/src/ts/UIDGenerator.js +14 -0
- package/src/_esm/src/ts/UIDGenerator.js.map +1 -0
- package/src/_esm/src/ts/VEllipse.d.ts +319 -0
- package/src/_esm/src/ts/VEllipse.js +570 -0
- package/src/_esm/src/ts/VEllipse.js.map +1 -0
- package/src/_esm/src/ts/VEllipseSector.d.ts +230 -0
- package/src/_esm/src/ts/VEllipseSector.js +418 -0
- package/src/_esm/src/ts/VEllipseSector.js.map +1 -0
- package/src/_esm/src/ts/Vector.d.ts +126 -0
- package/src/_esm/src/ts/Vector.js +177 -0
- package/src/_esm/src/ts/Vector.js.map +1 -0
- package/src/_esm/src/ts/VertTuple.d.ts +284 -0
- package/src/_esm/src/ts/VertTuple.js +343 -0
- package/src/_esm/src/ts/VertTuple.js.map +1 -0
- package/src/_esm/src/ts/Vertex.d.ts +498 -0
- package/src/_esm/src/ts/Vertex.js +698 -0
- package/src/_esm/src/ts/Vertex.js.map +1 -0
- package/src/_esm/src/ts/VertexAttr.d.ts +72 -0
- package/src/_esm/src/ts/VertexAttr.js +54 -0
- package/src/_esm/src/ts/VertexAttr.js.map +1 -0
- package/src/_esm/src/ts/VertexListeners.d.ts +209 -0
- package/src/_esm/src/ts/VertexListeners.js +266 -0
- package/src/_esm/src/ts/VertexListeners.js.map +1 -0
- package/src/_esm/src/ts/draw.d.ts +657 -0
- package/src/_esm/src/ts/draw.js +1155 -0
- package/src/_esm/src/ts/draw.js.map +1 -0
- package/src/_esm/src/ts/drawgl.d.ts +544 -0
- package/src/_esm/src/ts/drawgl.js +808 -0
- package/src/_esm/src/ts/drawgl.js.map +1 -0
- package/src/_esm/src/ts/drawutilssvg.d.ts +954 -0
- package/src/_esm/src/ts/drawutilssvg.js +1701 -0
- package/src/_esm/src/ts/drawutilssvg.js.map +1 -0
- package/src/_esm/src/ts/geomutils.d.ts +77 -0
- package/src/_esm/src/ts/geomutils.js +123 -0
- package/src/_esm/src/ts/geomutils.js.map +1 -0
- package/src/_esm/src/ts/index.d.ts +102 -0
- package/src/_esm/src/ts/index.js +112 -0
- package/src/_esm/src/ts/index.js.map +1 -0
- package/src/_esm/src/ts/interfaces/DrawLib.d.ts +582 -0
- package/src/_esm/src/ts/interfaces/DrawLib.js +31 -0
- package/src/_esm/src/ts/interfaces/DrawLib.js.map +1 -0
- package/src/_esm/src/ts/interfaces/additionals.d.ts +95 -0
- package/src/_esm/src/ts/interfaces/additionals.js +2 -0
- package/src/_esm/src/ts/interfaces/additionals.js.map +1 -0
- package/src/_esm/src/ts/interfaces/core.d.ts +286 -0
- package/src/_esm/src/ts/interfaces/core.js +29 -0
- package/src/_esm/src/ts/interfaces/core.js.map +1 -0
- package/src/_esm/src/ts/interfaces/externals.d.ts +56 -0
- package/src/_esm/src/ts/interfaces/externals.js +7 -0
- package/src/_esm/src/ts/interfaces/externals.js.map +1 -0
- package/src/_esm/src/ts/interfaces/index.d.ts +4 -0
- package/src/_esm/src/ts/interfaces/index.js +5 -0
- package/src/_esm/src/ts/interfaces/index.js.map +1 -0
- package/src/_esm/src/ts/module.d.ts +26 -0
- package/src/_esm/src/ts/module.js +38 -0
- package/src/_esm/src/ts/module.js.map +1 -0
- package/src/_esm/src/ts/utils/InitializationObserver.d.ts +18 -0
- package/src/_esm/src/ts/utils/InitializationObserver.js +57 -0
- package/src/_esm/src/ts/utils/InitializationObserver.js.map +1 -0
- package/src/_esm/src/ts/utils/LissajousFigure.d.ts +34 -0
- package/src/_esm/src/ts/utils/LissajousFigure.js +95 -0
- package/src/_esm/src/ts/utils/LissajousFigure.js.map +1 -0
- package/src/_esm/src/ts/utils/NGons.d.ts +13 -0
- package/src/_esm/src/ts/utils/NGons.js +33 -0
- package/src/_esm/src/ts/utils/NGons.js.map +1 -0
- package/src/_esm/src/ts/utils/Params.d.ts +17 -0
- package/src/_esm/src/ts/utils/Params.js +48 -0
- package/src/_esm/src/ts/utils/Params.js.map +1 -0
- package/src/_esm/src/ts/utils/PerlinNoise.d.ts +19 -0
- package/src/_esm/src/ts/utils/PerlinNoise.js +346 -0
- package/src/_esm/src/ts/utils/PerlinNoise.js.map +1 -0
- package/src/_esm/src/ts/utils/SVGPathUtils.d.ts +22 -0
- package/src/_esm/src/ts/utils/SVGPathUtils.js +42 -0
- package/src/_esm/src/ts/utils/SVGPathUtils.js.map +1 -0
- package/src/_esm/src/ts/utils/WebColors.d.ts +35 -0
- package/src/_esm/src/ts/utils/WebColors.js +54 -0
- package/src/_esm/src/ts/utils/WebColors.js.map +1 -0
- package/src/_esm/src/ts/utils/WebColorsContrast.d.ts +6 -0
- package/src/_esm/src/ts/utils/WebColorsContrast.js +9 -0
- package/src/_esm/src/ts/utils/WebColorsContrast.js.map +1 -0
- package/src/_esm/src/ts/utils/WebColorsMalachite.d.ts +12 -0
- package/src/_esm/src/ts/utils/WebColorsMalachite.js +25 -0
- package/src/_esm/src/ts/utils/WebColorsMalachite.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.d.ts +60 -0
- package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.js +103 -0
- package/src/_esm/src/ts/utils/algorithms/CatmullRomPath.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/CircleIntersections.d.ts +170 -0
- package/src/_esm/src/ts/utils/algorithms/CircleIntersections.js +303 -0
- package/src/_esm/src/ts/utils/algorithms/CircleIntersections.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.d.ts +150 -0
- package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.js +362 -0
- package/src/_esm/src/ts/utils/algorithms/ContourLineDetection.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.d.ts +63 -0
- package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.js +170 -0
- package/src/_esm/src/ts/utils/algorithms/CubicSplinePath.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/HobbyPath.d.ts +81 -0
- package/src/_esm/src/ts/utils/algorithms/HobbyPath.js +273 -0
- package/src/_esm/src/ts/utils/algorithms/HobbyPath.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/Metaballs.d.ts +30 -0
- package/src/_esm/src/ts/utils/algorithms/Metaballs.js +109 -0
- package/src/_esm/src/ts/utils/algorithms/Metaballs.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/PolygonInset.d.ts +184 -0
- package/src/_esm/src/ts/utils/algorithms/PolygonInset.js +424 -0
- package/src/_esm/src/ts/utils/algorithms/PolygonInset.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.d.ts +145 -0
- package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.js +262 -0
- package/src/_esm/src/ts/utils/algorithms/PolygonTesselationOutlines.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/arrayFill.d.ts +8 -0
- package/src/_esm/src/ts/utils/algorithms/arrayFill.js +14 -0
- package/src/_esm/src/ts/utils/algorithms/arrayFill.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/arrayResize.d.ts +8 -0
- package/src/_esm/src/ts/utils/algorithms/arrayResize.js +20 -0
- package/src/_esm/src/ts/utils/algorithms/arrayResize.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/arrayShuffle.d.ts +8 -0
- package/src/_esm/src/ts/utils/algorithms/arrayShuffle.js +11 -0
- package/src/_esm/src/ts/utils/algorithms/arrayShuffle.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.d.ts +22 -0
- package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.js +47 -0
- package/src/_esm/src/ts/utils/algorithms/clearDuplicateVertices.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.d.ts +24 -0
- package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.js +57 -0
- package/src/_esm/src/ts/utils/algorithms/clearPolygonDuplicateVertices.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/convexHull.d.ts +23 -0
- package/src/_esm/src/ts/utils/algorithms/convexHull.js +67 -0
- package/src/_esm/src/ts/utils/algorithms/convexHull.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.d.ts +41 -0
- package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.js +141 -0
- package/src/_esm/src/ts/utils/algorithms/convexPolygonIncircle.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/delaunay.d.ts +30 -0
- package/src/_esm/src/ts/utils/algorithms/delaunay.js +153 -0
- package/src/_esm/src/ts/utils/algorithms/delaunay.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.d.ts +25 -0
- package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.js +99 -0
- package/src/_esm/src/ts/utils/algorithms/delaunay2voronoi.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/detectPaths.d.ts +21 -0
- package/src/_esm/src/ts/utils/algorithms/detectPaths.js +165 -0
- package/src/_esm/src/ts/utils/algorithms/detectPaths.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.d.ts +21 -0
- package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.js +47 -0
- package/src/_esm/src/ts/utils/algorithms/findPolygonSelfIntersections.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/getContrastColor.d.ts +13 -0
- package/src/_esm/src/ts/utils/algorithms/getContrastColor.js +22 -0
- package/src/_esm/src/ts/utils/algorithms/getContrastColor.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/matrixFill.d.ts +10 -0
- package/src/_esm/src/ts/utils/algorithms/matrixFill.js +17 -0
- package/src/_esm/src/ts/utils/algorithms/matrixFill.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.d.ts +23 -0
- package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.js +266 -0
- package/src/_esm/src/ts/utils/algorithms/pixelCornersToRoundPaths.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.d.ts +28 -0
- package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.js +99 -0
- package/src/_esm/src/ts/utils/algorithms/splitPolygonToNonIntersecting.js.map +1 -0
- package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.d.ts +16 -0
- package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.js +72 -0
- package/src/_esm/src/ts/utils/algorithms/sutherlandHodgman.js.map +1 -0
- package/src/_esm/src/ts/utils/cloneVertexArray.d.ts +13 -0
- package/src/_esm/src/ts/utils/cloneVertexArray.js +19 -0
- package/src/_esm/src/ts/utils/cloneVertexArray.js.map +1 -0
- package/src/_esm/src/ts/utils/createRandomizedPolygon.d.ts +14 -0
- package/src/_esm/src/ts/utils/createRandomizedPolygon.js +28 -0
- package/src/_esm/src/ts/utils/createRandomizedPolygon.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.d.ts +83 -0
- package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.js +158 -0
- package/src/_esm/src/ts/utils/datastructures/CircularIntervalSet.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/Color.d.ts +391 -0
- package/src/_esm/src/ts/utils/datastructures/Color.js +1063 -0
- package/src/_esm/src/ts/utils/datastructures/Color.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/ColorGradient.d.ts +81 -0
- package/src/_esm/src/ts/utils/datastructures/ColorGradient.js +171 -0
- package/src/_esm/src/ts/utils/datastructures/ColorGradient.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2d.d.ts +53 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2d.js +19 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2d.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.d.ts +88 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.js +150 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2dArrayMatrix.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.d.ts +59 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.js +79 -0
- package/src/_esm/src/ts/utils/datastructures/DataGrid2dListAdapter.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GenericPath.d.ts +86 -0
- package/src/_esm/src/ts/utils/datastructures/GenericPath.js +117 -0
- package/src/_esm/src/ts/utils/datastructures/GenericPath.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GeometryMesh.d.ts +49 -0
- package/src/_esm/src/ts/utils/datastructures/GeometryMesh.js +53 -0
- package/src/_esm/src/ts/utils/datastructures/GeometryMesh.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/Girih.d.ts +181 -0
- package/src/_esm/src/ts/utils/datastructures/Girih.js +261 -0
- package/src/_esm/src/ts/utils/datastructures/Girih.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihBowtie.d.ts +37 -0
- package/src/_esm/src/ts/utils/datastructures/GirihBowtie.js +130 -0
- package/src/_esm/src/ts/utils/datastructures/GirihBowtie.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihDecagon.d.ts +52 -0
- package/src/_esm/src/ts/utils/datastructures/GirihDecagon.js +110 -0
- package/src/_esm/src/ts/utils/datastructures/GirihDecagon.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihHexagon.d.ts +39 -0
- package/src/_esm/src/ts/utils/datastructures/GirihHexagon.js +178 -0
- package/src/_esm/src/ts/utils/datastructures/GirihHexagon.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.d.ts +46 -0
- package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.js +167 -0
- package/src/_esm/src/ts/utils/datastructures/GirihPenroseRhombus.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihPentagon.d.ts +37 -0
- package/src/_esm/src/ts/utils/datastructures/GirihPentagon.js +87 -0
- package/src/_esm/src/ts/utils/datastructures/GirihPentagon.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihRhombus.d.ts +38 -0
- package/src/_esm/src/ts/utils/datastructures/GirihRhombus.js +133 -0
- package/src/_esm/src/ts/utils/datastructures/GirihRhombus.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/GirihTile.d.ts +283 -0
- package/src/_esm/src/ts/utils/datastructures/GirihTile.js +286 -0
- package/src/_esm/src/ts/utils/datastructures/GirihTile.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/Matrix4x4.d.ts +244 -0
- package/src/_esm/src/ts/utils/datastructures/Matrix4x4.js +246 -0
- package/src/_esm/src/ts/utils/datastructures/Matrix4x4.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/VoronoiCell.d.ts +122 -0
- package/src/_esm/src/ts/utils/datastructures/VoronoiCell.js +178 -0
- package/src/_esm/src/ts/utils/datastructures/VoronoiCell.js.map +1 -0
- package/src/_esm/src/ts/utils/datastructures/interfaces.d.ts +13 -0
- package/src/_esm/src/ts/utils/datastructures/interfaces.js +9 -0
- package/src/_esm/src/ts/utils/datastructures/interfaces.js.map +1 -0
- package/src/_esm/src/ts/utils/detectDarkMode.d.ts +10 -0
- package/src/_esm/src/ts/utils/detectDarkMode.js +37 -0
- package/src/_esm/src/ts/utils/detectDarkMode.js.map +1 -0
- package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.d.ts +246 -0
- package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.js +743 -0
- package/src/_esm/src/ts/utils/dom/components/ColorGradientPicker.js.map +1 -0
- package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.d.ts +118 -0
- package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.js +339 -0
- package/src/_esm/src/ts/utils/dom/components/ColorGradientSelector.js.map +1 -0
- package/src/_esm/src/ts/utils/dom/components/Test.d.ts +7 -0
- package/src/_esm/src/ts/utils/dom/components/Test.js +26 -0
- package/src/_esm/src/ts/utils/dom/components/Test.js.map +1 -0
- package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.d.ts +2 -0
- package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.js +25 -0
- package/src/_esm/src/ts/utils/dom/getAvailableContainerSpace.js.map +1 -0
- package/src/_esm/src/ts/utils/dom/getFProp.d.ts +5 -0
- package/src/_esm/src/ts/utils/dom/getFProp.js +8 -0
- package/src/_esm/src/ts/utils/dom/getFProp.js.map +1 -0
- package/src/_esm/src/ts/utils/dom/guiSizeToggler.d.ts +18 -0
- package/src/_esm/src/ts/utils/dom/guiSizeToggler.js +40 -0
- package/src/_esm/src/ts/utils/dom/guiSizeToggler.js.map +1 -0
- package/src/_esm/src/ts/utils/findInVertexArray.d.ts +19 -0
- package/src/_esm/src/ts/utils/findInVertexArray.js +25 -0
- package/src/_esm/src/ts/utils/findInVertexArray.js.map +1 -0
- package/src/_esm/src/ts/utils/gup.d.ts +14 -0
- package/src/_esm/src/ts/utils/gup.js +27 -0
- package/src/_esm/src/ts/utils/gup.js.map +1 -0
- package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.d.ts +272 -0
- package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.js +648 -0
- package/src/_esm/src/ts/utils/helpers/BezierPathInteractionHelper.js.map +1 -0
- package/src/_esm/src/ts/utils/helpers/CircleHelper.d.ts +73 -0
- package/src/_esm/src/ts/utils/helpers/CircleHelper.js +88 -0
- package/src/_esm/src/ts/utils/helpers/CircleHelper.js.map +1 -0
- package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.d.ts +90 -0
- package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.js +109 -0
- package/src/_esm/src/ts/utils/helpers/CircleSectorHelper.js.map +1 -0
- package/src/_esm/src/ts/utils/helpers/TriangleHelper.d.ts +57 -0
- package/src/_esm/src/ts/utils/helpers/TriangleHelper.js +78 -0
- package/src/_esm/src/ts/utils/helpers/TriangleHelper.js.map +1 -0
- package/src/_esm/src/ts/utils/helpers/VEllipseHelper.d.ts +32 -0
- package/src/_esm/src/ts/utils/helpers/VEllipseHelper.js +83 -0
- package/src/_esm/src/ts/utils/helpers/VEllipseHelper.js.map +1 -0
- package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.d.ts +52 -0
- package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.js +130 -0
- package/src/_esm/src/ts/utils/helpers/VEllipseSectorHelper.js.map +1 -0
- package/src/_esm/src/ts/utils/io/FileDrop.d.ts +110 -0
- package/src/_esm/src/ts/utils/io/FileDrop.js +171 -0
- package/src/_esm/src/ts/utils/io/FileDrop.js.map +1 -0
- package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.d.ts +78 -0
- package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.js +217 -0
- package/src/_esm/src/ts/utils/parsers/LinearColorGradientParser.js.map +1 -0
- package/src/_esm/src/ts/utils/parsers/OBJParser.d.ts +24 -0
- package/src/_esm/src/ts/utils/parsers/OBJParser.js +72 -0
- package/src/_esm/src/ts/utils/parsers/OBJParser.js.map +1 -0
- package/src/_esm/src/ts/utils/parsers/STLParser.d.ts +61 -0
- package/src/_esm/src/ts/utils/parsers/STLParser.js +175 -0
- package/src/_esm/src/ts/utils/parsers/STLParser.js.map +1 -0
- package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.d.ts +27 -0
- package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.js +482 -0
- package/src/_esm/src/ts/utils/parsers/svg/parseSVGPathData.js.map +1 -0
- package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.d.ts +20 -0
- package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.js +49 -0
- package/src/_esm/src/ts/utils/parsers/svg/splitSVGPathData.js.map +1 -0
- package/src/_esm/src/ts/utils/parsers/svg/types.d.ts +63 -0
- package/src/_esm/src/ts/utils/parsers/svg/types.js +16 -0
- package/src/_esm/src/ts/utils/parsers/svg/types.js.map +1 -0
- package/src/_esm/utils/InitializationObserver.d.ts +18 -0
- package/src/_esm/utils/InitializationObserver.js +61 -0
- package/src/_esm/utils/InitializationObserver.js.map +1 -0
- package/src/_esm/utils/LissajousFigure.d.ts +34 -0
- package/src/_esm/utils/LissajousFigure.js +99 -0
- package/src/_esm/utils/LissajousFigure.js.map +1 -0
- package/src/_esm/utils/NGons.d.ts +13 -0
- package/src/_esm/utils/NGons.js +36 -0
- package/src/_esm/utils/NGons.js.map +1 -0
- package/src/_esm/utils/Params.d.ts +17 -0
- package/src/_esm/utils/Params.js +52 -0
- package/src/_esm/utils/Params.js.map +1 -0
- package/src/_esm/utils/PerlinNoise.d.ts +19 -0
- package/src/_esm/utils/PerlinNoise.js +350 -0
- package/src/_esm/utils/PerlinNoise.js.map +1 -0
- package/src/_esm/utils/SVGPathUtils.d.ts +22 -0
- package/src/_esm/utils/SVGPathUtils.js +45 -0
- package/src/_esm/utils/SVGPathUtils.js.map +1 -0
- package/src/_esm/utils/WebColors.d.ts +35 -0
- package/src/_esm/utils/WebColors.js +58 -0
- package/src/_esm/utils/WebColors.js.map +1 -0
- package/src/_esm/utils/WebColorsContrast.d.ts +6 -0
- package/src/_esm/utils/WebColorsContrast.js +12 -0
- package/src/_esm/utils/WebColorsContrast.js.map +1 -0
- package/src/_esm/utils/WebColorsMalachite.d.ts +12 -0
- package/src/_esm/utils/WebColorsMalachite.js +28 -0
- package/src/_esm/utils/WebColorsMalachite.js.map +1 -0
- package/src/_esm/utils/algorithms/CatmullRomPath.d.ts +60 -0
- package/src/_esm/utils/algorithms/CatmullRomPath.js +107 -0
- package/src/_esm/utils/algorithms/CatmullRomPath.js.map +1 -0
- package/src/_esm/utils/algorithms/CircleIntersections.d.ts +170 -0
- package/src/_esm/utils/algorithms/CircleIntersections.js +307 -0
- package/src/_esm/utils/algorithms/CircleIntersections.js.map +1 -0
- package/src/_esm/utils/algorithms/ContourLineDetection.d.ts +150 -0
- package/src/_esm/utils/algorithms/ContourLineDetection.js +366 -0
- package/src/_esm/utils/algorithms/ContourLineDetection.js.map +1 -0
- package/src/_esm/utils/algorithms/CubicSplinePath.d.ts +63 -0
- package/src/_esm/utils/algorithms/CubicSplinePath.js +174 -0
- package/src/_esm/utils/algorithms/CubicSplinePath.js.map +1 -0
- package/src/_esm/utils/algorithms/HobbyPath.d.ts +81 -0
- package/src/_esm/utils/algorithms/HobbyPath.js +277 -0
- package/src/_esm/utils/algorithms/HobbyPath.js.map +1 -0
- package/src/_esm/utils/algorithms/Metaballs.d.ts +30 -0
- package/src/_esm/utils/algorithms/Metaballs.js +113 -0
- package/src/_esm/utils/algorithms/Metaballs.js.map +1 -0
- package/src/_esm/utils/algorithms/PolygonInset.d.ts +184 -0
- package/src/_esm/utils/algorithms/PolygonInset.js +428 -0
- package/src/_esm/utils/algorithms/PolygonInset.js.map +1 -0
- package/src/_esm/utils/algorithms/PolygonTesselationOutlines.d.ts +145 -0
- package/src/_esm/utils/algorithms/PolygonTesselationOutlines.js +267 -0
- package/src/_esm/utils/algorithms/PolygonTesselationOutlines.js.map +1 -0
- package/src/_esm/utils/algorithms/arrayFill.d.ts +8 -0
- package/src/_esm/utils/algorithms/arrayFill.js +18 -0
- package/src/_esm/utils/algorithms/arrayFill.js.map +1 -0
- package/src/_esm/utils/algorithms/arrayResize.d.ts +8 -0
- package/src/_esm/utils/algorithms/arrayResize.js +24 -0
- package/src/_esm/utils/algorithms/arrayResize.js.map +1 -0
- package/src/_esm/utils/algorithms/arrayShuffle.d.ts +8 -0
- package/src/_esm/utils/algorithms/arrayShuffle.js +15 -0
- package/src/_esm/utils/algorithms/arrayShuffle.js.map +1 -0
- package/src/_esm/utils/algorithms/clearDuplicateVertices.d.ts +22 -0
- package/src/_esm/utils/algorithms/clearDuplicateVertices.js +51 -0
- package/src/_esm/utils/algorithms/clearDuplicateVertices.js.map +1 -0
- package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.d.ts +24 -0
- package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.js +61 -0
- package/src/_esm/utils/algorithms/clearPolygonDuplicateVertices.js.map +1 -0
- package/src/_esm/utils/algorithms/convexHull.d.ts +23 -0
- package/src/_esm/utils/algorithms/convexHull.js +71 -0
- package/src/_esm/utils/algorithms/convexHull.js.map +1 -0
- package/src/_esm/utils/algorithms/convexPolygonIncircle.d.ts +41 -0
- package/src/_esm/utils/algorithms/convexPolygonIncircle.js +145 -0
- package/src/_esm/utils/algorithms/convexPolygonIncircle.js.map +1 -0
- package/src/_esm/utils/algorithms/createRandomizedPolygon.d.ts +14 -0
- package/src/_esm/utils/algorithms/createRandomizedPolygon.js +28 -0
- package/src/_esm/utils/algorithms/createRandomizedPolygon.js.map +1 -0
- package/src/_esm/utils/algorithms/delaunay.d.ts +30 -0
- package/src/_esm/utils/algorithms/delaunay.js +157 -0
- package/src/_esm/utils/algorithms/delaunay.js.map +1 -0
- package/src/_esm/utils/algorithms/delaunay2voronoi.d.ts +25 -0
- package/src/_esm/utils/algorithms/delaunay2voronoi.js +103 -0
- package/src/_esm/utils/algorithms/delaunay2voronoi.js.map +1 -0
- package/src/_esm/utils/algorithms/detectPaths.d.ts +21 -0
- package/src/_esm/utils/algorithms/detectPaths.js +169 -0
- package/src/_esm/utils/algorithms/detectPaths.js.map +1 -0
- package/src/_esm/utils/algorithms/findPolygonSelfIntersections.d.ts +21 -0
- package/src/_esm/utils/algorithms/findPolygonSelfIntersections.js +51 -0
- package/src/_esm/utils/algorithms/findPolygonSelfIntersections.js.map +1 -0
- package/src/_esm/utils/algorithms/getContrastColor.d.ts +13 -0
- package/src/_esm/utils/algorithms/getContrastColor.js +26 -0
- package/src/_esm/utils/algorithms/getContrastColor.js.map +1 -0
- package/src/_esm/utils/algorithms/matrixFill.d.ts +10 -0
- package/src/_esm/utils/algorithms/matrixFill.js +21 -0
- package/src/_esm/utils/algorithms/matrixFill.js.map +1 -0
- package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.d.ts +23 -0
- package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.js +270 -0
- package/src/_esm/utils/algorithms/pixelCornersToRoundPaths.js.map +1 -0
- package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.d.ts +28 -0
- package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.js +102 -0
- package/src/_esm/utils/algorithms/splitPolygonToNonIntersecting.js.map +1 -0
- package/src/_esm/utils/algorithms/sutherlandHodgman.d.ts +16 -0
- package/src/_esm/utils/algorithms/sutherlandHodgman.js +76 -0
- package/src/_esm/utils/algorithms/sutherlandHodgman.js.map +1 -0
- package/src/_esm/utils/cloneVertexArray.d.ts +13 -0
- package/src/_esm/utils/cloneVertexArray.js +23 -0
- package/src/_esm/utils/cloneVertexArray.js.map +1 -0
- package/src/_esm/utils/createRandomizedPolygon.d.ts +14 -0
- package/src/_esm/utils/createRandomizedPolygon.js +32 -0
- package/src/_esm/utils/createRandomizedPolygon.js.map +1 -0
- package/src/_esm/utils/datastructures/CircularIntervalSet.d.ts +83 -0
- package/src/_esm/utils/datastructures/CircularIntervalSet.js +162 -0
- package/src/_esm/utils/datastructures/CircularIntervalSet.js.map +1 -0
- package/src/_esm/utils/datastructures/Color.d.ts +391 -0
- package/src/_esm/utils/datastructures/Color.js +1067 -0
- package/src/_esm/utils/datastructures/Color.js.map +1 -0
- package/src/_esm/utils/datastructures/ColorGradient.d.ts +81 -0
- package/src/_esm/utils/datastructures/ColorGradient.js +175 -0
- package/src/_esm/utils/datastructures/ColorGradient.js.map +1 -0
- package/src/_esm/utils/datastructures/DataGrid2d.d.ts +53 -0
- package/src/_esm/utils/datastructures/DataGrid2d.js +20 -0
- package/src/_esm/utils/datastructures/DataGrid2d.js.map +1 -0
- package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.d.ts +88 -0
- package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.js +154 -0
- package/src/_esm/utils/datastructures/DataGrid2dArrayMatrix.js.map +1 -0
- package/src/_esm/utils/datastructures/DataGrid2dListAdapter.d.ts +59 -0
- package/src/_esm/utils/datastructures/DataGrid2dListAdapter.js +83 -0
- package/src/_esm/utils/datastructures/DataGrid2dListAdapter.js.map +1 -0
- package/src/_esm/utils/datastructures/GenericPath.d.ts +86 -0
- package/src/_esm/utils/datastructures/GenericPath.js +121 -0
- package/src/_esm/utils/datastructures/GenericPath.js.map +1 -0
- package/src/_esm/utils/datastructures/GeometryMesh.d.ts +49 -0
- package/src/_esm/utils/datastructures/GeometryMesh.js +57 -0
- package/src/_esm/utils/datastructures/GeometryMesh.js.map +1 -0
- package/src/_esm/utils/datastructures/Girih.d.ts +181 -0
- package/src/_esm/utils/datastructures/Girih.js +265 -0
- package/src/_esm/utils/datastructures/Girih.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihBowtie.d.ts +37 -0
- package/src/_esm/utils/datastructures/GirihBowtie.js +134 -0
- package/src/_esm/utils/datastructures/GirihBowtie.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihDecagon.d.ts +52 -0
- package/src/_esm/utils/datastructures/GirihDecagon.js +114 -0
- package/src/_esm/utils/datastructures/GirihDecagon.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihHexagon.d.ts +39 -0
- package/src/_esm/utils/datastructures/GirihHexagon.js +182 -0
- package/src/_esm/utils/datastructures/GirihHexagon.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihPenroseRhombus.d.ts +46 -0
- package/src/_esm/utils/datastructures/GirihPenroseRhombus.js +171 -0
- package/src/_esm/utils/datastructures/GirihPenroseRhombus.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihPentagon.d.ts +37 -0
- package/src/_esm/utils/datastructures/GirihPentagon.js +91 -0
- package/src/_esm/utils/datastructures/GirihPentagon.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihRhombus.d.ts +38 -0
- package/src/_esm/utils/datastructures/GirihRhombus.js +137 -0
- package/src/_esm/utils/datastructures/GirihRhombus.js.map +1 -0
- package/src/_esm/utils/datastructures/GirihTile.d.ts +283 -0
- package/src/_esm/utils/datastructures/GirihTile.js +290 -0
- package/src/_esm/utils/datastructures/GirihTile.js.map +1 -0
- package/src/_esm/utils/datastructures/Matrix4x4.d.ts +244 -0
- package/src/_esm/utils/datastructures/Matrix4x4.js +250 -0
- package/src/_esm/utils/datastructures/Matrix4x4.js.map +1 -0
- package/src/_esm/utils/datastructures/VoronoiCell.d.ts +122 -0
- package/src/_esm/utils/datastructures/VoronoiCell.js +182 -0
- package/src/_esm/utils/datastructures/VoronoiCell.js.map +1 -0
- package/src/_esm/utils/datastructures/interfaces.d.ts +13 -0
- package/src/_esm/utils/datastructures/interfaces.js +10 -0
- package/src/_esm/utils/datastructures/interfaces.js.map +1 -0
- package/src/_esm/utils/detectDarkMode.d.ts +10 -0
- package/src/_esm/utils/detectDarkMode.js +41 -0
- package/src/_esm/utils/detectDarkMode.js.map +1 -0
- package/src/_esm/utils/dom/components/ColorGradientPicker.d.ts +246 -0
- package/src/_esm/utils/dom/components/ColorGradientPicker.js +780 -0
- package/src/_esm/utils/dom/components/ColorGradientPicker.js.map +1 -0
- package/src/_esm/utils/dom/components/ColorGradientPickerJSX.d.ts +129 -0
- package/src/_esm/utils/dom/components/ColorGradientPickerJSX.js +582 -0
- package/src/_esm/utils/dom/components/ColorGradientPickerJSX.js.map +1 -0
- package/src/_esm/utils/dom/components/ColorGradientSelector.d.ts +118 -0
- package/src/_esm/utils/dom/components/ColorGradientSelector.js +376 -0
- package/src/_esm/utils/dom/components/ColorGradientSelector.js.map +1 -0
- package/src/_esm/utils/dom/components/Test.d.ts +7 -0
- package/src/_esm/utils/dom/components/Test.js +63 -0
- package/src/_esm/utils/dom/components/Test.js.map +1 -0
- package/src/_esm/utils/dom/getAvailableContainerSpace.d.ts +2 -0
- package/src/_esm/utils/dom/getAvailableContainerSpace.js +29 -0
- package/src/_esm/utils/dom/getAvailableContainerSpace.js.map +1 -0
- package/src/_esm/utils/dom/getFProp.d.ts +5 -0
- package/src/_esm/utils/dom/getFProp.js +12 -0
- package/src/_esm/utils/dom/getFProp.js.map +1 -0
- package/src/_esm/utils/dom/guiSizeToggler.d.ts +18 -0
- package/src/_esm/utils/dom/guiSizeToggler.js +44 -0
- package/src/_esm/utils/dom/guiSizeToggler.js.map +1 -0
- package/src/_esm/utils/findInVertexArray.d.ts +19 -0
- package/src/_esm/utils/findInVertexArray.js +29 -0
- package/src/_esm/utils/findInVertexArray.js.map +1 -0
- package/src/_esm/utils/getFProp.d.ts +5 -0
- package/src/_esm/utils/getFProp.js +8 -0
- package/src/_esm/utils/getFProp.js.map +1 -0
- package/src/_esm/utils/gup.d.ts +14 -0
- package/src/_esm/utils/gup.js +31 -0
- package/src/_esm/utils/gup.js.map +1 -0
- package/src/_esm/utils/helpers/BezierPathInteractionHelper.d.ts +272 -0
- package/src/_esm/utils/helpers/BezierPathInteractionHelper.js +655 -0
- package/src/_esm/utils/helpers/BezierPathInteractionHelper.js.map +1 -0
- package/src/_esm/utils/helpers/CircleHelper.d.ts +73 -0
- package/src/_esm/utils/helpers/CircleHelper.js +92 -0
- package/src/_esm/utils/helpers/CircleHelper.js.map +1 -0
- package/src/_esm/utils/helpers/CircleSectorHelper.d.ts +90 -0
- package/src/_esm/utils/helpers/CircleSectorHelper.js +113 -0
- package/src/_esm/utils/helpers/CircleSectorHelper.js.map +1 -0
- package/src/_esm/utils/helpers/TriangleHelper.d.ts +57 -0
- package/src/_esm/utils/helpers/TriangleHelper.js +82 -0
- package/src/_esm/utils/helpers/TriangleHelper.js.map +1 -0
- package/src/_esm/utils/helpers/VEllipseHelper.d.ts +32 -0
- package/src/_esm/utils/helpers/VEllipseHelper.js +87 -0
- package/src/_esm/utils/helpers/VEllipseHelper.js.map +1 -0
- package/src/_esm/utils/helpers/VEllipseSectorHelper.d.ts +52 -0
- package/src/_esm/utils/helpers/VEllipseSectorHelper.js +134 -0
- package/src/_esm/utils/helpers/VEllipseSectorHelper.js.map +1 -0
- package/src/_esm/utils/io/DndFileHandler.d.ts +63 -0
- package/src/_esm/utils/io/DndFileHandler.js +106 -0
- package/src/_esm/utils/io/DndFileHandler.js.map +1 -0
- package/src/_esm/utils/io/FileDrop.d.ts +110 -0
- package/src/_esm/utils/io/FileDrop.js +175 -0
- package/src/_esm/utils/io/FileDrop.js.map +1 -0
- package/src/_esm/utils/parsers/LinearColorGradientParser.d.ts +78 -0
- package/src/_esm/utils/parsers/LinearColorGradientParser.js +223 -0
- package/src/_esm/utils/parsers/LinearColorGradientParser.js.map +1 -0
- package/src/_esm/utils/parsers/OBJParser.d.ts +25 -0
- package/src/_esm/utils/parsers/OBJParser.js +78 -0
- package/src/_esm/utils/parsers/OBJParser.js.map +1 -0
- package/src/_esm/utils/parsers/STLParser.d.ts +61 -0
- package/src/_esm/utils/parsers/STLParser.js +179 -0
- package/src/_esm/utils/parsers/STLParser.js.map +1 -0
- package/src/_esm/utils/parsers/svg/parseSVGPathData.d.ts +27 -0
- package/src/_esm/utils/parsers/svg/parseSVGPathData.js +486 -0
- package/src/_esm/utils/parsers/svg/parseSVGPathData.js.map +1 -0
- package/src/_esm/utils/parsers/svg/splitSVGPathData.d.ts +20 -0
- package/src/_esm/utils/parsers/svg/splitSVGPathData.js +53 -0
- package/src/_esm/utils/parsers/svg/splitSVGPathData.js.map +1 -0
- package/src/_esm/utils/parsers/svg/types.d.ts +63 -0
- package/src/_esm/utils/parsers/svg/types.js +17 -0
- package/src/_esm/utils/parsers/svg/types.js.map +1 -0
- package/src/cjs/PlotBoilerplate.d.ts +11 -1
- package/src/cjs/PlotBoilerplate.js +23 -7
- package/src/cjs/PlotBoilerplate.js.map +1 -1
- package/src/cjs/VertexListeners.d.ts +2 -1
- package/src/cjs/VertexListeners.js +5 -1
- package/src/cjs/VertexListeners.js.map +1 -1
- package/src/cjs/draw.d.ts +18 -2
- package/src/cjs/draw.js +21 -2
- package/src/cjs/draw.js.map +1 -1
- package/src/cjs/drawgl.d.ts +18 -3
- package/src/cjs/drawgl.js +19 -2
- package/src/cjs/drawgl.js.map +1 -1
- package/src/cjs/drawutilssvg.d.ts +19 -1
- package/src/cjs/drawutilssvg.js +28 -5
- package/src/cjs/drawutilssvg.js.map +1 -1
- package/src/cjs/interfaces/DrawLib.d.ts +18 -1
- package/src/cjs/interfaces/DrawLib.js +2 -0
- package/src/cjs/interfaces/DrawLib.js.map +1 -1
- package/src/cjs/utils/Params.d.ts +3 -2
- package/src/cjs/utils/Params.js +11 -3
- package/src/cjs/utils/Params.js.map +1 -1
- package/src/cjs/utils/WebColors.d.ts +2 -1
- package/src/cjs/utils/WebColors.js +15 -2
- package/src/cjs/utils/WebColors.js.map +1 -1
- package/src/cjs/utils/algorithms/HobbyPath.js +13 -16
- package/src/cjs/utils/algorithms/HobbyPath.js.map +1 -1
- package/src/cjs/utils/helpers/BezierResizeHelper.d.ts +144 -0
- package/src/cjs/utils/helpers/BezierResizeHelper.js +319 -0
- package/src/cjs/utils/helpers/BezierResizeHelper.js.map +1 -0
- package/src/esm/PlotBoilerplate.d.ts +11 -1
- package/src/esm/PlotBoilerplate.js +23 -7
- package/src/esm/PlotBoilerplate.js.map +1 -1
- package/src/esm/VertexListeners.d.ts +2 -1
- package/src/esm/VertexListeners.js +5 -1
- package/src/esm/VertexListeners.js.map +1 -1
- package/src/esm/draw.d.ts +18 -2
- package/src/esm/draw.js +21 -2
- package/src/esm/draw.js.map +1 -1
- package/src/esm/drawgl.d.ts +18 -3
- package/src/esm/drawgl.js +19 -2
- package/src/esm/drawgl.js.map +1 -1
- package/src/esm/drawutilssvg.d.ts +19 -1
- package/src/esm/drawutilssvg.js +28 -5
- package/src/esm/drawutilssvg.js.map +1 -1
- package/src/esm/interfaces/DrawLib.d.ts +18 -1
- package/src/esm/interfaces/DrawLib.js +2 -0
- package/src/esm/interfaces/DrawLib.js.map +1 -1
- package/src/esm/utils/Params.d.ts +3 -2
- package/src/esm/utils/Params.js +11 -3
- package/src/esm/utils/Params.js.map +1 -1
- package/src/esm/utils/WebColors.d.ts +2 -1
- package/src/esm/utils/WebColors.js +15 -2
- package/src/esm/utils/WebColors.js.map +1 -1
- package/src/esm/utils/algorithms/HobbyPath.js +13 -16
- package/src/esm/utils/algorithms/HobbyPath.js.map +1 -1
- package/src/esm/utils/helpers/BezierResizeHelper.d.ts +144 -0
- package/src/esm/utils/helpers/BezierResizeHelper.js +314 -0
- package/src/esm/utils/helpers/BezierResizeHelper.js.map +1 -0
- package/src/ts/PlotBoilerplate.ts +37 -11
- package/src/ts/VertexListeners.ts +5 -1
- package/src/ts/draw.ts +32 -2
- package/src/ts/drawgl.ts +38 -3
- package/src/ts/drawutilssvg.ts +33 -6
- package/src/ts/interfaces/DrawLib.ts +19 -1
- package/src/ts/utils/Params.ts +11 -3
- package/src/ts/utils/WebColors.ts +15 -2
- package/src/ts/utils/algorithms/HobbyPath.ts +248 -272
- package/src/ts/utils/helpers/BezierResizeHelper.ts +390 -0
- /package/src/{cjs → _cjs}/utils/_gup.js_ +0 -0
|
@@ -0,0 +1,1063 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Extended, bugfixed and ported to TypeScript by Ikaros Kappler.
|
|
3
|
+
* @modified 2018-xx-xx Added a clone() function.
|
|
4
|
+
* @modified 2018-xx-xx Allowing leading '#' in the makeHEX() function.
|
|
5
|
+
* @modified 2018-11-28 Fixed the checkHEX() function to accept 000000.
|
|
6
|
+
* @modified 2019-11-18 Added a generic parse(string) function that detects the format.
|
|
7
|
+
* @modified 2020-01-09 Fixed a bug in the parse(string) function. Hex colors with only three elements were considered faulty.
|
|
8
|
+
* @modified 2020-10-23 Ported to Typescript.
|
|
9
|
+
* @modified 2021-02-08 Fixed a lot of es2015 compatibility issues.
|
|
10
|
+
* @modified 2021-02-08 Added basic tsdoc/jsdoc comments.
|
|
11
|
+
* @modified 2021-11-05 Fixing the regex to parse rgba-strings.
|
|
12
|
+
* @modified 2021-11-05 Added return value `this` to all modifier functions (for chaining).
|
|
13
|
+
* @modified 2021-11-07 Changed the behavior of `darken` and `lighten`: the passed value is handled relative now which makes values much easier predictable and makes the change feel more 'natural'.
|
|
14
|
+
* @modified 2021-11-07 Did the same with `saturate` and `desaturate`.
|
|
15
|
+
* @modified 2021-11-07 Did the same with the `fadein` and `fadeout` functions.
|
|
16
|
+
* @modified 2021-11-07 Added setRed, setGreen, setBlue, setHue, setSaturation, setLiminance functions.
|
|
17
|
+
* @modified 2022-05-11 Modified the `clone` function by just copying the numeric calues, not re-calculating the whole color.
|
|
18
|
+
* @modified 2022-05-11 Fixed the `interpolate` function.
|
|
19
|
+
* @modified 2023-01-23 Added `Color.set(Color)` function to set all values (r,g,b,h,s,l,a) simultanoeusly.
|
|
20
|
+
* @modified 2024-03-10 Fixed some NaN type check for Typescript 5 compatibility.
|
|
21
|
+
* @modified 2025-08-08 Fixed an issue in the static `makeRGB` method: values in [0..1] are now correctly reconized (1.0 was excluded).
|
|
22
|
+
* @modified 2025-08-08 Added static color instances (singletons): Color.Red, Color.Gold, Color.Yellow, Color.Green, Color.LimeGreen, Color.Blue, Color.MediumBlue, Color.Purple.
|
|
23
|
+
* @modified 2025-09-01 Adding all standard web colors. Source: https://en.wikipedia.org/wiki/Web_colors
|
|
24
|
+
* @modified 2025-09-01 Modifying the `Sanitizer.RGB` helper method: recognoizing 0 to 255 as valid values (not only 1 to 255).
|
|
25
|
+
* @modified 2025-09-01 Modifying the `Color.parse` method: recognizing CSS color strings now.
|
|
26
|
+
* @version 0.0.14
|
|
27
|
+
**/
|
|
28
|
+
/**
|
|
29
|
+
* @classdesc A color class, inspired by neolitec's Javascript class.
|
|
30
|
+
* Original found at
|
|
31
|
+
* https://gist.github.com/neolitec/1344610
|
|
32
|
+
* Thanks to neolitec
|
|
33
|
+
*/
|
|
34
|
+
export class Color {
|
|
35
|
+
/**
|
|
36
|
+
* Construct a new color with `r=0 g=0 b=0`.
|
|
37
|
+
*
|
|
38
|
+
* Consider using the `makeHex`, `makeRGB` or `makeHSL` functions.
|
|
39
|
+
*
|
|
40
|
+
* @constructor
|
|
41
|
+
* @instance
|
|
42
|
+
* @memberof Color
|
|
43
|
+
*/
|
|
44
|
+
constructor() {
|
|
45
|
+
this.r = this.g = this.b = 0;
|
|
46
|
+
this.h = this.s = this.l = 0;
|
|
47
|
+
this.a = 1;
|
|
48
|
+
}
|
|
49
|
+
// --- RGB ----------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* Get this color as a CSS `rgb` string.
|
|
52
|
+
*
|
|
53
|
+
* Consult this for details: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
54
|
+
*
|
|
55
|
+
* @method cssRGB
|
|
56
|
+
* @instance
|
|
57
|
+
* @memberof Color
|
|
58
|
+
* @return {string} This color as a CSS rgb string.
|
|
59
|
+
*/
|
|
60
|
+
cssRGB() {
|
|
61
|
+
return "rgb(" + Math.round(255 * this.r) + "," + Math.round(255 * this.g) + "," + Math.round(255 * this.b) + ")";
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get this color as a CSS `rgba` string.
|
|
65
|
+
*
|
|
66
|
+
* Consult this for details: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
67
|
+
*
|
|
68
|
+
* @method cssRGBA
|
|
69
|
+
* @instance
|
|
70
|
+
* @memberof Color
|
|
71
|
+
* @return {string} This color as a CSS rgba string.
|
|
72
|
+
*/
|
|
73
|
+
cssRGBA() {
|
|
74
|
+
return `rgba(${Math.round(255 * this.r)},${Math.round(255 * this.g)},${Math.round(255 * this.b)},${this.a})`;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get the red component of this RGB(A)color. This method just returns the `r` color attribute.
|
|
78
|
+
*
|
|
79
|
+
* @method red
|
|
80
|
+
* @instance
|
|
81
|
+
* @memberof Color
|
|
82
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
83
|
+
*/
|
|
84
|
+
red() {
|
|
85
|
+
return this.r;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get the green component of this RGB(A) color. This method just returns the `g` color attribute.
|
|
89
|
+
*
|
|
90
|
+
* @method green
|
|
91
|
+
* @instance
|
|
92
|
+
* @memberof Color
|
|
93
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
94
|
+
*/
|
|
95
|
+
green() {
|
|
96
|
+
return this.g;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the blue component of this RGB(A) color. This method just returns the `b` color attribute.
|
|
100
|
+
*
|
|
101
|
+
* @method blue
|
|
102
|
+
* @instance
|
|
103
|
+
* @memberof Color
|
|
104
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
105
|
+
*/
|
|
106
|
+
blue() {
|
|
107
|
+
return this.b;
|
|
108
|
+
}
|
|
109
|
+
set(color) {
|
|
110
|
+
this.r = color.r;
|
|
111
|
+
this.g = color.g;
|
|
112
|
+
this.b = color.b;
|
|
113
|
+
this.a = color.a;
|
|
114
|
+
this.h = color.h;
|
|
115
|
+
this.s = color.s;
|
|
116
|
+
this.l = color.l;
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
119
|
+
setRed(r) {
|
|
120
|
+
this.r = r;
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
setBlue(b) {
|
|
124
|
+
this.b = b;
|
|
125
|
+
Color.Converter.RGBToHSL(this);
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
128
|
+
setAlpha(a) {
|
|
129
|
+
this.a = a;
|
|
130
|
+
Color.Converter.RGBToHSL(this);
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
setGreen(g) {
|
|
134
|
+
this.g = g;
|
|
135
|
+
Color.Converter.RGBToHSL(this);
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
138
|
+
setHue(h) {
|
|
139
|
+
this.h = h;
|
|
140
|
+
Color.Converter.HSLToRGB(this);
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
setSaturation(s) {
|
|
144
|
+
this.s = s;
|
|
145
|
+
Color.Converter.HSLToRGB(this);
|
|
146
|
+
return this;
|
|
147
|
+
}
|
|
148
|
+
setLuminance(l) {
|
|
149
|
+
this.l = l;
|
|
150
|
+
Color.Converter.HSLToRGB(this);
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
// --- HSL ----------------------------------
|
|
154
|
+
/**
|
|
155
|
+
* Get this color as a CSS `hsl` string.
|
|
156
|
+
*
|
|
157
|
+
* @method cssHSL
|
|
158
|
+
* @instance
|
|
159
|
+
* @memberof Color
|
|
160
|
+
* @return {string} This color as a CSS hsl string.
|
|
161
|
+
*/
|
|
162
|
+
cssHSL() {
|
|
163
|
+
return "hsl(" + Math.round(360 * this.h) + "," + Math.round(100 * this.s) + "%," + Math.round(100 * this.l) + "%)";
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Get this color as a CSS `hsla` string.
|
|
167
|
+
*
|
|
168
|
+
* @method cssHSLA
|
|
169
|
+
* @instance
|
|
170
|
+
* @memberof Color
|
|
171
|
+
* @return {string} This color as a CSS hsla string.
|
|
172
|
+
*/
|
|
173
|
+
cssHSLA() {
|
|
174
|
+
return ("hsla(" +
|
|
175
|
+
Math.round(360 * this.h) +
|
|
176
|
+
"," +
|
|
177
|
+
Math.round(100 * this.s) +
|
|
178
|
+
"%," +
|
|
179
|
+
Math.round(100 * this.l) +
|
|
180
|
+
"%," +
|
|
181
|
+
Math.round(this.a) +
|
|
182
|
+
")");
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Get the hue component of this HSL(A) color. This method just returns the `h` color attribute.
|
|
186
|
+
*
|
|
187
|
+
* @method hue
|
|
188
|
+
* @instance
|
|
189
|
+
* @memberof Color
|
|
190
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
191
|
+
*/
|
|
192
|
+
hue() {
|
|
193
|
+
return this.h;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get the saturation component of this HSL(A) color. This method just returns the `s` color attribute.
|
|
197
|
+
*
|
|
198
|
+
* @method saturation
|
|
199
|
+
* @instance
|
|
200
|
+
* @memberof Color
|
|
201
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
202
|
+
*/
|
|
203
|
+
saturation() {
|
|
204
|
+
return this.s;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Get the lightness component of this HSL(A) color. This method just returns the `l` color attribute.
|
|
208
|
+
*
|
|
209
|
+
* @method lightness
|
|
210
|
+
* @instance
|
|
211
|
+
* @memberof Color
|
|
212
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
213
|
+
*/
|
|
214
|
+
lightness() {
|
|
215
|
+
return this.l;
|
|
216
|
+
}
|
|
217
|
+
// --- HEX ----------------------------------
|
|
218
|
+
/**
|
|
219
|
+
* Get this color as a CSS-HEX string (non-alpha): #rrggbb
|
|
220
|
+
*
|
|
221
|
+
* @method cssHEX
|
|
222
|
+
* @instance
|
|
223
|
+
* @memberof Color
|
|
224
|
+
* @return {string} This color as a CSS-HEX string.
|
|
225
|
+
*/
|
|
226
|
+
cssHEX() {
|
|
227
|
+
return ("#" +
|
|
228
|
+
(255 * this.r < 16 ? "0" : "") +
|
|
229
|
+
Math.round(255 * this.r).toString(16) +
|
|
230
|
+
(255 * this.g < 16 ? "0" : "") +
|
|
231
|
+
Math.round(255 * this.g).toString(16) +
|
|
232
|
+
(255 * this.b < 16 ? "0" : "") +
|
|
233
|
+
Math.round(255 * this.b).toString(16));
|
|
234
|
+
}
|
|
235
|
+
// --- Transparency ----------------------------------
|
|
236
|
+
/**
|
|
237
|
+
* Get the alpha channel (transparency) of this color.
|
|
238
|
+
*
|
|
239
|
+
* @method alpha
|
|
240
|
+
* @instance
|
|
241
|
+
* @memberof Color
|
|
242
|
+
* @return {number} A value between 0.0 and 1.0.
|
|
243
|
+
*/
|
|
244
|
+
alpha() {
|
|
245
|
+
return this.a;
|
|
246
|
+
}
|
|
247
|
+
// --- Modifiers ----------------------------------
|
|
248
|
+
// saturate(v: string | number): Color {
|
|
249
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
250
|
+
// this.s += v / 100;
|
|
251
|
+
// } else if ("number" == typeof v) {
|
|
252
|
+
// // range 255
|
|
253
|
+
// this.s += v / 255;
|
|
254
|
+
// } else {
|
|
255
|
+
// throw new Error("error: bad modifier format (percent or number)");
|
|
256
|
+
// }
|
|
257
|
+
// if (this.s > 1) this.s = 1;
|
|
258
|
+
// else if (this.s < 0) this.s = 0;
|
|
259
|
+
// Color.Converter.HSLToRGB(this);
|
|
260
|
+
// return this;
|
|
261
|
+
// }
|
|
262
|
+
saturate(v) {
|
|
263
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
264
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
265
|
+
this.s += (1 - this.s) * (v / 100);
|
|
266
|
+
}
|
|
267
|
+
else if ("number" == typeof v) {
|
|
268
|
+
if (v >= -0.0 && v <= 1.0) {
|
|
269
|
+
// range 255
|
|
270
|
+
this.s += (1 - this.s) * v;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
// range 0-1
|
|
274
|
+
this.s += (1 - this.s) * (v / 255);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
279
|
+
}
|
|
280
|
+
if (this.s > 1)
|
|
281
|
+
this.s = 1;
|
|
282
|
+
else if (this.s < 0)
|
|
283
|
+
this.s = 0;
|
|
284
|
+
Color.Converter.HSLToRGB(this);
|
|
285
|
+
return this;
|
|
286
|
+
}
|
|
287
|
+
desaturate(v) {
|
|
288
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
289
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
290
|
+
this.s -= v / 100;
|
|
291
|
+
}
|
|
292
|
+
else if ("number" == typeof v) {
|
|
293
|
+
if (v >= 0.0 && v <= 1.0) {
|
|
294
|
+
// range 255
|
|
295
|
+
this.s -= this.s * v;
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
// range 0-1
|
|
299
|
+
this.s -= this.s * (v / 255);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
304
|
+
}
|
|
305
|
+
if (this.s > 1)
|
|
306
|
+
this.s = 1;
|
|
307
|
+
else if (this.s < 0)
|
|
308
|
+
this.s = 0;
|
|
309
|
+
Color.Converter.HSLToRGB(this);
|
|
310
|
+
return this;
|
|
311
|
+
}
|
|
312
|
+
lighten(v) {
|
|
313
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
314
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
315
|
+
this.l += (1 - this.l) * (v / 100);
|
|
316
|
+
}
|
|
317
|
+
else if ("number" == typeof v) {
|
|
318
|
+
if (v >= 0.0 && v <= 1.0) {
|
|
319
|
+
// range 0.0...1.0
|
|
320
|
+
this.l += (1 - this.l) * v;
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
// range 255
|
|
324
|
+
this.l += (1 - this.l) * (v / 255);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
329
|
+
}
|
|
330
|
+
if (this.l > 1)
|
|
331
|
+
this.l = 1;
|
|
332
|
+
else if (this.l < 0)
|
|
333
|
+
this.l = 0;
|
|
334
|
+
Color.Converter.HSLToRGB(this);
|
|
335
|
+
return this;
|
|
336
|
+
}
|
|
337
|
+
darken(v) {
|
|
338
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
339
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
340
|
+
this.l -= this.l * (v / 100);
|
|
341
|
+
}
|
|
342
|
+
else if ("number" == typeof v) {
|
|
343
|
+
if (v >= 0.0 && v <= 1.0) {
|
|
344
|
+
// range 0.0...1.0
|
|
345
|
+
this.l -= this.l * v;
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
// range 255
|
|
349
|
+
this.l -= this.l * (v / 255);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
354
|
+
}
|
|
355
|
+
if (this.l > 1)
|
|
356
|
+
this.l = 1;
|
|
357
|
+
else if (this.l < 0)
|
|
358
|
+
this.l = 0;
|
|
359
|
+
Color.Converter.HSLToRGB(this);
|
|
360
|
+
return this;
|
|
361
|
+
}
|
|
362
|
+
fadein(v) {
|
|
363
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
364
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
365
|
+
this.a += (1 - this.a) * (v / 100);
|
|
366
|
+
}
|
|
367
|
+
else if ("number" == typeof v) {
|
|
368
|
+
if (v >= 0.0 && v <= 1.0) {
|
|
369
|
+
// range 0-1
|
|
370
|
+
this.a += (1 - this.a) * v;
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
// range 255
|
|
374
|
+
this.a += (1 - this.a) * (v / 255);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
379
|
+
}
|
|
380
|
+
console.log("New alpha", this.a);
|
|
381
|
+
if (this.a > 1)
|
|
382
|
+
this.a = 1;
|
|
383
|
+
else if (this.a < 0)
|
|
384
|
+
this.a = 0;
|
|
385
|
+
Color.Converter.HSLToRGB(this);
|
|
386
|
+
return this;
|
|
387
|
+
}
|
|
388
|
+
fadeout(v) {
|
|
389
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
|
|
390
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
391
|
+
this.a -= v / 100;
|
|
392
|
+
}
|
|
393
|
+
else if ("number" == typeof v) {
|
|
394
|
+
if (v >= 0.0 && v <= 1.0) {
|
|
395
|
+
// range 0-1
|
|
396
|
+
this.a -= v;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
// range 255
|
|
400
|
+
this.a -= v / 255;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
405
|
+
}
|
|
406
|
+
if (this.a > 1)
|
|
407
|
+
this.a = 1;
|
|
408
|
+
else if (this.a < 0)
|
|
409
|
+
this.a = 0;
|
|
410
|
+
Color.Converter.HSLToRGB(this);
|
|
411
|
+
return this;
|
|
412
|
+
}
|
|
413
|
+
spin(v) {
|
|
414
|
+
// if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) this.h += v / 100;
|
|
415
|
+
if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
|
|
416
|
+
this.h += v / 100;
|
|
417
|
+
}
|
|
418
|
+
else if ("number" == typeof v) {
|
|
419
|
+
// range 360
|
|
420
|
+
this.h += v / 360;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
throw new Error("error: bad modifier format (percent or number)");
|
|
424
|
+
}
|
|
425
|
+
if (this.h > 1)
|
|
426
|
+
this.h = 1;
|
|
427
|
+
else if (this.h < 0)
|
|
428
|
+
this.h = 0;
|
|
429
|
+
Color.Converter.HSLToRGB(this);
|
|
430
|
+
return this;
|
|
431
|
+
}
|
|
432
|
+
static makeRGB(...args) {
|
|
433
|
+
const c = new Color();
|
|
434
|
+
let sanitized;
|
|
435
|
+
if (args.length < 3 || args.length > 4) {
|
|
436
|
+
throw new Error("error: 3 or 4 arguments");
|
|
437
|
+
}
|
|
438
|
+
sanitized = Color.Sanitizer.RGB(args[0], args[1], args[2]);
|
|
439
|
+
c.r = sanitized[0];
|
|
440
|
+
c.g = sanitized[1];
|
|
441
|
+
c.b = sanitized[2];
|
|
442
|
+
if (args.length == 4) {
|
|
443
|
+
c.a = args[3];
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
c.a = 1.0;
|
|
447
|
+
}
|
|
448
|
+
Color.Converter.RGBToHSL(c);
|
|
449
|
+
return c;
|
|
450
|
+
}
|
|
451
|
+
static makeHSL(...args) {
|
|
452
|
+
const c = new Color();
|
|
453
|
+
let sanitized;
|
|
454
|
+
if (args.length < 3 || args.length > 4) {
|
|
455
|
+
throw new Error("error: 3 or 4 arguments");
|
|
456
|
+
}
|
|
457
|
+
sanitized = Color.Sanitizer.HSL(args[0], args[1], args[2]);
|
|
458
|
+
c.h = sanitized[0];
|
|
459
|
+
c.s = sanitized[1];
|
|
460
|
+
c.l = sanitized[2];
|
|
461
|
+
if (args.length == 4) {
|
|
462
|
+
c.a = typeof args[3] === "string" ? Number.parseFloat(args[3]) : args[3];
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
c.a = 1.0;
|
|
466
|
+
}
|
|
467
|
+
Color.Converter.HSLToRGB(c);
|
|
468
|
+
return c;
|
|
469
|
+
}
|
|
470
|
+
static makeHEX(value) {
|
|
471
|
+
var c = new Color(), sanitized;
|
|
472
|
+
// Edit Ika 2018-0308
|
|
473
|
+
// Allow leading '#'
|
|
474
|
+
if (value && value.startsWith("#")) {
|
|
475
|
+
value = value.substr(1);
|
|
476
|
+
}
|
|
477
|
+
Color.Validator.checkHEX(value);
|
|
478
|
+
if (value.length == 3) {
|
|
479
|
+
sanitized = Color.Sanitizer.RGB(parseInt(value.substr(0, 1) + value.substr(0, 1), 16), parseInt(value.substr(1, 1) + value.substr(1, 1), 16), parseInt(value.substr(2, 1) + value.substr(2, 1), 16));
|
|
480
|
+
}
|
|
481
|
+
else if (value.length == 6) {
|
|
482
|
+
sanitized = Color.Sanitizer.RGB(parseInt(value.substr(0, 2), 16), parseInt(value.substr(2, 2), 16), parseInt(value.substr(4, 2), 16));
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
throw new Error("error: 3 or 6 arguments");
|
|
486
|
+
}
|
|
487
|
+
c.r = sanitized[0];
|
|
488
|
+
c.g = sanitized[1];
|
|
489
|
+
c.b = sanitized[2];
|
|
490
|
+
c.a = 1.0; // TODO: Accept #xxxxxxxx (8 chars, too, for alpha)
|
|
491
|
+
Color.Converter.RGBToHSL(c);
|
|
492
|
+
return c;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Parse the given color string. Currently only these formate are recognized: hex, rgb, rgba.
|
|
496
|
+
*
|
|
497
|
+
* @method parse
|
|
498
|
+
* @static
|
|
499
|
+
* @memberof Color
|
|
500
|
+
* @param {string} str - The string representation to parse.
|
|
501
|
+
* @return {Color} The color instance that's represented by the given string.
|
|
502
|
+
*/
|
|
503
|
+
static parse(str) {
|
|
504
|
+
if (typeof str == "undefined") {
|
|
505
|
+
return null;
|
|
506
|
+
}
|
|
507
|
+
if ((str = str.trim().toLowerCase()).length == 0) {
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
510
|
+
if (str.startsWith("#")) {
|
|
511
|
+
return Color.makeHEX(str.substring(1, str.length));
|
|
512
|
+
}
|
|
513
|
+
if (str.startsWith("rgb")) {
|
|
514
|
+
var parts = str.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(\d*(?:\.\d+\s*)?)\)$/);
|
|
515
|
+
if (!parts) {
|
|
516
|
+
throw "Unrecognized color format (2): " + str;
|
|
517
|
+
}
|
|
518
|
+
// [ str, r, g, b, a|undefined ]
|
|
519
|
+
// console.log("parts", parts);
|
|
520
|
+
if (parts.length <= 4 || typeof parts[4] == "undefined" || parts[4] == "") {
|
|
521
|
+
return Color.makeRGB(parts[1], parts[2], parts[3]);
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
return Color.makeRGB(parts[1], parts[2], parts[3], Number(parts[4]));
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
// Try to locate by CSS color name
|
|
528
|
+
const keys = Object.keys(Color.CSS_COLORS);
|
|
529
|
+
const cssColorKey = keys.reduce((prevKey, curKey) => {
|
|
530
|
+
if (curKey && curKey.toLowerCase() === str.toLowerCase()) {
|
|
531
|
+
return curKey;
|
|
532
|
+
}
|
|
533
|
+
return prevKey;
|
|
534
|
+
}, null);
|
|
535
|
+
if (cssColorKey) {
|
|
536
|
+
const cssColor = Color.CSS_COLORS[cssColorKey];
|
|
537
|
+
// console.log("cssColor?", cssColor, str, cssColorKey);
|
|
538
|
+
if (cssColor) {
|
|
539
|
+
// console.log("CONSTRUCTOR?", cssColor.constructor);
|
|
540
|
+
return cssColor.clone();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
throw "Unrecognized color format (1): " + str;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Create a clone of this color (RGB).
|
|
547
|
+
*
|
|
548
|
+
* @method clone
|
|
549
|
+
* @instance
|
|
550
|
+
* @memberof Color
|
|
551
|
+
* @return {Color} A clone of this color (in RGB mode).
|
|
552
|
+
*/
|
|
553
|
+
clone() {
|
|
554
|
+
// return Color.makeRGB(this.r, this.g, this.b, this.a);
|
|
555
|
+
const col = new Color();
|
|
556
|
+
col.r = this.r;
|
|
557
|
+
col.g = this.g;
|
|
558
|
+
col.b = this.b;
|
|
559
|
+
col.a = this.a;
|
|
560
|
+
col.h = this.h;
|
|
561
|
+
col.s = this.s;
|
|
562
|
+
col.l = this.l;
|
|
563
|
+
return col;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Interpolate this color on the RGB scale.
|
|
567
|
+
*
|
|
568
|
+
* @method interpolate
|
|
569
|
+
* @instance
|
|
570
|
+
* @memberof Color
|
|
571
|
+
* @param {Color} c - The color to interpolate to.
|
|
572
|
+
* @param {number} t - An interpolation value between 0.0 and 1.0.
|
|
573
|
+
* @return {Color} A clone of this color (in RGB mode).
|
|
574
|
+
*/
|
|
575
|
+
interpolate(c, t) {
|
|
576
|
+
this.r += (c.r - this.r) * t;
|
|
577
|
+
this.g += (c.g - this.g) * t;
|
|
578
|
+
this.b += (c.b - this.b) * t;
|
|
579
|
+
this.a += (c.a - this.a) * t;
|
|
580
|
+
return this;
|
|
581
|
+
}
|
|
582
|
+
} // END class
|
|
583
|
+
Color.Sanitizer = {
|
|
584
|
+
RGB: (...args) => {
|
|
585
|
+
var o = [];
|
|
586
|
+
if (args.length == 0) {
|
|
587
|
+
return [];
|
|
588
|
+
}
|
|
589
|
+
// const allAreFrac = Color.testFrac( arguments );
|
|
590
|
+
for (var i = 0; i < args.length; i++) {
|
|
591
|
+
var c = args[i];
|
|
592
|
+
if ("string" == typeof c && c.indexOf("%") > -1) {
|
|
593
|
+
// if ((c = parseInt(c)) == NaN) throw new Error("Bad format");
|
|
594
|
+
if (Number.isNaN((c = parseInt(c)))) {
|
|
595
|
+
throw new Error("Bad format");
|
|
596
|
+
}
|
|
597
|
+
if (c < 0 || c > 100)
|
|
598
|
+
throw new Error("Bad format");
|
|
599
|
+
o[i] = c / 100;
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
// if ("string" == typeof c && (c = parseInt(c)) == NaN) {
|
|
603
|
+
if ("string" == typeof c && Number.isNaN((c = parseInt(c)))) {
|
|
604
|
+
throw new Error("Bad format");
|
|
605
|
+
}
|
|
606
|
+
if (c < 0) {
|
|
607
|
+
throw new Error("Bad format");
|
|
608
|
+
}
|
|
609
|
+
//else if( allAreFrac ) o[i] = c; // c >= 0 && c <= 1 (all)
|
|
610
|
+
else if (c >= 0 && c <= 1) {
|
|
611
|
+
o[i] = c;
|
|
612
|
+
}
|
|
613
|
+
// else if(c >= 0.0 && c <= 1.0) o[i] = c;
|
|
614
|
+
else if (c >= 0 && c < 256) {
|
|
615
|
+
o[i] = c / 255;
|
|
616
|
+
}
|
|
617
|
+
// ???
|
|
618
|
+
// else if(c >= 0 && c < 256) o[i] = c/255;
|
|
619
|
+
else
|
|
620
|
+
throw new Error("Bad format (" + c + ")");
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return o;
|
|
624
|
+
},
|
|
625
|
+
HSL: function (...args) {
|
|
626
|
+
if (args.length < 3 || args.length > 4) {
|
|
627
|
+
throw new Error("3 or 4 arguments required");
|
|
628
|
+
}
|
|
629
|
+
var h = args[0], s = args[1], l = args[2];
|
|
630
|
+
// if ("string" == typeof h && (h = parseFloat(h)) == NaN) throw new Error("Bad format for hue");
|
|
631
|
+
if ("string" == typeof h && Number.isNaN((h = parseFloat(h)))) {
|
|
632
|
+
throw new Error("Bad format for hue");
|
|
633
|
+
}
|
|
634
|
+
if (h < 0 || h > 360)
|
|
635
|
+
throw new Error("Hue out of range (0..360)");
|
|
636
|
+
else if ((("" + h).indexOf(".") > -1 && h > 1) || ("" + h).indexOf(".") == -1)
|
|
637
|
+
h /= 360;
|
|
638
|
+
if ("string" == typeof s && s.indexOf("%") > -1) {
|
|
639
|
+
// if ((s = parseInt(s)) == NaN) throw new Error("Bad format for saturation");
|
|
640
|
+
if (Number.isNaN((s = parseInt(s)))) {
|
|
641
|
+
throw new Error("Bad format for saturation");
|
|
642
|
+
}
|
|
643
|
+
if (s < 0 || s > 100) {
|
|
644
|
+
throw new Error("Bad format for saturation");
|
|
645
|
+
}
|
|
646
|
+
s /= 100;
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
s = typeof s === "string" ? Number.parseFloat(s) : s;
|
|
650
|
+
if (s < 0 || s > 1) {
|
|
651
|
+
throw new Error("Bad format for saturation");
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if ("string" == typeof l && l.indexOf("%") > -1) {
|
|
655
|
+
// if ((l = parseInt(l)) == NaN) throw new Error("Bad format for lightness");
|
|
656
|
+
if (Number.isNaN((l = parseInt(l)))) {
|
|
657
|
+
throw new Error("Bad format for lightness");
|
|
658
|
+
}
|
|
659
|
+
if (l < 0 || l > 100) {
|
|
660
|
+
throw new Error("Bad format for lightness");
|
|
661
|
+
}
|
|
662
|
+
l /= 100;
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
l = typeof l === "string" ? Number.parseFloat(l) : l;
|
|
666
|
+
if (l < 0 || l > 1) {
|
|
667
|
+
throw new Error("Bad format for lightness");
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
return [h, s, l];
|
|
671
|
+
}
|
|
672
|
+
}; // ENd sanitizer
|
|
673
|
+
Color.Validator = {
|
|
674
|
+
/**
|
|
675
|
+
* Check a hexa color (without #)
|
|
676
|
+
*/
|
|
677
|
+
checkHEX: (value) => {
|
|
678
|
+
if (value.length != 6 && value.length != 3)
|
|
679
|
+
throw new Error("Hexa color: bad length (" + value.length + ")," + value);
|
|
680
|
+
value = value.toLowerCase();
|
|
681
|
+
//for( var i in value ) {
|
|
682
|
+
for (var i = 0; i < value.length; i++) {
|
|
683
|
+
var c = value.charCodeAt(i);
|
|
684
|
+
if (!((c >= 48 && c <= 57) || (c >= 97 && c <= 102)))
|
|
685
|
+
throw new Error(`Hexa color: out of range for "${value}" at position ${i}.`);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
Color.Converter = {
|
|
690
|
+
/**
|
|
691
|
+
* Calculates HSL Color.
|
|
692
|
+
* RGB must be normalized.
|
|
693
|
+
* http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
|
|
694
|
+
*/
|
|
695
|
+
RGBToHSL: (color) => {
|
|
696
|
+
var r = color.r;
|
|
697
|
+
var g = color.g;
|
|
698
|
+
var b = color.b;
|
|
699
|
+
var max = Math.max(r, g, b);
|
|
700
|
+
var min = Math.min(r, g, b);
|
|
701
|
+
color.l = (max + min) / 2;
|
|
702
|
+
if (max == min) {
|
|
703
|
+
color.h = color.s = 0; // achromatic
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
var d = max - min;
|
|
707
|
+
color.s = color.l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
708
|
+
switch (max) {
|
|
709
|
+
case r:
|
|
710
|
+
color.h = (g - b) / d + (g < b ? 6 : 0);
|
|
711
|
+
break;
|
|
712
|
+
case g:
|
|
713
|
+
color.h = (b - r) / d + 2;
|
|
714
|
+
break;
|
|
715
|
+
case b:
|
|
716
|
+
color.h = (r - g) / d + 4;
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
color.h /= 6;
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
/**
|
|
723
|
+
* Calculates RGB color (nomalized).
|
|
724
|
+
* HSL must be normalized.
|
|
725
|
+
*
|
|
726
|
+
* http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
|
|
727
|
+
*/
|
|
728
|
+
HSLToRGB: (color) => {
|
|
729
|
+
var h = color.h;
|
|
730
|
+
var s = color.s;
|
|
731
|
+
var l = color.l;
|
|
732
|
+
if (s == 0) {
|
|
733
|
+
color.r = color.g = color.b = l; // achromatic
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
737
|
+
var p = 2 * l - q;
|
|
738
|
+
color.r = Color.Converter.hue2rgb(p, q, h + 1 / 3);
|
|
739
|
+
color.g = Color.Converter.hue2rgb(p, q, h);
|
|
740
|
+
color.b = Color.Converter.hue2rgb(p, q, h - 1 / 3);
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
hue2rgb: (p, q, t) => {
|
|
744
|
+
if (t < 0)
|
|
745
|
+
t += 1;
|
|
746
|
+
if (t > 1)
|
|
747
|
+
t -= 1;
|
|
748
|
+
if (t < 1 / 6)
|
|
749
|
+
return p + (q - p) * 6 * t;
|
|
750
|
+
if (t < 1 / 2)
|
|
751
|
+
return q;
|
|
752
|
+
if (t < 2 / 3)
|
|
753
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
754
|
+
return p;
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
// Source
|
|
758
|
+
// https://en.wikipedia.org/wiki/Web_colors
|
|
759
|
+
// Pink colors
|
|
760
|
+
Color.MediumVioletRed = Color.makeRGB(199, 21, 133);
|
|
761
|
+
Color.DeepPink = Color.makeRGB(255, 20, 147);
|
|
762
|
+
Color.PaleVioletRed = Color.makeRGB(219, 112, 147);
|
|
763
|
+
Color.HotPink = Color.makeRGB(255, 105, 180);
|
|
764
|
+
Color.LightPink = Color.makeRGB(255, 182, 193);
|
|
765
|
+
Color.Pink = Color.makeRGB(255, 192, 203);
|
|
766
|
+
// Red colors
|
|
767
|
+
Color.DarkRed = Color.makeRGB(139, 0, 0);
|
|
768
|
+
Color.Red = Color.makeRGB(255, 0, 0);
|
|
769
|
+
Color.Firebrick = Color.makeRGB(178, 34, 34);
|
|
770
|
+
Color.Crimson = Color.makeRGB(220, 20, 60);
|
|
771
|
+
Color.IndianRed = Color.makeRGB(205, 92, 92);
|
|
772
|
+
Color.LightCoral = Color.makeRGB(240, 128, 128);
|
|
773
|
+
Color.Salmon = Color.makeRGB(250, 128, 114);
|
|
774
|
+
Color.DarkSalmon = Color.makeRGB(233, 150, 122);
|
|
775
|
+
Color.LightSalmon = Color.makeRGB(255, 160, 122);
|
|
776
|
+
// Orange colors
|
|
777
|
+
Color.OrangeRed = Color.makeRGB(255, 69, 0);
|
|
778
|
+
Color.Tomato = Color.makeRGB(255, 99, 71);
|
|
779
|
+
Color.DarkOrange = Color.makeRGB(255, 140, 0);
|
|
780
|
+
Color.Coral = Color.makeRGB(255, 127, 80);
|
|
781
|
+
Color.Orange = Color.makeRGB(255, 165, 0);
|
|
782
|
+
// Yellow colors
|
|
783
|
+
Color.DarkKhaki = Color.makeRGB(189, 183, 107);
|
|
784
|
+
Color.Gold = Color.makeRGB(255, 215, 0);
|
|
785
|
+
Color.Khaki = Color.makeRGB(240, 230, 140);
|
|
786
|
+
Color.PeachPuff = Color.makeRGB(255, 218, 185);
|
|
787
|
+
Color.Yellow = Color.makeRGB(255, 255, 0);
|
|
788
|
+
Color.PaleGoldenrod = Color.makeRGB(238, 232, 170);
|
|
789
|
+
Color.Moccasin = Color.makeRGB(255, 228, 181);
|
|
790
|
+
Color.PapayaWhip = Color.makeRGB(255, 239, 213);
|
|
791
|
+
Color.LightGoldenrodYellow = Color.makeRGB(250, 250, 210);
|
|
792
|
+
Color.LemonChiffon = Color.makeRGB(255, 250, 205);
|
|
793
|
+
Color.LightYellow = Color.makeRGB(255, 255, 224);
|
|
794
|
+
// Brown colors
|
|
795
|
+
Color.Maroon = Color.makeRGB(128, 0, 0);
|
|
796
|
+
Color.Brown = Color.makeRGB(165, 42, 42);
|
|
797
|
+
Color.SaddleBrown = Color.makeRGB(139, 69, 19);
|
|
798
|
+
Color.Sienna = Color.makeRGB(160, 82, 45);
|
|
799
|
+
Color.Chocolate = Color.makeRGB(210, 105, 30);
|
|
800
|
+
Color.DarkGoldenrod = Color.makeRGB(184, 134, 11);
|
|
801
|
+
Color.Peru = Color.makeRGB(205, 133, 63);
|
|
802
|
+
Color.RosyBrown = Color.makeRGB(188, 143, 143);
|
|
803
|
+
Color.Goldenrod = Color.makeRGB(218, 165, 32);
|
|
804
|
+
Color.SandyBrown = Color.makeRGB(244, 164, 96);
|
|
805
|
+
Color.Tan = Color.makeRGB(210, 180, 140);
|
|
806
|
+
Color.Burlywood = Color.makeRGB(222, 184, 135);
|
|
807
|
+
Color.Wheat = Color.makeRGB(245, 222, 179);
|
|
808
|
+
Color.NavajoWhite = Color.makeRGB(255, 222, 173);
|
|
809
|
+
Color.Bisque = Color.makeRGB(255, 228, 196);
|
|
810
|
+
Color.BlanchedAlmond = Color.makeRGB(255, 235, 205);
|
|
811
|
+
Color.Cornsilk = Color.makeRGB(255, 248, 220);
|
|
812
|
+
// Purple, violet, and magenta colors
|
|
813
|
+
Color.Indigo = Color.makeRGB(75, 0, 130);
|
|
814
|
+
Color.Purple = Color.makeRGB(128, 0, 128);
|
|
815
|
+
Color.DarkMagenta = Color.makeRGB(139, 0, 139);
|
|
816
|
+
Color.DarkViolet = Color.makeRGB(148, 0, 211);
|
|
817
|
+
Color.DarkSlateBlue = Color.makeRGB(72, 61, 139);
|
|
818
|
+
Color.BlueViolet = Color.makeRGB(138, 43, 226);
|
|
819
|
+
Color.DarkOrchid = Color.makeRGB(153, 50, 204);
|
|
820
|
+
Color.Fuchsia = Color.makeRGB(255, 0, 255);
|
|
821
|
+
Color.Magenta = Color.makeRGB(255, 0, 255);
|
|
822
|
+
Color.SlateBlue = Color.makeRGB(106, 90, 205);
|
|
823
|
+
Color.MediumSlateBlue = Color.makeRGB(123, 104, 238);
|
|
824
|
+
Color.MediumOrchid = Color.makeRGB(186, 85, 211);
|
|
825
|
+
Color.MediumPurple = Color.makeRGB(147, 112, 219);
|
|
826
|
+
Color.Orchid = Color.makeRGB(218, 112, 214);
|
|
827
|
+
Color.Violet = Color.makeRGB(238, 130, 238);
|
|
828
|
+
Color.Plum = Color.makeRGB(221, 160, 221);
|
|
829
|
+
Color.Thistle = Color.makeRGB(216, 191, 216);
|
|
830
|
+
Color.Lavender = Color.makeRGB(230, 230, 250);
|
|
831
|
+
// Blue colors
|
|
832
|
+
Color.MidnightBlue = Color.makeRGB(25, 25, 112);
|
|
833
|
+
Color.Navy = Color.makeRGB(0, 0, 128);
|
|
834
|
+
Color.DarkBlue = Color.makeRGB(0, 0, 139);
|
|
835
|
+
Color.MediumBlue = Color.makeRGB(0, 0, 205);
|
|
836
|
+
Color.Blue = Color.makeRGB(0, 0, 255);
|
|
837
|
+
Color.RoyalBlue = Color.makeRGB(65, 105, 225);
|
|
838
|
+
Color.SteelBlue = Color.makeRGB(70, 130, 180);
|
|
839
|
+
Color.DodgerBlue = Color.makeRGB(30, 144, 255);
|
|
840
|
+
Color.DeepSkyBlue = Color.makeRGB(0, 191, 255);
|
|
841
|
+
Color.CornflowerBlue = Color.makeRGB(100, 149, 237);
|
|
842
|
+
Color.SkyBlue = Color.makeRGB(135, 206, 235);
|
|
843
|
+
Color.LightSkyBlue = Color.makeRGB(135, 206, 250);
|
|
844
|
+
Color.LightSteelBlue = Color.makeRGB(176, 196, 222);
|
|
845
|
+
Color.LightBlue = Color.makeRGB(173, 216, 230);
|
|
846
|
+
Color.PowderBlue = Color.makeRGB(176, 224, 230);
|
|
847
|
+
// Cyan colors
|
|
848
|
+
Color.Teal = Color.makeRGB(0, 128, 128);
|
|
849
|
+
Color.DarkCyan = Color.makeRGB(0, 139, 139);
|
|
850
|
+
Color.LightSeaGreen = Color.makeRGB(32, 178, 170);
|
|
851
|
+
Color.CadetBlue = Color.makeRGB(95, 158, 160);
|
|
852
|
+
Color.DarkTurquoise = Color.makeRGB(0, 206, 209);
|
|
853
|
+
Color.MediumTurquoise = Color.makeRGB(72, 209, 204);
|
|
854
|
+
Color.Turquoise = Color.makeRGB(64, 224, 208);
|
|
855
|
+
Color.Aqua = Color.makeRGB(0, 255, 255);
|
|
856
|
+
Color.Cyan = Color.makeRGB(0, 255, 255);
|
|
857
|
+
Color.Aquamarine = Color.makeRGB(127, 255, 212);
|
|
858
|
+
Color.PaleTurquoise = Color.makeRGB(175, 238, 238);
|
|
859
|
+
Color.LightCyan = Color.makeRGB(224, 255, 255);
|
|
860
|
+
// Green colors
|
|
861
|
+
Color.DarkGreen = Color.makeRGB(0, 100, 0);
|
|
862
|
+
Color.Green = Color.makeRGB(0, 128, 0);
|
|
863
|
+
Color.DarkOliveGreen = Color.makeRGB(85, 107, 47);
|
|
864
|
+
Color.ForestGreen = Color.makeRGB(34, 139, 34);
|
|
865
|
+
Color.SeaGreen = Color.makeRGB(46, 139, 87);
|
|
866
|
+
Color.Olive = Color.makeRGB(128, 128, 0);
|
|
867
|
+
Color.OliveDrab = Color.makeRGB(107, 142, 35);
|
|
868
|
+
Color.MediumSeaGreen = Color.makeRGB(60, 179, 113);
|
|
869
|
+
Color.LimeGreen = Color.makeRGB(50, 205, 50);
|
|
870
|
+
Color.Lime = Color.makeRGB(0, 255, 0);
|
|
871
|
+
Color.SpringGreen = Color.makeRGB(0, 255, 127);
|
|
872
|
+
Color.MediumSpringGreen = Color.makeRGB(0, 250, 154);
|
|
873
|
+
Color.DarkSeaGreen = Color.makeRGB(143, 188, 143);
|
|
874
|
+
Color.MediumAquamarine = Color.makeRGB(102, 205, 170);
|
|
875
|
+
Color.YellowGreen = Color.makeRGB(154, 205, 50);
|
|
876
|
+
Color.LawnGreen = Color.makeRGB(124, 252, 0);
|
|
877
|
+
Color.Chartreuse = Color.makeRGB(127, 255, 0);
|
|
878
|
+
Color.LightGreen = Color.makeRGB(144, 238, 144);
|
|
879
|
+
Color.GreenYellow = Color.makeRGB(173, 255, 47);
|
|
880
|
+
Color.PaleGreen = Color.makeRGB(152, 251, 152);
|
|
881
|
+
// White colors
|
|
882
|
+
Color.MistyRose = Color.makeRGB(255, 228, 225);
|
|
883
|
+
Color.AntiqueWhite = Color.makeRGB(250, 235, 215);
|
|
884
|
+
Color.Linen = Color.makeRGB(250, 240, 230);
|
|
885
|
+
Color.Beige = Color.makeRGB(245, 245, 220);
|
|
886
|
+
Color.WhiteSmoke = Color.makeRGB(245, 245, 245);
|
|
887
|
+
Color.LavenderBlush = Color.makeRGB(255, 240, 245);
|
|
888
|
+
Color.OldLace = Color.makeRGB(253, 245, 230);
|
|
889
|
+
Color.AliceBlue = Color.makeRGB(240, 248, 255);
|
|
890
|
+
Color.Seashell = Color.makeRGB(255, 245, 238);
|
|
891
|
+
Color.GhostWhite = Color.makeRGB(248, 248, 255);
|
|
892
|
+
Color.Honeydew = Color.makeRGB(240, 255, 240);
|
|
893
|
+
Color.FloralWhite = Color.makeRGB(255, 250, 240);
|
|
894
|
+
Color.Azure = Color.makeRGB(240, 255, 255);
|
|
895
|
+
Color.MintCream = Color.makeRGB(245, 255, 250);
|
|
896
|
+
Color.Snow = Color.makeRGB(255, 250, 250);
|
|
897
|
+
Color.Ivory = Color.makeRGB(255, 255, 240);
|
|
898
|
+
Color.White = Color.makeRGB(255, 255, 255);
|
|
899
|
+
// Gray and black colors
|
|
900
|
+
Color.Black = Color.makeRGB(0, 0, 0);
|
|
901
|
+
Color.DarkSlateGray = Color.makeRGB(47, 79, 79);
|
|
902
|
+
Color.DimGray = Color.makeRGB(105, 105, 105);
|
|
903
|
+
Color.SlateGray = Color.makeRGB(112, 128, 144);
|
|
904
|
+
Color.Gray = Color.makeRGB(128, 128, 128);
|
|
905
|
+
Color.LightSlateGray = Color.makeRGB(119, 136, 153);
|
|
906
|
+
Color.DarkGray = Color.makeRGB(169, 169, 169);
|
|
907
|
+
Color.Silver = Color.makeRGB(192, 192, 192);
|
|
908
|
+
Color.LightGray = Color.makeRGB(211, 211, 211);
|
|
909
|
+
Color.Gainsboro = Color.makeRGB(220, 220, 220);
|
|
910
|
+
Color.CSS_COLORS = {
|
|
911
|
+
// Pink Color.XYZ,lors
|
|
912
|
+
MediumVioletRed: Color.MediumVioletRed,
|
|
913
|
+
DeepPink: Color.DeepPink,
|
|
914
|
+
PaleVioletRed: Color.PaleVioletRed,
|
|
915
|
+
HotPink: Color.HotPink,
|
|
916
|
+
LightPink: Color.LightPink,
|
|
917
|
+
Pink: Color.Pink,
|
|
918
|
+
// Red Color.XYZ,lors
|
|
919
|
+
DarkRed: Color.DarkRed,
|
|
920
|
+
Red: Color.Red,
|
|
921
|
+
Firebrick: Color.Firebrick,
|
|
922
|
+
Crimson: Color.Crimson,
|
|
923
|
+
IndianRed: Color.IndianRed,
|
|
924
|
+
LightCoral: Color.LightCoral,
|
|
925
|
+
Salmon: Color.Salmon,
|
|
926
|
+
DarkSalmon: Color.DarkSalmon,
|
|
927
|
+
LightSalmon: Color.LightSalmon,
|
|
928
|
+
// Orange Color.XYZ,lors
|
|
929
|
+
OrangeRed: Color.OrangeRed,
|
|
930
|
+
Tomato: Color.Tomato,
|
|
931
|
+
DarkOrange: Color.DarkOrange,
|
|
932
|
+
Coral: Color.Coral,
|
|
933
|
+
Orange: Color.Orange,
|
|
934
|
+
// Yellow Color.XYZ,lors
|
|
935
|
+
DarkKhaki: Color.DarkKhaki,
|
|
936
|
+
Gold: Color.Gold,
|
|
937
|
+
Khaki: Color.Khaki,
|
|
938
|
+
PeachPuff: Color.PeachPuff,
|
|
939
|
+
Yellow: Color.Yellow,
|
|
940
|
+
PaleGoldenrod: Color.PaleGoldenrod,
|
|
941
|
+
Moccasin: Color.Moccasin,
|
|
942
|
+
PapayaWhip: Color.PapayaWhip,
|
|
943
|
+
LightGoldenrodYellow: Color.LightGoldenrodYellow,
|
|
944
|
+
LemonChiffon: Color.LemonChiffon,
|
|
945
|
+
LightYellow: Color.LightYellow,
|
|
946
|
+
// Brown Color.XYZ,lors
|
|
947
|
+
Maroon: Color.Maroon,
|
|
948
|
+
Brown: Color.Brown,
|
|
949
|
+
SaddleBrown: Color.SaddleBrown,
|
|
950
|
+
Sienna: Color.Sienna,
|
|
951
|
+
Chocolate: Color.Chocolate,
|
|
952
|
+
DarkGoldenrod: Color.DarkGoldenrod,
|
|
953
|
+
Peru: Color.Peru,
|
|
954
|
+
RosyBrown: Color.RosyBrown,
|
|
955
|
+
Goldenrod: Color.Goldenrod,
|
|
956
|
+
SandyBrown: Color.SandyBrown,
|
|
957
|
+
Tan: Color.Tan,
|
|
958
|
+
Burlywood: Color.Burlywood,
|
|
959
|
+
Wheat: Color.Wheat,
|
|
960
|
+
NavajoWhite: Color.NavajoWhite,
|
|
961
|
+
Bisque: Color.Bisque,
|
|
962
|
+
BlanchedAlmond: Color.BlanchedAlmond,
|
|
963
|
+
Cornsilk: Color.Cornsilk,
|
|
964
|
+
// Purple, violet, and magenta Color.XYZ,lors
|
|
965
|
+
Indigo: Color.Indigo,
|
|
966
|
+
Purple: Color.Purple,
|
|
967
|
+
DarkMagenta: Color.DarkMagenta,
|
|
968
|
+
DarkViolet: Color.DarkViolet,
|
|
969
|
+
DarkSlateBlue: Color.DarkSlateBlue,
|
|
970
|
+
BlueViolet: Color.BlueViolet,
|
|
971
|
+
DarkOrchid: Color.DarkOrchid,
|
|
972
|
+
Fuchsia: Color.Fuchsia,
|
|
973
|
+
Magenta: Color.Magenta,
|
|
974
|
+
SlateBlue: Color.SlateBlue,
|
|
975
|
+
MediumSlateBlue: Color.MediumSlateBlue,
|
|
976
|
+
MediumOrchid: Color.MediumOrchid,
|
|
977
|
+
MediumPurple: Color.MediumPurple,
|
|
978
|
+
Orchid: Color.Orchid,
|
|
979
|
+
Violet: Color.Violet,
|
|
980
|
+
Plum: Color.Plum,
|
|
981
|
+
Thistle: Color.Thistle,
|
|
982
|
+
Lavender: Color.Lavender,
|
|
983
|
+
// Blue Colors
|
|
984
|
+
MidnightBlue: Color.MidnightBlue,
|
|
985
|
+
Navy: Color.Navy,
|
|
986
|
+
DarkBlue: Color.DarkBlue,
|
|
987
|
+
MediumBlue: Color.MediumBlue,
|
|
988
|
+
Blue: Color.Blue,
|
|
989
|
+
RoyalBlue: Color.RoyalBlue,
|
|
990
|
+
SteelBlue: Color.SteelBlue,
|
|
991
|
+
DodgerBlue: Color.DodgerBlue,
|
|
992
|
+
DeepSkyBlue: Color.DeepSkyBlue,
|
|
993
|
+
CornflowerBlue: Color.CornflowerBlue,
|
|
994
|
+
SkyBlue: Color.SkyBlue,
|
|
995
|
+
LightSkyBlue: Color.LightSkyBlue,
|
|
996
|
+
LightSteelBlue: Color.LightSteelBlue,
|
|
997
|
+
LightBlue: Color.LightBlue,
|
|
998
|
+
PowderBlue: Color.PowderBlue,
|
|
999
|
+
// Coyan Colors
|
|
1000
|
+
Teal: Color.Teal,
|
|
1001
|
+
DarkCyan: Color.DarkCyan,
|
|
1002
|
+
LightSeaGreen: Color.LightSeaGreen,
|
|
1003
|
+
CadetBlue: Color.CadetBlue,
|
|
1004
|
+
DarkTurquoise: Color.DarkTurquoise,
|
|
1005
|
+
MediumTurquoise: Color.MediumTurquoise,
|
|
1006
|
+
Turquoise: Color.Turquoise,
|
|
1007
|
+
Aqua: Color.Aqua,
|
|
1008
|
+
Cyan: Color.Cyan,
|
|
1009
|
+
Aquamarine: Color.Aquamarine,
|
|
1010
|
+
PaleTurquoise: Color.PaleTurquoise,
|
|
1011
|
+
LightCyan: Color.LightCyan,
|
|
1012
|
+
// Green Colors
|
|
1013
|
+
DarkGreen: Color.DarkGreen,
|
|
1014
|
+
Green: Color.Green,
|
|
1015
|
+
DarkOliveGreen: Color.DarkOliveGreen,
|
|
1016
|
+
ForestGreen: Color.ForestGreen,
|
|
1017
|
+
SeaGreen: Color.SeaGreen,
|
|
1018
|
+
Olive: Color.Olive,
|
|
1019
|
+
OliveDrab: Color.OliveDrab,
|
|
1020
|
+
MediumSeaGreen: Color.MediumSeaGreen,
|
|
1021
|
+
LimeGreen: Color.LimeGreen,
|
|
1022
|
+
Lime: Color.Lime,
|
|
1023
|
+
SpringGreen: Color.SpringGreen,
|
|
1024
|
+
MediumSpringGreen: Color.MediumSpringGreen,
|
|
1025
|
+
DarkSeaGreen: Color.DarkSeaGreen,
|
|
1026
|
+
MediumAquamarine: Color.MediumAquamarine,
|
|
1027
|
+
YellowGreen: Color.YellowGreen,
|
|
1028
|
+
LawnGreen: Color.LawnGreen,
|
|
1029
|
+
Chartreuse: Color.Chartreuse,
|
|
1030
|
+
LightGreen: Color.LightGreen,
|
|
1031
|
+
GreenYellow: Color.GreenYellow,
|
|
1032
|
+
PaleGreen: Color.PaleGreen,
|
|
1033
|
+
// White Color.XYZ,lors
|
|
1034
|
+
MistyRose: Color.MistyRose,
|
|
1035
|
+
AntiqueWhite: Color.AntiqueWhite,
|
|
1036
|
+
Linen: Color.Linen,
|
|
1037
|
+
Beige: Color.Beige,
|
|
1038
|
+
WhiteSmoke: Color.WhiteSmoke,
|
|
1039
|
+
LavenderBlush: Color.LavenderBlush,
|
|
1040
|
+
OldLace: Color.OldLace,
|
|
1041
|
+
AliceBlue: Color.AliceBlue,
|
|
1042
|
+
Seashell: Color.Seashell,
|
|
1043
|
+
GhostWhite: Color.GhostWhite,
|
|
1044
|
+
Honeydew: Color.Honeydew,
|
|
1045
|
+
FloralWhite: Color.FloralWhite,
|
|
1046
|
+
Azure: Color.Azure,
|
|
1047
|
+
MintCream: Color.MintCream,
|
|
1048
|
+
Snow: Color.Snow,
|
|
1049
|
+
Ivory: Color.Ivory,
|
|
1050
|
+
White: Color.White,
|
|
1051
|
+
// Gray and black Color.XYZ,lors
|
|
1052
|
+
Black: Color.Black,
|
|
1053
|
+
DarkSlateGray: Color.DarkSlateGray,
|
|
1054
|
+
DimGray: Color.DimGray,
|
|
1055
|
+
SlateGray: Color.SlateGray,
|
|
1056
|
+
Gray: Color.Gray,
|
|
1057
|
+
LightSlateGray: Color.LightSlateGray,
|
|
1058
|
+
DarkGray: Color.DarkGray,
|
|
1059
|
+
Silver: Color.Silver,
|
|
1060
|
+
LightGray: Color.LightGray,
|
|
1061
|
+
Gainsboro: Color.Gainsboro
|
|
1062
|
+
};
|
|
1063
|
+
//# sourceMappingURL=Color.js.map
|