@ue-too/curve 0.15.0 → 0.17.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/b-curve.d.ts +15 -0
- package/index.js +1777 -2
- package/index.js.map +3 -3
- package/package.json +2 -2
package/b-curve.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export declare class BCurve {
|
|
|
65
65
|
private dControlPoints;
|
|
66
66
|
private arcLengthLUT;
|
|
67
67
|
private _fullLength;
|
|
68
|
+
private static readonly LENGTH_CACHE_MAX_SIZE;
|
|
68
69
|
private lengthCache;
|
|
69
70
|
/**
|
|
70
71
|
* Gets cache statistics for performance monitoring
|
|
@@ -142,6 +143,20 @@ export declare class BCurve {
|
|
|
142
143
|
endPoint: Point;
|
|
143
144
|
endT: number;
|
|
144
145
|
}[];
|
|
146
|
+
/**
|
|
147
|
+
* Get a sequence of circular arcs that approximate the curve.
|
|
148
|
+
*
|
|
149
|
+
* @param errorThreshold - Maximum allowed radial error when fitting an arc.
|
|
150
|
+
* @returns A list of arcs that cover the curve from \(t=0\) to \(t=1\).
|
|
151
|
+
*/
|
|
152
|
+
getArcs(errorThreshold: number): {
|
|
153
|
+
center: Point;
|
|
154
|
+
radius: number;
|
|
155
|
+
startPoint: Point;
|
|
156
|
+
startT: number;
|
|
157
|
+
endPoint: Point;
|
|
158
|
+
endT: number;
|
|
159
|
+
}[];
|
|
145
160
|
findArcStartingAt(errorThreshold: number, low: number): {
|
|
146
161
|
good: boolean;
|
|
147
162
|
arc?: {
|