plotboilerplate 1.25.0 → 1.26.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/README.md +1 -0
- package/dist/index.esm.js +139 -33
- 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 +139 -33
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +1 -1
- package/src/cjs/Bounds.d.ts +79 -25
- package/src/cjs/Bounds.js +102 -29
- package/src/cjs/Bounds.js.map +1 -1
- package/src/cjs/CircleSector.d.ts +3 -0
- package/src/cjs/CircleSector.js +28 -1
- package/src/cjs/CircleSector.js.map +1 -1
- package/src/cjs/drawutilssvg.d.ts +2 -1
- package/src/cjs/drawutilssvg.js +9 -3
- package/src/cjs/drawutilssvg.js.map +1 -1
- 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/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/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/datastructures/DataGrid2d.d.ts +6 -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 +1 -7
- package/src/cjs/utils/datastructures/DataGrid2dListAdapter.js +3 -3
- package/src/cjs/utils/datastructures/DataGrid2dListAdapter.js.map +1 -1
- 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/detectDarkMode.js +16 -7
- package/src/cjs/utils/detectDarkMode.js.map +1 -1
- package/src/cjs/utils/dom/components/ColorGradientPicker.d.ts +4 -3
- package/src/cjs/utils/dom/components/ColorGradientPicker.js +8 -8
- package/src/cjs/utils/dom/components/ColorGradientPicker.js.map +1 -1
- package/src/cjs/utils/dom/components/ColorGradientSelector.d.ts +1 -0
- package/src/cjs/utils/dom/components/ColorGradientSelector.js +4 -2
- package/src/cjs/utils/dom/components/ColorGradientSelector.js.map +1 -1
- package/src/cjs/utils/parsers/svg/types.d.ts +8 -8
- package/src/esm/Bounds.d.ts +79 -25
- package/src/esm/Bounds.js +102 -29
- package/src/esm/Bounds.js.map +1 -1
- package/src/esm/CircleSector.d.ts +3 -0
- package/src/esm/CircleSector.js +28 -1
- package/src/esm/CircleSector.js.map +1 -1
- package/src/esm/drawutilssvg.d.ts +2 -1
- package/src/esm/drawutilssvg.js +9 -3
- package/src/esm/drawutilssvg.js.map +1 -1
- package/src/esm/utils/LissajousFigure.d.ts +34 -0
- package/src/esm/utils/LissajousFigure.js +95 -0
- package/src/esm/utils/LissajousFigure.js.map +1 -0
- package/src/esm/utils/PerlinNoise.d.ts +19 -0
- package/src/esm/utils/PerlinNoise.js +346 -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 +42 -0
- package/src/esm/utils/SVGPathUtils.js.map +1 -0
- package/src/esm/utils/algorithms/pixelCornersToRoundPaths.d.ts +23 -0
- package/src/esm/utils/algorithms/pixelCornersToRoundPaths.js +266 -0
- package/src/esm/utils/algorithms/pixelCornersToRoundPaths.js.map +1 -0
- package/src/esm/utils/datastructures/DataGrid2d.d.ts +6 -0
- package/src/esm/utils/datastructures/DataGrid2dArrayMatrix.d.ts +88 -0
- package/src/esm/utils/datastructures/DataGrid2dArrayMatrix.js +150 -0
- package/src/esm/utils/datastructures/DataGrid2dArrayMatrix.js.map +1 -0
- package/src/esm/utils/datastructures/DataGrid2dListAdapter.d.ts +1 -7
- package/src/esm/utils/datastructures/DataGrid2dListAdapter.js +3 -3
- package/src/esm/utils/datastructures/DataGrid2dListAdapter.js.map +1 -1
- package/src/esm/utils/datastructures/GeometryMesh.d.ts +49 -0
- package/src/esm/utils/datastructures/GeometryMesh.js +53 -0
- package/src/esm/utils/datastructures/GeometryMesh.js.map +1 -0
- package/src/esm/utils/detectDarkMode.js +16 -7
- package/src/esm/utils/detectDarkMode.js.map +1 -1
- package/src/esm/utils/dom/components/ColorGradientPicker.d.ts +4 -3
- package/src/esm/utils/dom/components/ColorGradientPicker.js +18 -7
- package/src/esm/utils/dom/components/ColorGradientPicker.js.map +1 -1
- package/src/esm/utils/dom/components/ColorGradientSelector.d.ts +1 -0
- package/src/esm/utils/dom/components/ColorGradientSelector.js +9 -2
- package/src/esm/utils/dom/components/ColorGradientSelector.js.map +1 -1
- package/src/esm/utils/parsers/svg/types.d.ts +8 -8
- package/src/ts/Bounds.ts +107 -22
- package/src/ts/CircleSector.ts +39 -6
- package/src/ts/drawutilssvg.ts +8 -3
- package/src/ts/utils/LissajousFigure.ts +110 -0
- package/src/ts/utils/PerlinNoise.ts +368 -0
- package/src/ts/utils/SVGPathUtils.ts +55 -0
- package/src/ts/utils/algorithms/pixelCornersToRoundPaths.ts +379 -0
- package/src/ts/utils/datastructures/DataGrid2d.ts +7 -0
- package/src/ts/utils/datastructures/DataGrid2dArrayMatrix.ts +182 -0
- package/src/ts/utils/datastructures/DataGrid2dListAdapter.ts +4 -11
- package/src/ts/utils/datastructures/GeometryMesh.ts +79 -0
- package/src/ts/utils/detectDarkMode.ts +17 -8
- package/src/ts/utils/dom/components/ColorGradientPicker.tsx +18 -6
- package/src/ts/utils/dom/components/ColorGradientSelector.tsx +9 -2
- package/src/ts/utils/parsers/svg/types.ts +8 -8
package/package.json
CHANGED
package/src/cjs/Bounds.d.ts
CHANGED
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
* @modified 2025-04-18 Change parameter type in `Bounds.computeFromVertices` from `Vertex` to more general `XYCoords`.
|
|
14
14
|
* @modified 2025-04-19 Added methods to `Bounds` class: `getNorthPoint`, `getSouthPoint`, `getEastPoint` and `getWestPoint`.
|
|
15
15
|
* @modified 2025-04-26 Added static method `Bounds.computeFromBoundsSet` to calculate containing bounds for a set of bounding boxes.
|
|
16
|
-
* @
|
|
16
|
+
* @modified 2025-10-17 Added the methods `Bounds.getSouthWestPoint`, `getNorthWestPoint`, `getNorthEastPoint` and `getSouthEastPoint`.
|
|
17
|
+
* @modified 2025-10-18 Added method `Bounds.containsVert(XYCoords)`.
|
|
18
|
+
* @modified 2025-10-28 Added the `Bounds.getWidth()` and `Bounds.getHeight()`.
|
|
19
|
+
* @modified 2025-11-12 Added the `Bounds.getMoved()` method.
|
|
20
|
+
* @version 1.11.0
|
|
17
21
|
**/
|
|
18
22
|
import { Polygon } from "./Polygon";
|
|
19
23
|
import { XYCoords, IBounds, XYDimension } from "./interfaces";
|
|
@@ -63,6 +67,20 @@ export declare class Bounds implements IBounds, XYDimension {
|
|
|
63
67
|
* @param {XYCoords} max - The max values (x,y) as a XYCoords tuple.
|
|
64
68
|
**/
|
|
65
69
|
constructor(min: XYCoords, max: XYCoords);
|
|
70
|
+
/**
|
|
71
|
+
* Check if the given vertex is inside this bounds.
|
|
72
|
+
*
|
|
73
|
+
* @method containsVert
|
|
74
|
+
* @param {XYCoords} vert - The vertex to check.
|
|
75
|
+
* @return {boolean} True if the passed vertex is inside this bounds.
|
|
76
|
+
* @instance
|
|
77
|
+
* @memberof Bounds
|
|
78
|
+
**/
|
|
79
|
+
containsVert(vert: XYCoords): boolean;
|
|
80
|
+
getWidth(): number;
|
|
81
|
+
getHeight(): number;
|
|
82
|
+
getScaled(scaleFactor: number): Bounds;
|
|
83
|
+
getMoved(moveAmount: XYCoords): Bounds;
|
|
66
84
|
/**
|
|
67
85
|
* Get the center point of the north bound.
|
|
68
86
|
*
|
|
@@ -82,23 +100,59 @@ export declare class Bounds implements IBounds, XYDimension {
|
|
|
82
100
|
*/
|
|
83
101
|
getSouthPoint(): Vertex;
|
|
84
102
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
* Get the center point of the west bound.
|
|
104
|
+
*
|
|
105
|
+
* @method getWestPoint
|
|
106
|
+
* @instance
|
|
107
|
+
* @memberof Bounds
|
|
108
|
+
* @return {Vertex} The "westhmost" centered point of this bounding box.
|
|
109
|
+
*/
|
|
92
110
|
getWestPoint(): Vertex;
|
|
93
111
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
* Get the center point of the east bound.
|
|
113
|
+
*
|
|
114
|
+
* @method getEastPoint
|
|
115
|
+
* @instance
|
|
116
|
+
* @memberof Bounds
|
|
117
|
+
* @return {Vertex} The "easthmost" centered point of this bounding box.
|
|
118
|
+
*/
|
|
101
119
|
getEastPoint(): Vertex;
|
|
120
|
+
/**
|
|
121
|
+
* Get the upper left corner point these bounds box.
|
|
122
|
+
*
|
|
123
|
+
* @method getNorthWestPoint
|
|
124
|
+
* @instance
|
|
125
|
+
* @memberof Bounds
|
|
126
|
+
* @return {Vertex} The "northwestmost" point of this bounding box.
|
|
127
|
+
*/
|
|
128
|
+
getNorthWestPoint(): Vertex;
|
|
129
|
+
/**
|
|
130
|
+
* Get the upper right corner point these bounds box.
|
|
131
|
+
*
|
|
132
|
+
* @method getNorthEastPoint
|
|
133
|
+
* @instance
|
|
134
|
+
* @memberof Bounds
|
|
135
|
+
* @return {Vertex} The "northeastmost" point of this bounding box.
|
|
136
|
+
*/
|
|
137
|
+
getNorthEastPoint(): Vertex;
|
|
138
|
+
/**
|
|
139
|
+
* Get the lower right corner point these bounds box.
|
|
140
|
+
*
|
|
141
|
+
* @method getSouthEastPoint
|
|
142
|
+
* @instance
|
|
143
|
+
* @memberof Bounds
|
|
144
|
+
* @return {Vertex} The "southeastmost" point of this bounding box.
|
|
145
|
+
*/
|
|
146
|
+
getSouthEastPoint(): Vertex;
|
|
147
|
+
/**
|
|
148
|
+
* Get the lower left corner point these bounds box.
|
|
149
|
+
*
|
|
150
|
+
* @method getSouthWestPoint
|
|
151
|
+
* @instance
|
|
152
|
+
* @memberof Bounds
|
|
153
|
+
* @return {Vertex} The "southwestmost" point of this bounding box.
|
|
154
|
+
*/
|
|
155
|
+
getSouthWestPoint(): Vertex;
|
|
102
156
|
/**
|
|
103
157
|
* Convert this rectangular bounding box to a polygon with four vertices.
|
|
104
158
|
*
|
|
@@ -175,16 +229,16 @@ export declare class Bounds implements IBounds, XYDimension {
|
|
|
175
229
|
**/
|
|
176
230
|
static computeFromVertices(vertices: Array<XYCoords>): Bounds;
|
|
177
231
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
232
|
+
* Compute the minimal bounding box for a given set of existing bounding boxes.
|
|
233
|
+
*
|
|
234
|
+
* An empty vertex array will return an empty bounding box located at (0,0).
|
|
235
|
+
*
|
|
236
|
+
* @static
|
|
237
|
+
* @method computeFromBoundsSet
|
|
238
|
+
* @memberof Bounds
|
|
239
|
+
* @param {Array<IBounds>} boundingBoxes - The set of existing bounding boxes to get the containing bounding box for.
|
|
240
|
+
* @return The minimal Bounds for the given bounds instances.
|
|
241
|
+
**/
|
|
188
242
|
static computeFromBoundsSet(boundingBoxes: Array<IBounds>): Bounds;
|
|
189
243
|
/**
|
|
190
244
|
* Create a new `Bounds` instance just from `width` and `height`, located at (0,0) or the optionally given origin.
|
package/src/cjs/Bounds.js
CHANGED
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* @modified 2025-04-18 Change parameter type in `Bounds.computeFromVertices` from `Vertex` to more general `XYCoords`.
|
|
15
15
|
* @modified 2025-04-19 Added methods to `Bounds` class: `getNorthPoint`, `getSouthPoint`, `getEastPoint` and `getWestPoint`.
|
|
16
16
|
* @modified 2025-04-26 Added static method `Bounds.computeFromBoundsSet` to calculate containing bounds for a set of bounding boxes.
|
|
17
|
-
* @
|
|
17
|
+
* @modified 2025-10-17 Added the methods `Bounds.getSouthWestPoint`, `getNorthWestPoint`, `getNorthEastPoint` and `getSouthEastPoint`.
|
|
18
|
+
* @modified 2025-10-18 Added method `Bounds.containsVert(XYCoords)`.
|
|
19
|
+
* @modified 2025-10-28 Added the `Bounds.getWidth()` and `Bounds.getHeight()`.
|
|
20
|
+
* @modified 2025-11-12 Added the `Bounds.getMoved()` method.
|
|
21
|
+
* @version 1.11.0
|
|
18
22
|
**/
|
|
19
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
24
|
exports.Bounds = void 0;
|
|
@@ -42,6 +46,35 @@ var Bounds = /** @class */ (function () {
|
|
|
42
46
|
this.width = max.x - min.x;
|
|
43
47
|
this.height = max.y - min.y;
|
|
44
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if the given vertex is inside this bounds.
|
|
51
|
+
*
|
|
52
|
+
* @method containsVert
|
|
53
|
+
* @param {XYCoords} vert - The vertex to check.
|
|
54
|
+
* @return {boolean} True if the passed vertex is inside this bounds.
|
|
55
|
+
* @instance
|
|
56
|
+
* @memberof Bounds
|
|
57
|
+
**/
|
|
58
|
+
Bounds.prototype.containsVert = function (vert) {
|
|
59
|
+
return this.min.x <= vert.x && vert.x < this.max.x && this.min.y <= vert.y && vert.y < this.max.y;
|
|
60
|
+
};
|
|
61
|
+
Bounds.prototype.getWidth = function () {
|
|
62
|
+
return this.max.x - this.min.x;
|
|
63
|
+
};
|
|
64
|
+
Bounds.prototype.getHeight = function () {
|
|
65
|
+
return this.max.y - this.min.y;
|
|
66
|
+
};
|
|
67
|
+
Bounds.prototype.getScaled = function (scaleFactor) {
|
|
68
|
+
var center = this.getCenter();
|
|
69
|
+
var newMin = new Vertex_1.Vertex(this.min).scale(scaleFactor, center);
|
|
70
|
+
var newMax = new Vertex_1.Vertex(this.max).scale(scaleFactor, center);
|
|
71
|
+
return new Bounds(newMin, newMax);
|
|
72
|
+
};
|
|
73
|
+
Bounds.prototype.getMoved = function (moveAmount) {
|
|
74
|
+
var newMin = new Vertex_1.Vertex(this.min).move(moveAmount);
|
|
75
|
+
var newMax = new Vertex_1.Vertex(this.max).move(moveAmount);
|
|
76
|
+
return new Bounds(newMin, newMax);
|
|
77
|
+
};
|
|
45
78
|
/**
|
|
46
79
|
* Get the center point of the north bound.
|
|
47
80
|
*
|
|
@@ -53,7 +86,6 @@ var Bounds = /** @class */ (function () {
|
|
|
53
86
|
Bounds.prototype.getNorthPoint = function () {
|
|
54
87
|
return new Vertex_1.Vertex(this.min.x + this.width / 2.0, this.min.y);
|
|
55
88
|
};
|
|
56
|
-
;
|
|
57
89
|
/**
|
|
58
90
|
* Get the center point of the south bound.
|
|
59
91
|
*
|
|
@@ -65,31 +97,72 @@ var Bounds = /** @class */ (function () {
|
|
|
65
97
|
Bounds.prototype.getSouthPoint = function () {
|
|
66
98
|
return new Vertex_1.Vertex(this.min.x + this.width / 2.0, this.max.y);
|
|
67
99
|
};
|
|
68
|
-
;
|
|
69
100
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
101
|
+
* Get the center point of the west bound.
|
|
102
|
+
*
|
|
103
|
+
* @method getWestPoint
|
|
104
|
+
* @instance
|
|
105
|
+
* @memberof Bounds
|
|
106
|
+
* @return {Vertex} The "westhmost" centered point of this bounding box.
|
|
107
|
+
*/
|
|
77
108
|
Bounds.prototype.getWestPoint = function () {
|
|
78
109
|
return new Vertex_1.Vertex(this.min.x, this.min.y + this.height / 2.0);
|
|
79
110
|
};
|
|
80
|
-
;
|
|
81
111
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
112
|
+
* Get the center point of the east bound.
|
|
113
|
+
*
|
|
114
|
+
* @method getEastPoint
|
|
115
|
+
* @instance
|
|
116
|
+
* @memberof Bounds
|
|
117
|
+
* @return {Vertex} The "easthmost" centered point of this bounding box.
|
|
118
|
+
*/
|
|
89
119
|
Bounds.prototype.getEastPoint = function () {
|
|
90
120
|
return new Vertex_1.Vertex(this.max.x, this.min.y + this.height / 2.0);
|
|
91
121
|
};
|
|
92
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Get the upper left corner point these bounds box.
|
|
124
|
+
*
|
|
125
|
+
* @method getNorthWestPoint
|
|
126
|
+
* @instance
|
|
127
|
+
* @memberof Bounds
|
|
128
|
+
* @return {Vertex} The "northwestmost" point of this bounding box.
|
|
129
|
+
*/
|
|
130
|
+
Bounds.prototype.getNorthWestPoint = function () {
|
|
131
|
+
return new Vertex_1.Vertex(this.min.x, this.min.y);
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Get the upper right corner point these bounds box.
|
|
135
|
+
*
|
|
136
|
+
* @method getNorthEastPoint
|
|
137
|
+
* @instance
|
|
138
|
+
* @memberof Bounds
|
|
139
|
+
* @return {Vertex} The "northeastmost" point of this bounding box.
|
|
140
|
+
*/
|
|
141
|
+
Bounds.prototype.getNorthEastPoint = function () {
|
|
142
|
+
return new Vertex_1.Vertex(this.max.x, this.min.y);
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Get the lower right corner point these bounds box.
|
|
146
|
+
*
|
|
147
|
+
* @method getSouthEastPoint
|
|
148
|
+
* @instance
|
|
149
|
+
* @memberof Bounds
|
|
150
|
+
* @return {Vertex} The "southeastmost" point of this bounding box.
|
|
151
|
+
*/
|
|
152
|
+
Bounds.prototype.getSouthEastPoint = function () {
|
|
153
|
+
return new Vertex_1.Vertex(this.max.x, this.max.y);
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Get the lower left corner point these bounds box.
|
|
157
|
+
*
|
|
158
|
+
* @method getSouthWestPoint
|
|
159
|
+
* @instance
|
|
160
|
+
* @memberof Bounds
|
|
161
|
+
* @return {Vertex} The "southwestmost" point of this bounding box.
|
|
162
|
+
*/
|
|
163
|
+
Bounds.prototype.getSouthWestPoint = function () {
|
|
164
|
+
return new Vertex_1.Vertex(this.min.x, this.max.y);
|
|
165
|
+
};
|
|
93
166
|
/**
|
|
94
167
|
* Convert this rectangular bounding box to a polygon with four vertices.
|
|
95
168
|
*
|
|
@@ -202,16 +275,16 @@ var Bounds = /** @class */ (function () {
|
|
|
202
275
|
return new Bounds(new Vertex_1.Vertex(xMin, yMin), new Vertex_1.Vertex(xMax, yMax));
|
|
203
276
|
};
|
|
204
277
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
278
|
+
* Compute the minimal bounding box for a given set of existing bounding boxes.
|
|
279
|
+
*
|
|
280
|
+
* An empty vertex array will return an empty bounding box located at (0,0).
|
|
281
|
+
*
|
|
282
|
+
* @static
|
|
283
|
+
* @method computeFromBoundsSet
|
|
284
|
+
* @memberof Bounds
|
|
285
|
+
* @param {Array<IBounds>} boundingBoxes - The set of existing bounding boxes to get the containing bounding box for.
|
|
286
|
+
* @return The minimal Bounds for the given bounds instances.
|
|
287
|
+
**/
|
|
215
288
|
Bounds.computeFromBoundsSet = function (boundingBoxes) {
|
|
216
289
|
if (boundingBoxes.length == 0) {
|
|
217
290
|
return new Bounds(new Vertex_1.Vertex(0, 0), new Vertex_1.Vertex(0, 0));
|
package/src/cjs/Bounds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bounds.js","sourceRoot":"","sources":["../ts/Bounds.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"Bounds.js","sourceRoot":"","sources":["../ts/Bounds.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;IAoBI;;;AAEJ,qCAAoC;AAEpC,mCAAkC;AAElC;;;;;;IAMI;AACJ;IAiCE;;;;;;;QAOI;IACJ,gBAAY,GAAa,EAAE,GAAa;QACtC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;QAQI;IACJ,6BAAY,GAAZ,UAAa,IAAc;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACpG,CAAC;IAED,yBAAQ,GAAR;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,0BAAS,GAAT;QACE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CA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VGSeriali
|
|
|
172
172
|
* @returns
|
|
173
173
|
*/
|
|
174
174
|
lineIntersectionTangents(line: VertTuple<any>, inVectorBoundsOnly?: boolean): Array<Vector>;
|
|
175
|
+
describeSVGPath(options?: {
|
|
176
|
+
moveToStart: boolean;
|
|
177
|
+
}): SVGPathParams;
|
|
175
178
|
/**
|
|
176
179
|
* This function should invalidate any installed listeners and invalidate this object.
|
|
177
180
|
* After calling this function the object might not hold valid data any more and
|
package/src/cjs/CircleSector.js
CHANGED
|
@@ -262,6 +262,32 @@ var CircleSector = /** @class */ (function () {
|
|
|
262
262
|
});
|
|
263
263
|
};
|
|
264
264
|
//--- END --- Implement interface `Intersectable`
|
|
265
|
+
CircleSector.prototype.describeSVGPath = function (options) {
|
|
266
|
+
// const buffer: SVGPathParams = [];
|
|
267
|
+
// const start = this.getStartPoint();
|
|
268
|
+
// const end = this.getEndPoint();
|
|
269
|
+
// // describeSVGArc
|
|
270
|
+
// // x: number,
|
|
271
|
+
// // y: number,
|
|
272
|
+
// // radius: number,
|
|
273
|
+
// // startAngle: number,
|
|
274
|
+
// // endAngle: number,
|
|
275
|
+
// // options?: { moveToStart: boolean }
|
|
276
|
+
// // ): SVGPathParams => {
|
|
277
|
+
// var arcRotation = 0.0;
|
|
278
|
+
// var largeArcFlag = 1;
|
|
279
|
+
// var sweepFlag = 0;
|
|
280
|
+
// if (options && options.moveToStart) {
|
|
281
|
+
// buffer.push("M", start.x, start.y);
|
|
282
|
+
// }
|
|
283
|
+
// buffer.push("A", cSector.circle.radius, cSector.circle.radius, arcRotation, largeArcFlag, sweepFlag, end.x, end.y);
|
|
284
|
+
// return buffer;
|
|
285
|
+
var arc = CircleSector.circleSectorUtils.describeSVGArc(this.circle.center.x, // end.x,
|
|
286
|
+
this.circle.center.y, // end.y,
|
|
287
|
+
this.circle.radius, this.startAngle, this.endAngle, options // options?: { moveToStart: boolean }
|
|
288
|
+
);
|
|
289
|
+
return arc;
|
|
290
|
+
};
|
|
265
291
|
/**
|
|
266
292
|
* This function should invalidate any installed listeners and invalidate this object.
|
|
267
293
|
* After calling this function the object might not hold valid data any more and
|
|
@@ -300,8 +326,9 @@ var CircleSector = /** @class */ (function () {
|
|
|
300
326
|
* @return [ 'A', radiusx, radiusy, rotation=0, largeArcFlag=1|0, sweepFlag=0, endx, endy ]
|
|
301
327
|
*/
|
|
302
328
|
describeSVGArc: function (x, y, radius, startAngle, endAngle, options) {
|
|
303
|
-
if (typeof options === "undefined")
|
|
329
|
+
if (typeof options === "undefined") {
|
|
304
330
|
options = { moveToStart: true };
|
|
331
|
+
}
|
|
305
332
|
var end = CircleSector.circleSectorUtils.polarToCartesian(x, y, radius, endAngle);
|
|
306
333
|
var start = CircleSector.circleSectorUtils.polarToCartesian(x, y, radius, startAngle);
|
|
307
334
|
// Split full circles into two halves.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircleSector.js","sourceRoot":"","sources":["../ts/CircleSector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;IAeI;;;AAEJ,mCAAkC;AAClC,mCAAkC;AAClC,+BAA8B;AAC9B,+CAA8C;AAG9C,mCAAkC;AAClC,yCAAwC;AAGxC;;;;;;;;IAQI;AACJ;IA6CE;;;;;;;;OAQG;IACH,sBAAY,MAAc,EAAE,UAAkB,EAAE,QAAgB;QArDhE;;YAEI;QACK,cAAS,GAAW,cAAc,CAAC;QAmD1C,IAAI,CAAC,GAAG,GAAG,2BAAY,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,8CAA8C;IAC9C;;;;;;;;;;QAUI;IACJ,gCAAS,GAAT;QACE,IAAM,KAAK,GAAG,IAAI,CAAC;QACnB,IAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"CircleSector.js","sourceRoot":"","sources":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AAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACvC,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;YAC7E,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,AAhFuB,CAgFtB;IACJ,mBAAC;CAAA,AAzZD,IAyZC,CAAC,YAAY;AAzZD,oCAAY"}
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
* @modified 2024-01-30 Fixing an issue with immutable style sets; changes to the global draw config did not reflect here (do now).
|
|
48
48
|
* @modified 2024-03-10 Fixing some types for Typescript 5 compatibility.
|
|
49
49
|
* @modified 2024-07-24 Caching custom style defs in a private buffer variable.
|
|
50
|
-
* @
|
|
50
|
+
* @modified 2025-11-14 Fixing a bug in the CSS `mix-blend-mode` property handling (caused a runtime error).
|
|
51
|
+
* @version 1.6.11
|
|
51
52
|
**/
|
|
52
53
|
import { Polygon } from "./Polygon";
|
|
53
54
|
import { Vertex } from "./Vertex";
|
package/src/cjs/drawutilssvg.js
CHANGED
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
* @modified 2024-01-30 Fixing an issue with immutable style sets; changes to the global draw config did not reflect here (do now).
|
|
49
49
|
* @modified 2024-03-10 Fixing some types for Typescript 5 compatibility.
|
|
50
50
|
* @modified 2024-07-24 Caching custom style defs in a private buffer variable.
|
|
51
|
-
* @
|
|
51
|
+
* @modified 2025-11-14 Fixing a bug in the CSS `mix-blend-mode` property handling (caused a runtime error).
|
|
52
|
+
* @version 1.6.11
|
|
52
53
|
**/
|
|
53
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
55
|
exports.drawutilssvg = void 0;
|
|
@@ -253,8 +254,13 @@ var drawutilssvg = /** @class */ (function () {
|
|
|
253
254
|
node = this.createSVGNode(nodeName);
|
|
254
255
|
}
|
|
255
256
|
if (this.drawlibConfiguration.blendMode) {
|
|
256
|
-
|
|
257
|
-
|
|
257
|
+
var blendMode = node.style["mix-blend-mode"];
|
|
258
|
+
if (typeof blendMode === "function") {
|
|
259
|
+
blendMode(this.drawlibConfiguration.blendMode);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
node.style["mix-blend-mode"] = this.drawlibConfiguration.blendMode;
|
|
263
|
+
}
|
|
258
264
|
}
|
|
259
265
|
// if (this.lineDashEnabled && this.lineDash && this.lineDash.length > 0 && drawutilssvg.nodeSupportsLineDash(nodeName)) {
|
|
260
266
|
// node.setAttribute("stroke-dasharray", this.lineDash.join(" "));
|