@ue-too/curve 0.15.0 → 0.16.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 +14 -0
- package/index.js +1772 -2
- package/index.js.map +3 -3
- package/package.json +2 -2
package/b-curve.d.ts
CHANGED
|
@@ -142,6 +142,20 @@ export declare class BCurve {
|
|
|
142
142
|
endPoint: Point;
|
|
143
143
|
endT: number;
|
|
144
144
|
}[];
|
|
145
|
+
/**
|
|
146
|
+
* Get a sequence of circular arcs that approximate the curve.
|
|
147
|
+
*
|
|
148
|
+
* @param errorThreshold - Maximum allowed radial error when fitting an arc.
|
|
149
|
+
* @returns A list of arcs that cover the curve from \(t=0\) to \(t=1\).
|
|
150
|
+
*/
|
|
151
|
+
getArcs(errorThreshold: number): {
|
|
152
|
+
center: Point;
|
|
153
|
+
radius: number;
|
|
154
|
+
startPoint: Point;
|
|
155
|
+
startT: number;
|
|
156
|
+
endPoint: Point;
|
|
157
|
+
endT: number;
|
|
158
|
+
}[];
|
|
145
159
|
findArcStartingAt(errorThreshold: number, low: number): {
|
|
146
160
|
good: boolean;
|
|
147
161
|
arc?: {
|