plotboilerplate 1.20.1 → 1.21.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 +17 -1
- package/dist/index.esm.js +2065 -1397
- 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 +1265 -584
- package/dist/plotboilerplate.min.js +1 -1
- package/package.json +2 -1
- package/src/cjs/BezierPath.d.ts +27 -49
- package/src/cjs/BezierPath.js +69 -237
- package/src/cjs/BezierPath.js.map +1 -1
- package/src/cjs/Bounds.d.ts +14 -1
- package/src/cjs/Bounds.js +21 -1
- package/src/cjs/Bounds.js.map +1 -1
- package/src/cjs/CubicBezierCurve.d.ts +70 -1
- package/src/cjs/CubicBezierCurve.js +130 -12
- package/src/cjs/CubicBezierCurve.js.map +1 -1
- package/src/cjs/Line.d.ts +2 -1
- package/src/cjs/Line.js +1 -0
- package/src/cjs/Line.js.map +1 -1
- package/src/cjs/PBText.d.ts +2 -1
- package/src/cjs/PBText.js +10 -9
- package/src/cjs/PBText.js.map +1 -1
- package/src/cjs/PlotBoilerplate.d.ts +10 -13
- package/src/cjs/PlotBoilerplate.js +136 -47
- package/src/cjs/PlotBoilerplate.js.map +1 -1
- package/src/cjs/Polygon.d.ts +35 -1
- package/src/cjs/Polygon.js +87 -1
- package/src/cjs/Polygon.js.map +1 -1
- package/src/cjs/Triangle.js +1 -0
- package/src/cjs/Triangle.js.map +1 -1
- package/src/cjs/VEllipse.js +1 -1
- package/src/cjs/VEllipse.js.map +1 -1
- package/src/cjs/Vector.d.ts +4 -4
- package/src/cjs/Vector.js +2 -2
- package/src/cjs/Vector.js.map +1 -1
- package/src/cjs/VertTuple.d.ts +2 -1
- package/src/cjs/VertTuple.js +4 -3
- package/src/cjs/VertTuple.js.map +1 -1
- package/src/cjs/Vertex.d.ts +14 -3
- package/src/cjs/Vertex.js +18 -3
- package/src/cjs/Vertex.js.map +1 -1
- package/src/cjs/draw.d.ts +159 -79
- package/src/cjs/draw.js +311 -139
- package/src/cjs/draw.js.map +1 -1
- package/src/cjs/drawgl.d.ts +93 -55
- package/src/cjs/drawgl.js +90 -34
- package/src/cjs/drawgl.js.map +1 -1
- package/src/cjs/drawutilssvg.d.ts +233 -58
- package/src/cjs/drawutilssvg.js +384 -95
- package/src/cjs/drawutilssvg.js.map +1 -1
- package/src/cjs/interfaces/DrawLib.d.ts +161 -82
- package/src/cjs/interfaces/DrawLib.js +7 -0
- package/src/cjs/interfaces/DrawLib.js.map +1 -1
- package/src/cjs/interfaces/core.d.ts +46 -32
- package/src/cjs/interfaces/core.js +2 -0
- package/src/cjs/interfaces/core.js.map +1 -1
- package/src/cjs/utils/creategui.js +16 -10
- package/src/cjs/utils/datastructures/Color.d.ts +3 -1
- package/src/cjs/utils/datastructures/Color.js +12 -1
- package/src/cjs/utils/datastructures/Color.js.map +1 -1
- package/src/cjs/utils/detectDarkMode.d.ts +10 -0
- package/src/cjs/utils/detectDarkMode.js +32 -0
- package/src/cjs/utils/detectDarkMode.js.map +1 -0
- package/src/cjs/utils/module.js +4 -2
- package/src/esm/BezierPath.d.ts +27 -49
- package/src/esm/BezierPath.js +69 -237
- package/src/esm/BezierPath.js.map +1 -1
- package/src/esm/Bounds.d.ts +14 -1
- package/src/esm/Bounds.js +19 -1
- package/src/esm/Bounds.js.map +1 -1
- package/src/esm/CubicBezierCurve.d.ts +70 -1
- package/src/esm/CubicBezierCurve.js +130 -12
- package/src/esm/CubicBezierCurve.js.map +1 -1
- package/src/esm/Line.d.ts +2 -1
- package/src/esm/Line.js +1 -0
- package/src/esm/Line.js.map +1 -1
- package/src/esm/PBText.d.ts +2 -1
- package/src/esm/PBText.js +10 -9
- package/src/esm/PBText.js.map +1 -1
- package/src/esm/PlotBoilerplate.d.ts +10 -13
- package/src/esm/PlotBoilerplate.js +136 -48
- package/src/esm/PlotBoilerplate.js.map +1 -1
- package/src/esm/Polygon.d.ts +35 -1
- package/src/esm/Polygon.js +85 -1
- package/src/esm/Polygon.js.map +1 -1
- package/src/esm/Triangle.js +1 -0
- package/src/esm/Triangle.js.map +1 -1
- package/src/esm/VEllipse.js +1 -1
- package/src/esm/VEllipse.js.map +1 -1
- package/src/esm/Vector.d.ts +4 -4
- package/src/esm/Vector.js +2 -2
- package/src/esm/Vector.js.map +1 -1
- package/src/esm/VertTuple.d.ts +2 -1
- package/src/esm/VertTuple.js +4 -3
- package/src/esm/VertTuple.js.map +1 -1
- package/src/esm/Vertex.d.ts +14 -3
- package/src/esm/Vertex.js +18 -3
- package/src/esm/Vertex.js.map +1 -1
- package/src/esm/draw.d.ts +159 -79
- package/src/esm/draw.js +307 -137
- package/src/esm/draw.js.map +1 -1
- package/src/esm/drawgl.d.ts +93 -55
- package/src/esm/drawgl.js +90 -34
- package/src/esm/drawgl.js.map +1 -1
- package/src/esm/drawutilssvg.d.ts +233 -58
- package/src/esm/drawutilssvg.js +379 -95
- package/src/esm/drawutilssvg.js.map +1 -1
- package/src/esm/interfaces/DrawLib.d.ts +161 -82
- package/src/esm/interfaces/DrawLib.js +7 -0
- package/src/esm/interfaces/DrawLib.js.map +1 -1
- package/src/esm/interfaces/core.d.ts +46 -32
- package/src/esm/interfaces/core.js +2 -0
- package/src/esm/interfaces/core.js.map +1 -1
- package/src/esm/utils/datastructures/Color.d.ts +3 -1
- package/src/esm/utils/datastructures/Color.js +12 -1
- package/src/esm/utils/datastructures/Color.js.map +1 -1
- package/src/esm/utils/detectDarkMode.d.ts +10 -0
- package/src/esm/utils/detectDarkMode.js +28 -0
- package/src/esm/utils/detectDarkMode.js.map +1 -0
- package/src/ts/BezierPath.ts +74 -244
- package/src/ts/Bounds.ts +25 -1
- package/src/ts/CubicBezierCurve.ts +139 -12
- package/src/ts/Line.ts +2 -1
- package/src/ts/PBText.ts +10 -9
- package/src/ts/PlotBoilerplate.ts +130 -50
- package/src/ts/Polygon.ts +91 -1
- package/src/ts/Triangle.ts +2 -1
- package/src/ts/VEllipse.ts +2 -2
- package/src/ts/Vector.ts +4 -4
- package/src/ts/VertTuple.ts +4 -3
- package/src/ts/Vertex.ts +20 -4
- package/src/ts/draw.ts +316 -119
- package/src/ts/drawgl.ts +141 -78
- package/src/ts/drawutilssvg.ts +562 -133
- package/src/ts/interfaces/DrawLib.ts +223 -86
- package/src/ts/interfaces/core.ts +47 -32
- package/src/ts/utils/datastructures/Color.ts +13 -1
- package/src/ts/utils/detectDarkMode.ts +30 -0
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
* @modified 2022-02-03 Added the `lineWidth` param to the `crosshair` function.
|
|
19
19
|
* @modified 2022-02-03 Added the `cross(...)` function.
|
|
20
20
|
* @modified 2022-07-26 Adding `alpha` to the `image(...)` function.
|
|
21
|
+
* @modified 2023-02-10 The methods `setCurrentClassName` and `setCurrentId` also accept `null` now.
|
|
22
|
+
* @modified 2023-09-29 Downgrading all `Vertex` param type to the more generic `XYCoords` type in these render functions: line, arrow, texturedPoly, cubicBezier, cubicBezierPath, handle, handleLine, dot, point, circle, circleArc, ellipse, grid, raster.
|
|
23
|
+
* @modified 2023-09-29 Added the `headLength` parameter to the 'DrawLib.arrow()` function.
|
|
24
|
+
* @modified 2023-09-29 Added the `arrowHead(...)` function to the 'DrawLib.arrow()` interface.
|
|
25
|
+
* @modified 2023-09-29 Added the `cubicBezierArrow(...)` function to the 'DrawLib.arrow()` interface.
|
|
26
|
+
* @modified 2023-09-29 Added the `lineDashes` attribute.
|
|
27
|
+
* @modified 2023-09-30 Adding `strokeOptions` param to these draw function: line, arrow, cubicBezierArrow, cubicBezier, cubicBezierPath, circle, circleArc, ellipse, square, rect, polygon, polyline.
|
|
21
28
|
**/
|
|
22
29
|
import { Bounds } from "../Bounds";
|
|
23
30
|
import { Polygon } from "../Polygon";
|
|
@@ -38,6 +45,19 @@ export interface FontOptions {
|
|
|
38
45
|
textAlign?: CanvasRenderingContext2D["textAlign"];
|
|
39
46
|
rotation?: number;
|
|
40
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Defines a line-dash configuration.
|
|
50
|
+
*
|
|
51
|
+
* See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray
|
|
52
|
+
* and https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash
|
|
53
|
+
* for how line dashes work.
|
|
54
|
+
*
|
|
55
|
+
* Setting line-dash to empty array `[]` resets the dashing.
|
|
56
|
+
*/
|
|
57
|
+
export interface StrokeOptions {
|
|
58
|
+
dashOffset?: number;
|
|
59
|
+
dashArray?: Array<number>;
|
|
60
|
+
}
|
|
41
61
|
/**
|
|
42
62
|
* An interface all drawing libraries must implement to be used with PlotBoilerplate.
|
|
43
63
|
*
|
|
@@ -66,16 +86,16 @@ export interface DrawLib<R> {
|
|
|
66
86
|
* @method
|
|
67
87
|
* @param {UID|null} uid - A UID identifying the currently drawn element(s), or null to clear.
|
|
68
88
|
**/
|
|
69
|
-
setCurrentId: (uid: UID |
|
|
89
|
+
setCurrentId: (uid: UID | null) => void;
|
|
70
90
|
/**
|
|
71
91
|
* This method shouled be called each time the currently drawn `Drawable` changes.
|
|
72
92
|
* Determine the class name for further usage here.
|
|
73
93
|
*
|
|
74
94
|
* @name setCurrentClassName
|
|
75
95
|
* @method
|
|
76
|
-
* @param {string} className - A class name for further custom use cases.
|
|
96
|
+
* @param {string|null} className - A class name for further custom use cases.
|
|
77
97
|
**/
|
|
78
|
-
setCurrentClassName: (className: string |
|
|
98
|
+
setCurrentClassName: (className: string | null) => void;
|
|
79
99
|
/**
|
|
80
100
|
* Called before each draw cycle.
|
|
81
101
|
*
|
|
@@ -102,28 +122,65 @@ export interface DrawLib<R> {
|
|
|
102
122
|
* Draw the line between the given two points with the specified (CSS-) color.
|
|
103
123
|
*
|
|
104
124
|
* @method line
|
|
105
|
-
* @param {
|
|
106
|
-
* @param {
|
|
125
|
+
* @param {XYCoords} zA - The start point of the line.
|
|
126
|
+
* @param {XYCoords} zB - The end point of the line.
|
|
107
127
|
* @param {string} color - Any valid CSS color string.
|
|
108
|
-
* @param {number=1} lineWidth? -
|
|
109
|
-
* @
|
|
128
|
+
* @param {number=1} lineWidth? - (optional) The line's width.
|
|
129
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
130
|
+
* @return {R}
|
|
110
131
|
* @instance
|
|
111
132
|
* @memberof DrawLib
|
|
112
133
|
**/
|
|
113
|
-
line: (zA:
|
|
134
|
+
line: (zA: XYCoords, zB: XYCoords, color: string, lineWidth?: number, strokeOptopns?: StrokeOptions) => R;
|
|
114
135
|
/**
|
|
115
|
-
* Draw a line and an arrow at the end (zB) of the given line
|
|
136
|
+
* Draw a line and an arrow at the end (zB) of the given line width the specified (CSS-) color and size.
|
|
116
137
|
*
|
|
117
138
|
* @method arrow
|
|
118
|
-
* @param {
|
|
119
|
-
* @param {
|
|
139
|
+
* @param {XYCoords} zA - The start point of the arrow-line.
|
|
140
|
+
* @param {XYCoords} zB - The end point of the arrow-line.
|
|
120
141
|
* @param {string} color - Any valid CSS color string.
|
|
121
|
-
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
122
|
-
* @
|
|
142
|
+
* @param {number=1} lineWidth - (optional) The line width to use; default is 1.
|
|
143
|
+
* @param {headLength=8} headLength - (optional) The length of the arrow head (default is 8 units).
|
|
144
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
145
|
+
* @return {R}
|
|
146
|
+
* @instance
|
|
147
|
+
* @memberof DrawLib
|
|
148
|
+
**/
|
|
149
|
+
arrow: (zA: XYCoords, zB: XYCoords, color: string, lineWidth?: number, headLength?: number, strokeOptopns?: StrokeOptions) => R;
|
|
150
|
+
/**
|
|
151
|
+
* Draw a cubic Bézier curve and and an arrow at the end (endControlPoint) of the given line width the specified (CSS-) color and arrow size.
|
|
152
|
+
*
|
|
153
|
+
* @method cubicBezierArrow
|
|
154
|
+
* @param {XYCoords} startPoint - The start point of the cubic Bézier curve
|
|
155
|
+
* @param {XYCoords} endPoint - The end point the cubic Bézier curve.
|
|
156
|
+
* @param {XYCoords} startControlPoint - The start control point the cubic Bézier curve.
|
|
157
|
+
* @param {XYCoords} endControlPoint - The end control point the cubic Bézier curve.
|
|
158
|
+
* @param {string} color - The CSS color to draw the curve with.
|
|
159
|
+
* @param {number} lineWidth - (optional) The line width to use.
|
|
160
|
+
* @param {headLength=8} headLength - (optional) The length of the arrow head (default is 8 units).
|
|
161
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
162
|
+
*
|
|
163
|
+
* @return {R}
|
|
164
|
+
* @instance
|
|
165
|
+
* @memberof DrawLib
|
|
166
|
+
*/
|
|
167
|
+
cubicBezierArrow: (startPoint: XYCoords, endPoint: XYCoords, startControlPoint: XYCoords, endControlPoint: XYCoords, color: string, lineWidth?: number, headLength?: number, strokeOptopns?: StrokeOptions) => R;
|
|
168
|
+
/**
|
|
169
|
+
* Draw just an arrow head a the end of an imaginary line (zB) of the given line width the specified (CSS-) color and size.
|
|
170
|
+
*
|
|
171
|
+
* @method arrow
|
|
172
|
+
* @param {XYCoords} zA - The start point of the arrow-line.
|
|
173
|
+
* @param {XYCoords} zB - The end point of the arrow-line.
|
|
174
|
+
* @param {string} color - Any valid CSS color string.
|
|
175
|
+
* @param {number=1} lineWidth - (optional) The line width to use; default is 1.
|
|
176
|
+
* @param {number=8} headLength - (optional) The length of the arrow head (default is 8 pixels).
|
|
177
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
178
|
+
*
|
|
179
|
+
* @return {R}
|
|
123
180
|
* @instance
|
|
124
181
|
* @memberof DrawLib
|
|
125
182
|
**/
|
|
126
|
-
|
|
183
|
+
arrowHead: (zA: XYCoords, zB: XYCoords, color: string, lineWidth?: number, headLength?: number, strokeOptopns?: StrokeOptions) => R;
|
|
127
184
|
/**
|
|
128
185
|
* Draw an image at the given position with the given size.<br>
|
|
129
186
|
* <br>
|
|
@@ -131,14 +188,14 @@ export interface DrawLib<R> {
|
|
|
131
188
|
*
|
|
132
189
|
* @method image
|
|
133
190
|
* @param {Image} image - The image object to draw.
|
|
134
|
-
* @param {
|
|
135
|
-
* @param {
|
|
191
|
+
* @param {XYCoords} position - The position to draw the the upper left corner at.
|
|
192
|
+
* @param {XYCoords} size - The x/y-size to draw the image with.
|
|
136
193
|
* @param {number=1.0} alpha - (optional, default=0.0) The transparency (1.0=opaque, 0.0=transparent).
|
|
137
|
-
* @return {
|
|
194
|
+
* @return {R}
|
|
138
195
|
* @instance
|
|
139
196
|
* @memberof DrawLib
|
|
140
197
|
**/
|
|
141
|
-
image: (image: HTMLImageElement, position:
|
|
198
|
+
image: (image: HTMLImageElement, position: XYCoords, size: XYCoords, alpha?: number) => R;
|
|
142
199
|
/**
|
|
143
200
|
* Draw an image at the given position with the given size.<br>
|
|
144
201
|
* <br>
|
|
@@ -148,28 +205,30 @@ export interface DrawLib<R> {
|
|
|
148
205
|
* @param {Image} textureImage - The image object to draw.
|
|
149
206
|
* @param {Bounds} textureSize - The texture size to use; these are the original bounds to map the polygon vertices to.
|
|
150
207
|
* @param {Polygon} polygon - The polygon to use as clip path.
|
|
151
|
-
* @param {
|
|
208
|
+
* @param {XYCoords} polygonPosition - The polygon's position (relative), measured at the bounding box's center.
|
|
152
209
|
* @param {number} rotation - The rotation to use for the polygon (and for the texture).
|
|
153
210
|
* @return {void}
|
|
154
211
|
* @instance
|
|
155
212
|
* @memberof DrawLib
|
|
156
213
|
**/
|
|
157
|
-
texturedPoly: (textureImage: HTMLImageElement, textureSize: Bounds, polygon: Polygon, polygonPosition:
|
|
214
|
+
texturedPoly: (textureImage: HTMLImageElement, textureSize: Bounds, polygon: Polygon, polygonPosition: XYCoords, rotation: number) => R;
|
|
158
215
|
/**
|
|
159
216
|
* Draw the given (cubic) bézier curve.
|
|
160
217
|
*
|
|
161
218
|
* @method cubicBezier
|
|
162
|
-
* @param {
|
|
163
|
-
* @param {
|
|
164
|
-
* @param {
|
|
165
|
-
* @param {
|
|
219
|
+
* @param {XYCoords} startPoint - The start point of the cubic Bézier curve
|
|
220
|
+
* @param {XYCoords} endPoint - The end point the cubic Bézier curve.
|
|
221
|
+
* @param {XYCoords} startControlPoint - The start control point the cubic Bézier curve.
|
|
222
|
+
* @param {XYCoords} endControlPoint - The end control point the cubic Bézier curve.
|
|
166
223
|
* @param {string} color - The CSS color to draw the curve with.
|
|
167
224
|
* @param {number} lineWidth - (optional) The line width to use.
|
|
168
|
-
* @
|
|
225
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
226
|
+
*
|
|
227
|
+
* @return {R}
|
|
169
228
|
* @instance
|
|
170
229
|
* @memberof DrawLib
|
|
171
230
|
*/
|
|
172
|
-
cubicBezier: (startPoint:
|
|
231
|
+
cubicBezier: (startPoint: XYCoords, endPoint: XYCoords, startControlPoint: XYCoords, endControlPoint: XYCoords, color: string, lineWidth?: number, strokeOptopns?: StrokeOptions) => R;
|
|
173
232
|
/**
|
|
174
233
|
* Draw the given (cubic) Bézier path.
|
|
175
234
|
*
|
|
@@ -178,105 +237,113 @@ export interface DrawLib<R> {
|
|
|
178
237
|
* <pre> [ point1, point1_startControl, point2_endControl, point2, point2_startControl, point3_endControl, point3, ... pointN_endControl, pointN ]</pre>
|
|
179
238
|
*
|
|
180
239
|
* @method cubicBezierPath
|
|
181
|
-
* @param {
|
|
240
|
+
* @param {XYCoords[]} path - The cubic bezier path as described above.
|
|
182
241
|
* @param {string} color - The CSS colot to draw the path with.
|
|
183
242
|
* @param {number=1} lineWidth - (optional) The line width to use.
|
|
184
|
-
* @
|
|
243
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
244
|
+
*
|
|
245
|
+
* @return {R}
|
|
185
246
|
* @instance
|
|
186
247
|
* @memberof DrawLib
|
|
187
248
|
*/
|
|
188
|
-
cubicBezierPath: (path: Array<
|
|
249
|
+
cubicBezierPath: (path: Array<XYCoords>, color: string, lineWidth?: number, strokeOptopns?: StrokeOptions) => R;
|
|
189
250
|
/**
|
|
190
251
|
* Draw the given handle and handle point (used to draw interactive Bézier curves).
|
|
191
252
|
*
|
|
192
253
|
* The colors for this are fixed and cannot be specified.
|
|
193
254
|
*
|
|
194
255
|
* @method handle
|
|
195
|
-
* @param {
|
|
196
|
-
* @param {
|
|
197
|
-
* @return {
|
|
256
|
+
* @param {XYCoords} startPoint - The start of the handle.
|
|
257
|
+
* @param {XYCoords} endPoint - The end point of the handle.
|
|
258
|
+
* @return {R}
|
|
198
259
|
* @instance
|
|
199
260
|
* @memberof DrawLib
|
|
200
261
|
*/
|
|
201
|
-
handle: (startPoint:
|
|
262
|
+
handle: (startPoint: XYCoords, endPoint: XYCoords) => R;
|
|
202
263
|
/**
|
|
203
264
|
* Draw a handle line (with a light grey).
|
|
204
265
|
*
|
|
205
266
|
* @method handleLine
|
|
206
|
-
* @param {
|
|
207
|
-
* @param {
|
|
208
|
-
* @return {
|
|
267
|
+
* @param {XYCoords} startPoint - The start point to draw the handle at.
|
|
268
|
+
* @param {XYCoords} endPoint - The end point to draw the handle at.
|
|
269
|
+
* @return {R}
|
|
209
270
|
* @instance
|
|
210
271
|
* @memberof DrawLib
|
|
211
272
|
*/
|
|
212
|
-
handleLine: (startPoint:
|
|
273
|
+
handleLine: (startPoint: XYCoords, endPoint: XYCoords) => R;
|
|
213
274
|
/**
|
|
214
275
|
* Draw a 1x1 dot with the specified (CSS-) color.
|
|
215
276
|
*
|
|
216
277
|
* @method dot
|
|
217
|
-
* @param {
|
|
278
|
+
* @param {XYCoords} p - The position to draw the dot at.
|
|
218
279
|
* @param {string} color - The CSS color to draw the dot with.
|
|
219
|
-
* @return {
|
|
280
|
+
* @return {R}
|
|
220
281
|
* @instance
|
|
221
282
|
* @memberof DrawLib
|
|
222
283
|
*/
|
|
223
|
-
dot: (p:
|
|
284
|
+
dot: (p: XYCoords, color: string) => R;
|
|
224
285
|
/**
|
|
225
286
|
* Draw the given point with the specified (CSS-) color and radius 3.
|
|
226
287
|
*
|
|
227
288
|
* @method point
|
|
228
|
-
* @param {
|
|
229
|
-
* @param {
|
|
230
|
-
* @return {
|
|
289
|
+
* @param {XYCoords} p - The position to draw the point at.
|
|
290
|
+
* @param {XYCoords} color - The CSS color to draw the point with.
|
|
291
|
+
* @return {R}
|
|
231
292
|
* @instance
|
|
232
293
|
* @memberof DrawLib
|
|
233
294
|
*/
|
|
234
|
-
point: (p:
|
|
295
|
+
point: (p: XYCoords, color: string) => R;
|
|
235
296
|
/**
|
|
236
297
|
* Draw a circle with the specified (CSS-) color and radius.<br>
|
|
237
298
|
* <br>
|
|
238
299
|
* Note that if the x- and y- scales are different the result will be an ellipse rather than a circle.
|
|
239
300
|
*
|
|
240
301
|
* @method circle
|
|
241
|
-
* @param {
|
|
302
|
+
* @param {XYCoords} center - The center of the circle.
|
|
242
303
|
* @param {number} radius - The radius of the circle.
|
|
243
304
|
* @param {string} color - The CSS color to draw the circle with.
|
|
244
305
|
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
245
|
-
* @
|
|
306
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
307
|
+
*
|
|
308
|
+
* @return {R}
|
|
246
309
|
* @instance
|
|
247
310
|
* @memberof DrawLib
|
|
248
311
|
*/
|
|
249
|
-
circle: (center:
|
|
312
|
+
circle: (center: XYCoords, radius: number, color: string, lineWidth?: number, strokeOptions?: StrokeOptions) => R;
|
|
250
313
|
/**
|
|
251
314
|
* Draw a circular arc (section of a circle) with the given CSS color.
|
|
252
315
|
*
|
|
253
316
|
* @method circleArc
|
|
254
|
-
* @param {
|
|
317
|
+
* @param {XYCoords} center - The center of the circle.
|
|
255
318
|
* @param {number} radius - The radius of the circle.
|
|
256
319
|
* @param {number} startAngle - The angle to start at.
|
|
257
320
|
* @param {number} endAngle - The angle to end at.
|
|
258
321
|
* @param {string} color - The CSS color to draw the circle with.
|
|
259
322
|
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
260
|
-
* @
|
|
323
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
324
|
+
*
|
|
325
|
+
* @return {R}
|
|
261
326
|
* @instance
|
|
262
327
|
* @memberof DrawLib
|
|
263
328
|
*/
|
|
264
|
-
circleArc: (center:
|
|
329
|
+
circleArc: (center: XYCoords, radius: number, startAngle: number, endAngle: number, color: string, lineWidth?: number, strokeOptions?: StrokeOptions) => R;
|
|
265
330
|
/**
|
|
266
331
|
* Draw an ellipse with the specified (CSS-) color and thw two radii.
|
|
267
332
|
*
|
|
268
333
|
* @method ellipse
|
|
269
|
-
* @param {
|
|
334
|
+
* @param {XYCoords} center - The center of the ellipse.
|
|
270
335
|
* @param {number} radiusX - The radius of the ellipse.
|
|
271
336
|
* @param {number} radiusY - The radius of the ellipse.
|
|
272
337
|
* @param {string} color - The CSS color to draw the ellipse with.
|
|
273
338
|
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
274
339
|
* @param {number=} rotation - (optional, default=0) The rotation of the ellipse.
|
|
275
|
-
* @
|
|
340
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
341
|
+
*
|
|
342
|
+
* @return {R}
|
|
276
343
|
* @instance
|
|
277
344
|
* @memberof DrawLib
|
|
278
345
|
*/
|
|
279
|
-
ellipse: (center:
|
|
346
|
+
ellipse: (center: XYCoords, radiusX: number, radiusY: number, color: string, lineWidth?: number, rotation?: number, strokeOptions?: StrokeOptions) => R;
|
|
280
347
|
/**
|
|
281
348
|
* Draw square at the given center, size and with the specified (CSS-) color.<br>
|
|
282
349
|
* <br>
|
|
@@ -287,11 +354,13 @@ export interface DrawLib<R> {
|
|
|
287
354
|
* @param {number} size - The size of the square.
|
|
288
355
|
* @param {string} color - The CSS color to draw the square with.
|
|
289
356
|
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
290
|
-
* @
|
|
357
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
358
|
+
*
|
|
359
|
+
* @return {R}
|
|
291
360
|
* @instance
|
|
292
361
|
* @memberof DrawLib
|
|
293
362
|
*/
|
|
294
|
-
square: (center: XYCoords, size: number, color: string, lineWidth?: number) => R;
|
|
363
|
+
square: (center: XYCoords, size: number, color: string, lineWidth?: number, strokeOptions?: StrokeOptions) => R;
|
|
295
364
|
/**
|
|
296
365
|
* Draw a rectangle at the given left upper corner, with, height; and with the specified line width and (CSS-) color.<br>
|
|
297
366
|
*
|
|
@@ -301,43 +370,45 @@ export interface DrawLib<R> {
|
|
|
301
370
|
* @param {number} height - The height of the rectangle.
|
|
302
371
|
* @param {string} color - The CSS color to draw the rectangle with.
|
|
303
372
|
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
304
|
-
* @
|
|
373
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
374
|
+
*
|
|
375
|
+
* @return {R}
|
|
305
376
|
* @instance
|
|
306
377
|
* @memberof DrawLib
|
|
307
378
|
*/
|
|
308
|
-
rect: (upperLeft: XYCoords, width: number, height: number, color: string, lineWidth?: number) => R;
|
|
379
|
+
rect: (upperLeft: XYCoords, width: number, height: number, color: string, lineWidth?: number, strokeOptions?: StrokeOptions) => R;
|
|
309
380
|
/**
|
|
310
381
|
* Draw a grid of horizontal and vertical lines with the given (CSS-) color.
|
|
311
382
|
*
|
|
312
383
|
* @method grid
|
|
313
|
-
* @param {
|
|
384
|
+
* @param {XYCoords} center - The center of the grid.
|
|
314
385
|
* @param {number} width - The total width of the grid (width/2 each to the left and to the right).
|
|
315
386
|
* @param {number} height - The total height of the grid (height/2 each to the top and to the bottom).
|
|
316
387
|
* @param {number} sizeX - The horizontal grid size.
|
|
317
388
|
* @param {number} sizeY - The vertical grid size.
|
|
318
389
|
* @param {string} color - The CSS color to draw the grid with.
|
|
319
|
-
* @return {
|
|
390
|
+
* @return {R}
|
|
320
391
|
* @instance
|
|
321
392
|
* @memberof DrawLib
|
|
322
393
|
*/
|
|
323
|
-
grid: (center:
|
|
394
|
+
grid: (center: XYCoords, width: number, height: number, sizeX: number, sizeY: number, color: string) => R;
|
|
324
395
|
/**
|
|
325
396
|
* Draw a raster of crosshairs in the given grid.<br>
|
|
326
397
|
*
|
|
327
398
|
* This works analogue to the grid() function
|
|
328
399
|
*
|
|
329
400
|
* @method raster
|
|
330
|
-
* @param {
|
|
401
|
+
* @param {XYCoords} center - The center of the raster.
|
|
331
402
|
* @param {number} width - The total width of the raster (width/2 each to the left and to the right).
|
|
332
403
|
* @param {number} height - The total height of the raster (height/2 each to the top and to the bottom).
|
|
333
404
|
* @param {number} sizeX - The horizontal raster size.
|
|
334
405
|
* @param {number} sizeY - The vertical raster size.
|
|
335
406
|
* @param {string} color - The CSS color to draw the raster with.
|
|
336
|
-
* @return {
|
|
407
|
+
* @return {R}
|
|
337
408
|
* @instance
|
|
338
409
|
* @memberof DrawLib
|
|
339
410
|
*/
|
|
340
|
-
raster: (center:
|
|
411
|
+
raster: (center: XYCoords, width: number, height: number, sizeX: number, sizeY: number, color: string) => R;
|
|
341
412
|
/**
|
|
342
413
|
* Draw a diamond handle (square rotated by 45°) with the given CSS color.
|
|
343
414
|
*
|
|
@@ -346,14 +417,14 @@ export interface DrawLib<R> {
|
|
|
346
417
|
* as even shaped diamonds.
|
|
347
418
|
*
|
|
348
419
|
* @method diamondHandle
|
|
349
|
-
* @param {
|
|
350
|
-
* @param {
|
|
420
|
+
* @param {XYCoords} center - The center of the diamond.
|
|
421
|
+
* @param {number} size - The x/y-size of the diamond.
|
|
351
422
|
* @param {string} color - The CSS color to draw the diamond with.
|
|
352
|
-
* @return {
|
|
423
|
+
* @return {R}
|
|
353
424
|
* @instance
|
|
354
425
|
* @memberof DrawLib
|
|
355
426
|
*/
|
|
356
|
-
diamondHandle: (center:
|
|
427
|
+
diamondHandle: (center: XYCoords, size: number, color: string) => R;
|
|
357
428
|
/**
|
|
358
429
|
* Draw a square handle with the given CSS color.<br>
|
|
359
430
|
* <br>
|
|
@@ -362,14 +433,14 @@ export interface DrawLib<R> {
|
|
|
362
433
|
* as even shaped squares.
|
|
363
434
|
*
|
|
364
435
|
* @method squareHandle
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {
|
|
436
|
+
* @param {XYCoords} center - The center of the square.
|
|
437
|
+
* @param {number} size - The x/y-size of the square.
|
|
367
438
|
* @param {string} color - The CSS color to draw the square with.
|
|
368
|
-
* @return {
|
|
439
|
+
* @return {R}
|
|
369
440
|
* @instance
|
|
370
441
|
* @memberof DrawLib
|
|
371
442
|
*/
|
|
372
|
-
squareHandle: (center:
|
|
443
|
+
squareHandle: (center: XYCoords, size: number, color: string) => R;
|
|
373
444
|
/**
|
|
374
445
|
* Draw a circle handle with the given CSS color.<br>
|
|
375
446
|
* <br>
|
|
@@ -378,14 +449,14 @@ export interface DrawLib<R> {
|
|
|
378
449
|
* as even shaped circles.
|
|
379
450
|
*
|
|
380
451
|
* @method circleHandle
|
|
381
|
-
* @param {
|
|
452
|
+
* @param {XYCoords} center - The center of the circle.
|
|
382
453
|
* @param {number} radius - The radius of the circle.
|
|
383
454
|
* @param {string} color - The CSS color to draw the circle with.
|
|
384
|
-
* @return {
|
|
455
|
+
* @return {R}
|
|
385
456
|
* @instance
|
|
386
457
|
* @memberof DrawLib
|
|
387
458
|
*/
|
|
388
|
-
circleHandle: (center:
|
|
459
|
+
circleHandle: (center: XYCoords, size: number, color: string) => R;
|
|
389
460
|
/**
|
|
390
461
|
* Draw a crosshair with given radius and color at the given position.<br>
|
|
391
462
|
* <br>
|
|
@@ -396,7 +467,7 @@ export interface DrawLib<R> {
|
|
|
396
467
|
* @param {number} radius - The radius of the crosshair.
|
|
397
468
|
* @param {string} color - The CSS color to draw the crosshair with.
|
|
398
469
|
* @param {number=0.5} lineWidth - (optional, default=0.5) The line width to use.
|
|
399
|
-
* @return {
|
|
470
|
+
* @return {R}
|
|
400
471
|
* @instance
|
|
401
472
|
* @memberof DrawLib
|
|
402
473
|
*/
|
|
@@ -411,7 +482,7 @@ export interface DrawLib<R> {
|
|
|
411
482
|
* @param {number} radius - The radius of the crosshair.
|
|
412
483
|
* @param {string} color - The CSS color to draw the crosshair with.
|
|
413
484
|
* @param {number=1} lineWidth - (optional, default=1.0) The line width to use.
|
|
414
|
-
* @return {
|
|
485
|
+
* @return {R}
|
|
415
486
|
* @instance
|
|
416
487
|
* @memberof DrawLib
|
|
417
488
|
*/
|
|
@@ -422,24 +493,29 @@ export interface DrawLib<R> {
|
|
|
422
493
|
* @method polygon
|
|
423
494
|
* @param {Polygon} polygon - The polygon to draw.
|
|
424
495
|
* @param {string} color - The CSS color to draw the polygon with.
|
|
425
|
-
* @
|
|
496
|
+
* @param {number=} lineWidth - The line width to draw this polygon with.
|
|
497
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
498
|
+
*
|
|
499
|
+
* @return {R}
|
|
426
500
|
* @instance
|
|
427
501
|
* @memberof DrawLib
|
|
428
502
|
*/
|
|
429
|
-
polygon: (polygon: Polygon, color: string, lineWidth?: number) => R;
|
|
503
|
+
polygon: (polygon: Polygon, color: string, lineWidth?: number, strokeOptions?: StrokeOptions) => R;
|
|
430
504
|
/**
|
|
431
505
|
* Draw a polygon line (alternative function to the polygon).
|
|
432
506
|
*
|
|
433
507
|
* @method polyline
|
|
434
|
-
* @param {
|
|
508
|
+
* @param {XYCoords[]} vertices - The polygon vertices to draw.
|
|
435
509
|
* @param {boolan} isOpen - If true the polyline will not be closed at its end.
|
|
436
510
|
* @param {string} color - The CSS color to draw the polygon with.
|
|
437
511
|
* @param {number=} lineWidth - (optional) The line width to use; default is 1.
|
|
438
|
-
* @
|
|
512
|
+
* @param {StrokeOptions=} strokeOptions - (optional) Stroke settings to use.
|
|
513
|
+
*
|
|
514
|
+
* @return {R}
|
|
439
515
|
* @instance
|
|
440
516
|
* @memberof DrawLib
|
|
441
517
|
*/
|
|
442
|
-
polyline: (vertices: Array<
|
|
518
|
+
polyline: (vertices: Array<XYCoords>, isOpen: boolean, color: string, lineWidth?: number, strokeOptions?: StrokeOptions) => R;
|
|
443
519
|
/**
|
|
444
520
|
* Draw a text at the given relative position.
|
|
445
521
|
*
|
|
@@ -482,13 +558,16 @@ export interface DrawLib<R> {
|
|
|
482
558
|
* @param {string=null} color - (optional) The color to draw this path with (default is null).
|
|
483
559
|
* @param {number=1} lineWidth - (optional) the line width to use (default is 1).
|
|
484
560
|
* @param {boolean=false} options.inplace - (optional) If set to true then path transforamtions (scale and translate) will be done in-place in the array. This can boost the performance.
|
|
561
|
+
* @param {number=} options.dashOffset - See `StrokeOptions`.
|
|
562
|
+
* @param {number[]=} options.dashArray - See `StrokeOptions`.
|
|
563
|
+
*
|
|
485
564
|
* @instance
|
|
486
565
|
* @memberof DrawLib
|
|
487
566
|
* @return {R} An instance representing the drawn path.
|
|
488
567
|
*/
|
|
489
568
|
path: (pathData: SVGPathParams, color?: string, lineWidth?: number, options?: {
|
|
490
569
|
inplace?: boolean;
|
|
491
|
-
}) => R;
|
|
570
|
+
} & StrokeOptions) => R;
|
|
492
571
|
/**
|
|
493
572
|
* Due to gl compatibility there is a generic 'clear' function required
|
|
494
573
|
* to avoid accessing the context object itself directly.
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
* @modified 2022-02-03 Added the `lineWidth` param to the `crosshair` function.
|
|
19
19
|
* @modified 2022-02-03 Added the `cross(...)` function.
|
|
20
20
|
* @modified 2022-07-26 Adding `alpha` to the `image(...)` function.
|
|
21
|
+
* @modified 2023-02-10 The methods `setCurrentClassName` and `setCurrentId` also accept `null` now.
|
|
22
|
+
* @modified 2023-09-29 Downgrading all `Vertex` param type to the more generic `XYCoords` type in these render functions: line, arrow, texturedPoly, cubicBezier, cubicBezierPath, handle, handleLine, dot, point, circle, circleArc, ellipse, grid, raster.
|
|
23
|
+
* @modified 2023-09-29 Added the `headLength` parameter to the 'DrawLib.arrow()` function.
|
|
24
|
+
* @modified 2023-09-29 Added the `arrowHead(...)` function to the 'DrawLib.arrow()` interface.
|
|
25
|
+
* @modified 2023-09-29 Added the `cubicBezierArrow(...)` function to the 'DrawLib.arrow()` interface.
|
|
26
|
+
* @modified 2023-09-29 Added the `lineDashes` attribute.
|
|
27
|
+
* @modified 2023-09-30 Adding `strokeOptions` param to these draw function: line, arrow, cubicBezierArrow, cubicBezier, cubicBezierPath, circle, circleArc, ellipse, square, rect, polygon, polyline.
|
|
21
28
|
**/
|
|
22
29
|
export {};
|
|
23
30
|
//# sourceMappingURL=DrawLib.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawLib.js","sourceRoot":"","sources":["../../ts/interfaces/DrawLib.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"DrawLib.js","sourceRoot":"","sources":["../../ts/interfaces/DrawLib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BI"}
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
* @modified 2022-08-01 Added `title` param to the `PBParams` interface.
|
|
18
18
|
* @modified 2022-10-25 Added `origin` param to the `DrawConfig` interface.
|
|
19
19
|
* @modified 2022-11-23 Added `drawRaster` to the `Config` interface.
|
|
20
|
+
* @modified 2023-02-10 All non-function attributes of the `Config` interface are now mandatory.
|
|
21
|
+
* @modified 2023-09-29 Added the `randomPoint(...)` function declaration to the IBounds interface.
|
|
20
22
|
**/
|
|
21
23
|
import { Vertex } from "../Vertex";
|
|
22
24
|
import { Vector } from "../Vector";
|
|
@@ -62,6 +64,16 @@ export interface IBounds {
|
|
|
62
64
|
min: XYCoords;
|
|
63
65
|
max: XYCoords;
|
|
64
66
|
getCenter(): Vertex;
|
|
67
|
+
/**
|
|
68
|
+
* Generate a random point inside this bounds object. Safe areas at the border to avoid
|
|
69
|
+
* included.
|
|
70
|
+
*
|
|
71
|
+
* @method randomPoint
|
|
72
|
+
* @param {horizontalSafeArea} - (optional) The horizonal (left and right) safe area. No vertex will be created here. Can be used as percent in (0.0 ... 0.1) interval.
|
|
73
|
+
* @param {verticalSafeArea} - (optional) The vertical (top and bottom) safe area. No vertex will be created here. Can be used as percent in (0.0 ... 0.1) interval
|
|
74
|
+
* @returns {Vertex} A pseudo random point inside these bounds.
|
|
75
|
+
*/
|
|
76
|
+
randomPoint: (horizontalSafeArea?: number, verticalSafeArea?: number) => Vertex;
|
|
65
77
|
}
|
|
66
78
|
/**
|
|
67
79
|
* The types that can be drawn and thus added to the draw queue.
|
|
@@ -81,44 +93,46 @@ export interface CanvasWrapper {
|
|
|
81
93
|
/**
|
|
82
94
|
* The config that's used by PB.
|
|
83
95
|
*/
|
|
84
|
-
export interface Config {
|
|
85
|
-
canvas: HTMLCanvasElement | string;
|
|
86
|
-
fullSize
|
|
87
|
-
fitToParent
|
|
88
|
-
scaleX
|
|
89
|
-
scaleY
|
|
90
|
-
offsetX
|
|
91
|
-
offsetY
|
|
92
|
-
rasterGrid
|
|
93
|
-
drawRaster
|
|
94
|
-
rasterScaleX
|
|
95
|
-
rasterScaleY
|
|
96
|
-
rasterAdjustFactor
|
|
97
|
-
drawOrigin
|
|
98
|
-
autoAdjustOffset
|
|
99
|
-
offsetAdjustXPercent
|
|
100
|
-
offsetAdjustYPercent
|
|
101
|
-
defaultCanvasWidth
|
|
102
|
-
defaultCanvasHeight
|
|
103
|
-
canvasWidthFactor
|
|
104
|
-
canvasHeightFactor
|
|
105
|
-
cssScaleX
|
|
106
|
-
cssScaleY
|
|
107
|
-
cssUniformScale
|
|
108
|
-
backgroundColor
|
|
109
|
-
redrawOnResize
|
|
96
|
+
export interface Config extends Record<string, boolean | number | string | Function | HTMLCanvasElement | SVGElement | undefined> {
|
|
97
|
+
canvas: HTMLCanvasElement | SVGElement | string;
|
|
98
|
+
fullSize: boolean;
|
|
99
|
+
fitToParent: boolean;
|
|
100
|
+
scaleX: number;
|
|
101
|
+
scaleY: number;
|
|
102
|
+
offsetX: number;
|
|
103
|
+
offsetY: number;
|
|
104
|
+
rasterGrid: boolean;
|
|
105
|
+
drawRaster: boolean;
|
|
106
|
+
rasterScaleX: number;
|
|
107
|
+
rasterScaleY: number;
|
|
108
|
+
rasterAdjustFactor: number;
|
|
109
|
+
drawOrigin: boolean;
|
|
110
|
+
autoAdjustOffset: boolean;
|
|
111
|
+
offsetAdjustXPercent: number;
|
|
112
|
+
offsetAdjustYPercent: number;
|
|
113
|
+
defaultCanvasWidth: number;
|
|
114
|
+
defaultCanvasHeight: number;
|
|
115
|
+
canvasWidthFactor: number;
|
|
116
|
+
canvasHeightFactor: number;
|
|
117
|
+
cssScaleX: number;
|
|
118
|
+
cssScaleY: number;
|
|
119
|
+
cssUniformScale: boolean;
|
|
120
|
+
backgroundColor: string;
|
|
121
|
+
redrawOnResize: boolean;
|
|
110
122
|
preClear?: () => void;
|
|
111
123
|
preDraw?: (draw: DrawLib<any>, fill: DrawLib<any>) => void;
|
|
112
124
|
postDraw?: (draw: DrawLib<any>, fill: DrawLib<any>) => void;
|
|
113
|
-
enableMouse
|
|
114
|
-
enableTouch
|
|
115
|
-
enableKeys
|
|
116
|
-
enableMouseWheel
|
|
125
|
+
enableMouse: boolean;
|
|
126
|
+
enableTouch: boolean;
|
|
127
|
+
enableKeys: boolean;
|
|
128
|
+
enableMouseWheel: boolean;
|
|
129
|
+
enableZoom: boolean;
|
|
130
|
+
enablePan: boolean;
|
|
117
131
|
enableGL?: boolean;
|
|
118
|
-
enableSVGExport
|
|
132
|
+
enableSVGExport: boolean;
|
|
119
133
|
saveFile?: () => void;
|
|
120
134
|
setToRetina?: () => void;
|
|
121
|
-
autoDetectRetina
|
|
135
|
+
autoDetectRetina: boolean;
|
|
122
136
|
}
|
|
123
137
|
/**
|
|
124
138
|
* For initialization the constructor needs a mix of config and draw-settings.
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
* @modified 2022-08-01 Added `title` param to the `PBParams` interface.
|
|
18
18
|
* @modified 2022-10-25 Added `origin` param to the `DrawConfig` interface.
|
|
19
19
|
* @modified 2022-11-23 Added `drawRaster` to the `Config` interface.
|
|
20
|
+
* @modified 2023-02-10 All non-function attributes of the `Config` interface are now mandatory.
|
|
21
|
+
* @modified 2023-09-29 Added the `randomPoint(...)` function declaration to the IBounds interface.
|
|
20
22
|
**/
|
|
21
23
|
export {};
|
|
22
24
|
//# sourceMappingURL=core.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../ts/interfaces/core.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../ts/interfaces/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;IAqBI"}
|