curvy 1.0.9 → 2.0.0-alpha.2
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/characteristic/index.d.mts +88 -0
- package/dist/characteristic/index.mjs +2 -0
- package/dist/curve/index.d.mts +2 -0
- package/dist/curve/index.mjs +2 -0
- package/dist/interval/index.d.mts +3 -0
- package/dist/interval/index.mjs +3 -0
- package/dist/matrix/index.d.mts +2 -0
- package/dist/matrix/index.mjs +267 -0
- package/dist/matrix/index.mjs.map +1 -0
- package/dist/number.d.mts +280 -0
- package/dist/number.mjs +140 -0
- package/dist/number.mjs.map +1 -0
- package/dist/path/index.d.mts +261 -0
- package/dist/path/index.mjs +325 -0
- package/dist/path/index.mjs.map +1 -0
- package/dist/polynomial/index.d.mts +2 -0
- package/dist/polynomial/index.mjs +3 -0
- package/dist/shared/characteristic-B9nCh_cx.mjs +104 -0
- package/dist/shared/characteristic-B9nCh_cx.mjs.map +1 -0
- package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
- package/dist/shared/cubic-BajUY0JT.d.mts +1100 -0
- package/dist/shared/cubic-CpHAx8cC.mjs +479 -0
- package/dist/shared/cubic-CpHAx8cC.mjs.map +1 -0
- package/dist/shared/interval-05CR6eBf.mjs +421 -0
- package/dist/shared/interval-05CR6eBf.mjs.map +1 -0
- package/dist/shared/interval-Dy-RMEE3.d.mts +533 -0
- package/dist/shared/interval2d-8IBZnUOq.mjs +108 -0
- package/dist/shared/interval2d-8IBZnUOq.mjs.map +1 -0
- package/dist/shared/interval2d-C2id9u31.d.mts +172 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs +440 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs.map +1 -0
- package/dist/shared/matrix4x4-Dm_tSiH1.d.mts +1183 -0
- package/dist/shared/quadratic-CamozcFc.mjs +330 -0
- package/dist/shared/quadratic-CamozcFc.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-B6g97ryJ.d.mts +308 -0
- package/dist/shared/rationalCubic2d-BEgUGSFf.mjs +295 -0
- package/dist/shared/rationalCubic2d-BEgUGSFf.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-Bys2Uory.mjs +695 -0
- package/dist/shared/rationalCubic2d-Bys2Uory.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-DlQfBURs.d.mts +818 -0
- package/dist/shared/solution-CrtLfqEq.mjs +306 -0
- package/dist/shared/solution-CrtLfqEq.mjs.map +1 -0
- package/dist/shared/solution-sNQ-ZVhN.d.mts +251 -0
- package/dist/{pipe.d.mts → shared/utils-MCckigYk.d.mts} +44 -26
- package/dist/shared/vector2-CL1HDdPr.mjs +187 -0
- package/dist/shared/vector2-CL1HDdPr.mjs.map +1 -0
- package/dist/shared/vector2-DPUY3_eA.d.mts +470 -0
- package/dist/shared/vector2.internal-DU_E808S.mjs +97 -0
- package/dist/shared/vector2.internal-DU_E808S.mjs.map +1 -0
- package/dist/shared/vector3-D-tv_aKL.mjs +204 -0
- package/dist/shared/vector3-D-tv_aKL.mjs.map +1 -0
- package/dist/shared/vector3-DqeOZtOB.d.mts +703 -0
- package/dist/shared/vector4-5KbjoHVj.mjs +109 -0
- package/dist/shared/vector4-5KbjoHVj.mjs.map +1 -0
- package/dist/shared/vector4.internal-5XcaX12X.mjs +163 -0
- package/dist/shared/vector4.internal-5XcaX12X.mjs.map +1 -0
- package/dist/solution/index.d.mts +2 -0
- package/dist/solution/index.mjs +2 -0
- package/dist/splines/index.d.mts +701 -0
- package/dist/splines/index.mjs +734 -0
- package/dist/splines/index.mjs.map +1 -0
- package/dist/utils.d.mts +2 -205
- package/dist/utils.mjs +88 -52
- package/dist/utils.mjs.map +1 -1
- package/dist/vector/index.d.mts +3 -0
- package/dist/vector/index.mjs +4 -0
- package/package.json +49 -92
- package/dist/curve/cubic2d.d.mts +0 -109
- package/dist/curve/cubic2d.d.ts +0 -109
- package/dist/curve/cubic2d.mjs +0 -80
- package/dist/curve/cubic2d.mjs.map +0 -1
- package/dist/curve/linear2d.d.mts +0 -94
- package/dist/curve/linear2d.d.ts +0 -94
- package/dist/curve/linear2d.mjs +0 -46
- package/dist/curve/linear2d.mjs.map +0 -1
- package/dist/curve/quadratic2d.d.mts +0 -117
- package/dist/curve/quadratic2d.d.ts +0 -117
- package/dist/curve/quadratic2d.mjs +0 -82
- package/dist/curve/quadratic2d.mjs.map +0 -1
- package/dist/interval.d.mts +0 -251
- package/dist/interval.d.ts +0 -251
- package/dist/interval.mjs +0 -86
- package/dist/interval.mjs.map +0 -1
- package/dist/matrix/matrix2x2.d.mts +0 -320
- package/dist/matrix/matrix2x2.d.ts +0 -320
- package/dist/matrix/matrix2x2.mjs +0 -25
- package/dist/matrix/matrix2x2.mjs.map +0 -1
- package/dist/matrix/matrix3x3.d.mts +0 -370
- package/dist/matrix/matrix3x3.d.ts +0 -370
- package/dist/matrix/matrix3x3.mjs +0 -28
- package/dist/matrix/matrix3x3.mjs.map +0 -1
- package/dist/matrix/matrix4x4.d.mts +0 -381
- package/dist/matrix/matrix4x4.d.ts +0 -381
- package/dist/matrix/matrix4x4.mjs +0 -178
- package/dist/matrix/matrix4x4.mjs.map +0 -1
- package/dist/path/cubic2d.d.mts +0 -95
- package/dist/path/cubic2d.d.ts +0 -95
- package/dist/path/cubic2d.mjs +0 -60
- package/dist/path/cubic2d.mjs.map +0 -1
- package/dist/path/linear2d.d.mts +0 -95
- package/dist/path/linear2d.d.ts +0 -95
- package/dist/path/linear2d.mjs +0 -53
- package/dist/path/linear2d.mjs.map +0 -1
- package/dist/path/quadratic2d.d.mts +0 -95
- package/dist/path/quadratic2d.d.ts +0 -95
- package/dist/path/quadratic2d.mjs +0 -57
- package/dist/path/quadratic2d.mjs.map +0 -1
- package/dist/pipe.d.ts +0 -58
- package/dist/pipe.mjs +0 -92
- package/dist/pipe.mjs.map +0 -1
- package/dist/polynomial/cubic.d.mts +0 -7
- package/dist/polynomial/cubic.d.ts +0 -7
- package/dist/polynomial/cubic.mjs +0 -133
- package/dist/polynomial/cubic.mjs.map +0 -1
- package/dist/polynomial/linear.d.mts +0 -7
- package/dist/polynomial/linear.d.ts +0 -7
- package/dist/polynomial/linear.mjs +0 -24
- package/dist/polynomial/linear.mjs.map +0 -1
- package/dist/polynomial/quadratic.d.mts +0 -7
- package/dist/polynomial/quadratic.d.ts +0 -7
- package/dist/polynomial/quadratic.mjs +0 -27
- package/dist/polynomial/quadratic.mjs.map +0 -1
- package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
- package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
- package/dist/shared/curvy.BkkW8Tx9.mjs +0 -102
- package/dist/shared/curvy.BkkW8Tx9.mjs.map +0 -1
- package/dist/shared/curvy.BxdGW9he.mjs +0 -116
- package/dist/shared/curvy.BxdGW9he.mjs.map +0 -1
- package/dist/shared/curvy.C_sCeg9J.mjs +0 -66
- package/dist/shared/curvy.C_sCeg9J.mjs.map +0 -1
- package/dist/shared/curvy.Cg8lZVUz.d.ts +0 -688
- package/dist/shared/curvy.DCt1gGII.mjs +0 -147
- package/dist/shared/curvy.DCt1gGII.mjs.map +0 -1
- package/dist/shared/curvy.DJ4xO0al.mjs +0 -63
- package/dist/shared/curvy.DJ4xO0al.mjs.map +0 -1
- package/dist/shared/curvy.DmVFTi0N.mjs +0 -35
- package/dist/shared/curvy.DmVFTi0N.mjs.map +0 -1
- package/dist/shared/curvy.FDaj5rlj.d.mts +0 -688
- package/dist/shared/curvy.lktriTpx.mjs +0 -101
- package/dist/shared/curvy.lktriTpx.mjs.map +0 -1
- package/dist/shared/curvy.mLFprrGm.mjs +0 -85
- package/dist/shared/curvy.mLFprrGm.mjs.map +0 -1
- package/dist/shared/curvy.r6f1j287.mjs +0 -76
- package/dist/shared/curvy.r6f1j287.mjs.map +0 -1
- package/dist/splines/basis2d.d.mts +0 -130
- package/dist/splines/basis2d.d.ts +0 -130
- package/dist/splines/basis2d.mjs +0 -90
- package/dist/splines/basis2d.mjs.map +0 -1
- package/dist/splines/bezier2d.d.mts +0 -182
- package/dist/splines/bezier2d.d.ts +0 -182
- package/dist/splines/bezier2d.mjs +0 -23
- package/dist/splines/bezier2d.mjs.map +0 -1
- package/dist/splines/cardinal2d.d.mts +0 -178
- package/dist/splines/cardinal2d.d.ts +0 -178
- package/dist/splines/cardinal2d.mjs +0 -114
- package/dist/splines/cardinal2d.mjs.map +0 -1
- package/dist/splines/hermite2d.d.mts +0 -124
- package/dist/splines/hermite2d.d.ts +0 -124
- package/dist/splines/hermite2d.mjs +0 -63
- package/dist/splines/hermite2d.mjs.map +0 -1
- package/dist/utils.d.ts +0 -205
- package/dist/vector/vector2.d.mts +0 -324
- package/dist/vector/vector2.d.ts +0 -324
- package/dist/vector/vector2.mjs +0 -30
- package/dist/vector/vector2.mjs.map +0 -1
- package/dist/vector/vector3.d.mts +0 -417
- package/dist/vector/vector3.d.ts +0 -417
- package/dist/vector/vector3.mjs +0 -38
- package/dist/vector/vector3.mjs.map +0 -1
- package/dist/vector/vector4.d.mts +0 -205
- package/dist/vector/vector4.d.ts +0 -205
- package/dist/vector/vector4.mjs +0 -20
- package/dist/vector/vector4.mjs.map +0 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { t as Vector2 } from "../shared/vector2-DPUY3_eA.mjs";
|
|
2
|
+
import { t as Pipeable } from "../shared/utils-MCckigYk.mjs";
|
|
3
|
+
import { n as Closed } from "../shared/interval-Dy-RMEE3.mjs";
|
|
4
|
+
import { t as Interval2d } from "../shared/interval2d-C2id9u31.mjs";
|
|
5
|
+
import { a as QuadraticCurve2d, s as LinearCurve2d } from "../shared/rationalCubic2d-DlQfBURs.mjs";
|
|
6
|
+
import { a as Continuous, i as cubic2d_d_exports, n as rationalCubic2d_d_exports, o as PathTraits } from "../shared/rationalCubic2d-B6g97ryJ.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/path/linear2d.internal.d.ts
|
|
9
|
+
declare const LinearPath2dTypeId: unique symbol;
|
|
10
|
+
type LinearPath2dTypeId = typeof LinearPath2dTypeId;
|
|
11
|
+
declare namespace linear2d_d_exports {
|
|
12
|
+
export { Continuous, LinearPath2d, append$1 as append, asContinuous$1 as asContinuous, boundingBox$1 as boundingBox, fromArray$1 as fromArray, isContinuous$1 as isContinuous, isLinearPath2d, length$1 as length, make$1 as make, solve$1 as solve, toPathData$1 as toPathData };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A linear path in 2D space.
|
|
16
|
+
*
|
|
17
|
+
* All fields are readonly and immutable, and all operations create new instances.
|
|
18
|
+
*
|
|
19
|
+
* The `Trait` type parameter accumulates trait brands as the path is refined
|
|
20
|
+
* via `isContinuous` / `asContinuous`. A `Continuous` path's `toPathData`
|
|
21
|
+
* skips the per-segment discontinuity check.
|
|
22
|
+
*
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
*/
|
|
25
|
+
interface LinearPath2d<out Trait = unknown> extends Pipeable, Iterable<LinearCurve2d> {
|
|
26
|
+
readonly [LinearPath2dTypeId]: LinearPath2dTypeId;
|
|
27
|
+
readonly [PathTraits]: Trait;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new `LinearPath2d` instance from a sequence of curves.
|
|
31
|
+
*
|
|
32
|
+
* @param curves - The curves to create the path from.
|
|
33
|
+
* @returns A new `LinearPath2d` instance.
|
|
34
|
+
* @since 2.0.0
|
|
35
|
+
*/
|
|
36
|
+
declare const make$1: (...curves: ReadonlyArray<LinearCurve2d>) => LinearPath2d;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new `LinearPath2d` instance from an array of curves.
|
|
39
|
+
*
|
|
40
|
+
* @param curves - The curves to create the path from.
|
|
41
|
+
* @returns A new `LinearPath2d` instance.
|
|
42
|
+
* @since 2.0.0
|
|
43
|
+
*/
|
|
44
|
+
declare const fromArray$1: (curves: ReadonlyArray<LinearCurve2d>) => LinearPath2d;
|
|
45
|
+
/**
|
|
46
|
+
* Checks if a value is a `LinearPath2d`.
|
|
47
|
+
*
|
|
48
|
+
* @param p - The value to check.
|
|
49
|
+
* @returns `true` if the value is a `LinearPath2d`, `false` otherwise.
|
|
50
|
+
* @since 1.0.0
|
|
51
|
+
*/
|
|
52
|
+
declare const isLinearPath2d: (p: unknown) => p is LinearPath2d;
|
|
53
|
+
declare const append$1: {
|
|
54
|
+
/**
|
|
55
|
+
* Appends a linear curve to a linear path.
|
|
56
|
+
*
|
|
57
|
+
* @param c - The linear curve to append.
|
|
58
|
+
* @returns A function that takes a linear path and returns a new linear path.
|
|
59
|
+
* @since 1.0.0
|
|
60
|
+
*/
|
|
61
|
+
(c: LinearCurve2d): (p: LinearPath2d) => LinearPath2d;
|
|
62
|
+
/**
|
|
63
|
+
* Appends a linear curve to a linear path.
|
|
64
|
+
*
|
|
65
|
+
* @param p - The linear path to append to.
|
|
66
|
+
* @param c - The linear curve to append.
|
|
67
|
+
* @returns A new `LinearPath2d` instance with the appended curve.
|
|
68
|
+
* @since 1.0.0
|
|
69
|
+
*/
|
|
70
|
+
(p: LinearPath2d, c: LinearCurve2d): LinearPath2d;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Calculates the length of a linear path.
|
|
74
|
+
*
|
|
75
|
+
* @param p - The linear path to calculate the length of.
|
|
76
|
+
* @returns The length of the linear path.
|
|
77
|
+
* @since 1.0.0
|
|
78
|
+
*/
|
|
79
|
+
declare const length$1: (p: LinearPath2d) => number;
|
|
80
|
+
declare const solve$1: {
|
|
81
|
+
/**
|
|
82
|
+
* Solves a linear path for a given parameter.
|
|
83
|
+
*
|
|
84
|
+
* @param u - The parameter to solve for.
|
|
85
|
+
* @returns A function that takes a linear path and returns the solved point.
|
|
86
|
+
* @since 1.0.0
|
|
87
|
+
*/
|
|
88
|
+
(u: number): (p: LinearPath2d) => Vector2;
|
|
89
|
+
/**
|
|
90
|
+
* Solves a linear path for a given parameter.
|
|
91
|
+
*
|
|
92
|
+
* @param p - The linear path to solve.
|
|
93
|
+
* @param u - The parameter to solve for.
|
|
94
|
+
* @returns The solved point on the linear path.
|
|
95
|
+
* @since 1.0.0
|
|
96
|
+
*/
|
|
97
|
+
(p: LinearPath2d, u: number): Vector2;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Serializes a linear path as an SVG path data string (the value of a `<path>`
|
|
101
|
+
* element's `d` attribute), using `M` and `L` commands. Discontinuities between
|
|
102
|
+
* curves emit a fresh `M` command.
|
|
103
|
+
*
|
|
104
|
+
* @param p - The linear path to serialize.
|
|
105
|
+
* @returns The SVG path data string.
|
|
106
|
+
* @since 2.0.0
|
|
107
|
+
*/
|
|
108
|
+
declare const toPathData$1: (p: LinearPath2d) => string;
|
|
109
|
+
/**
|
|
110
|
+
* Type-narrowing predicate: refines `LinearPath2d<T>` to
|
|
111
|
+
* `LinearPath2d<T & Continuous>` when adjacent curves connect at their join
|
|
112
|
+
* points.
|
|
113
|
+
*
|
|
114
|
+
* @param p - The linear path to check.
|
|
115
|
+
* @returns `true` when the path is continuous (G⁰).
|
|
116
|
+
* @since 2.0.0
|
|
117
|
+
*/
|
|
118
|
+
declare const isContinuous$1: <T>(p: LinearPath2d<T>) => p is LinearPath2d<T & Continuous>;
|
|
119
|
+
/**
|
|
120
|
+
* Asserts that the linear path is continuous, throwing on failure.
|
|
121
|
+
*
|
|
122
|
+
* @param p - The linear path to assert against.
|
|
123
|
+
* @returns The same path, typed with the `Continuous` brand.
|
|
124
|
+
* @throws When the path has a discontinuity between adjacent curves.
|
|
125
|
+
* @since 2.0.0
|
|
126
|
+
*/
|
|
127
|
+
declare const asContinuous$1: <T>(p: LinearPath2d<T>) => LinearPath2d<T & Continuous>;
|
|
128
|
+
/**
|
|
129
|
+
* Computes the axis-aligned bounding box of the path — the smallest closed
|
|
130
|
+
* `Box2d` enclosing every segment.
|
|
131
|
+
*
|
|
132
|
+
* @param p - The linear path.
|
|
133
|
+
* @returns A closed `Box2d` enclosing the path.
|
|
134
|
+
* @since 2.1.0
|
|
135
|
+
*/
|
|
136
|
+
declare const boundingBox$1: (p: LinearPath2d) => Interval2d<Closed, Closed>;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/path/quadratic2d.internal.d.ts
|
|
139
|
+
declare const QuadraticPath2dTypeId: unique symbol;
|
|
140
|
+
type QuadraticPath2dTypeId = typeof QuadraticPath2dTypeId;
|
|
141
|
+
declare namespace quadratic2d_d_exports {
|
|
142
|
+
export { Continuous, QuadraticPath2d, append, asContinuous, boundingBox, fromArray, isContinuous, isQuadraticPath2d, length, make, solve, toPathData };
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* A quadratic path in 2D space.
|
|
146
|
+
*
|
|
147
|
+
* All fields are readonly and immutable, and all operations create new instances.
|
|
148
|
+
*
|
|
149
|
+
* The `Trait` type parameter accumulates trait brands as the path is refined
|
|
150
|
+
* via `isContinuous` / `asContinuous`.
|
|
151
|
+
*
|
|
152
|
+
* @since 1.0.0
|
|
153
|
+
*/
|
|
154
|
+
interface QuadraticPath2d<out Trait = unknown> extends Pipeable, Iterable<QuadraticCurve2d> {
|
|
155
|
+
readonly [QuadraticPath2dTypeId]: QuadraticPath2dTypeId;
|
|
156
|
+
readonly [PathTraits]: Trait;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Creates a new `QuadraticPath2d` instance from a sequence of curves.
|
|
160
|
+
*
|
|
161
|
+
* @param curves - The curves to create the path from.
|
|
162
|
+
* @returns A new `QuadraticPath2d` instance.
|
|
163
|
+
* @since 2.0.0
|
|
164
|
+
*/
|
|
165
|
+
declare const make: (...curves: ReadonlyArray<QuadraticCurve2d>) => QuadraticPath2d;
|
|
166
|
+
/**
|
|
167
|
+
* Creates a new `QuadraticPath2d` instance from an array of curves.
|
|
168
|
+
*
|
|
169
|
+
* @param curves - The curves to create the path from.
|
|
170
|
+
* @returns A new `QuadraticPath2d` instance.
|
|
171
|
+
* @since 2.0.0
|
|
172
|
+
*/
|
|
173
|
+
declare const fromArray: (curves: ReadonlyArray<QuadraticCurve2d>) => QuadraticPath2d;
|
|
174
|
+
/**
|
|
175
|
+
* Checks if a value is a `QuadraticPath2d`.
|
|
176
|
+
*
|
|
177
|
+
* @param p - The value to check.
|
|
178
|
+
* @returns `true` if the value is a `QuadraticPath2d`, `false` otherwise.
|
|
179
|
+
* @since 1.0.0
|
|
180
|
+
*/
|
|
181
|
+
declare const isQuadraticPath2d: (p: unknown) => p is QuadraticPath2d;
|
|
182
|
+
declare const append: {
|
|
183
|
+
/**
|
|
184
|
+
* Appends a quadratic curve to a quadratic path.
|
|
185
|
+
*
|
|
186
|
+
* @param c - The quadratic curve to append.
|
|
187
|
+
* @returns A function that takes a quadratic path and returns a new quadratic path.
|
|
188
|
+
* @since 1.0.0
|
|
189
|
+
*/
|
|
190
|
+
(c: QuadraticCurve2d): (p: QuadraticPath2d) => QuadraticPath2d;
|
|
191
|
+
/**
|
|
192
|
+
* Appends a quadratic curve to a quadratic path.
|
|
193
|
+
*
|
|
194
|
+
* @param p - The quadratic path to append to.
|
|
195
|
+
* @param c - The quadratic curve to append.
|
|
196
|
+
* @returns A new `QuadraticPath2d` instance with the appended curve.
|
|
197
|
+
* @since 1.0.0
|
|
198
|
+
*/
|
|
199
|
+
(p: QuadraticPath2d, c: QuadraticCurve2d): QuadraticPath2d;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Calculates the length of a quadratic path.
|
|
203
|
+
*
|
|
204
|
+
* @param p - The quadratic path to calculate the length of.
|
|
205
|
+
* @returns The length of the path.
|
|
206
|
+
*/
|
|
207
|
+
declare const length: (p: QuadraticPath2d) => number;
|
|
208
|
+
declare const solve: {
|
|
209
|
+
/**
|
|
210
|
+
* Solves a quadratic path at a given parameter.
|
|
211
|
+
*
|
|
212
|
+
* @param u - The parameter to solve for.
|
|
213
|
+
* @returns A function that takes a quadratic path and returns the solved point.
|
|
214
|
+
* @since 1.0.0
|
|
215
|
+
*/
|
|
216
|
+
(u: number): (p: QuadraticPath2d) => Vector2;
|
|
217
|
+
/**
|
|
218
|
+
* Solves a quadratic path at a given parameter.
|
|
219
|
+
*
|
|
220
|
+
* @param p - The quadratic path to solve.
|
|
221
|
+
* @param u - The parameter to solve for.
|
|
222
|
+
* @returns The solved point.
|
|
223
|
+
* @since 1.0.0
|
|
224
|
+
*/
|
|
225
|
+
(p: QuadraticPath2d, u: number): Vector2;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Serializes a quadratic path as an SVG path data string (the value of a
|
|
229
|
+
* `<path>` element's `d` attribute), using `M` and `Q` commands. Discontinuities
|
|
230
|
+
* between curves emit a fresh `M` command.
|
|
231
|
+
*
|
|
232
|
+
* @param p - The quadratic path to serialize.
|
|
233
|
+
* @returns The SVG path data string.
|
|
234
|
+
* @since 2.0.0
|
|
235
|
+
*/
|
|
236
|
+
declare const toPathData: (p: QuadraticPath2d) => string;
|
|
237
|
+
/**
|
|
238
|
+
* Type-narrowing predicate: refines `QuadraticPath2d<T>` to
|
|
239
|
+
* `QuadraticPath2d<T & Continuous>` when adjacent curves connect.
|
|
240
|
+
*
|
|
241
|
+
* @since 2.0.0
|
|
242
|
+
*/
|
|
243
|
+
declare const isContinuous: <T>(p: QuadraticPath2d<T>) => p is QuadraticPath2d<T & Continuous>;
|
|
244
|
+
/**
|
|
245
|
+
* Asserts that the quadratic path is continuous, throwing on failure.
|
|
246
|
+
*
|
|
247
|
+
* @since 2.0.0
|
|
248
|
+
*/
|
|
249
|
+
declare const asContinuous: <T>(p: QuadraticPath2d<T>) => QuadraticPath2d<T & Continuous>;
|
|
250
|
+
/**
|
|
251
|
+
* Computes the axis-aligned bounding box of the path — the smallest closed
|
|
252
|
+
* `Box2d` enclosing every segment.
|
|
253
|
+
*
|
|
254
|
+
* @param p - The quadratic path.
|
|
255
|
+
* @returns A closed `Box2d` enclosing the path.
|
|
256
|
+
* @since 2.1.0
|
|
257
|
+
*/
|
|
258
|
+
declare const boundingBox: (p: QuadraticPath2d) => Interval2d<Closed, Closed>;
|
|
259
|
+
//#endregion
|
|
260
|
+
export { cubic2d_d_exports as CubicPath2d, linear2d_d_exports as LinearPath2d, quadratic2d_d_exports as QuadraticPath2d, rationalCubic2d_d_exports as RationalCubicPath2d };
|
|
261
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { t as __exportAll } from "../shared/chunk-25Hzd3z8.mjs";
|
|
2
|
+
import { Pipeable, dual, invariant } from "../utils.mjs";
|
|
3
|
+
import { epsEquals } from "../number.mjs";
|
|
4
|
+
import { p as unit } from "../shared/interval-05CR6eBf.mjs";
|
|
5
|
+
import { r as union } from "../shared/interval2d-8IBZnUOq.mjs";
|
|
6
|
+
import { d as boundingBox$5, f as length$5, g as length$4, h as boundingBox$4, m as solve$5, v as solve$4 } from "../shared/rationalCubic2d-Bys2Uory.mjs";
|
|
7
|
+
import { n as rationalCubic2d_exports, r as cubic2d_exports } from "../shared/rationalCubic2d-BEgUGSFf.mjs";
|
|
8
|
+
//#region src/path/linear2d.internal.ts
|
|
9
|
+
const LinearPath2dTypeId = Symbol("curvy/path/linear2d");
|
|
10
|
+
var LinearPath2dImpl = class extends Pipeable {
|
|
11
|
+
[LinearPath2dTypeId] = LinearPath2dTypeId;
|
|
12
|
+
curves;
|
|
13
|
+
constructor(curves) {
|
|
14
|
+
super();
|
|
15
|
+
this.curves = curves;
|
|
16
|
+
}
|
|
17
|
+
[Symbol.iterator]() {
|
|
18
|
+
return this.curves[Symbol.iterator]();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const isLinearPath2d$1 = (p) => typeof p === "object" && p !== null && LinearPath2dTypeId in p;
|
|
22
|
+
const make$3 = (...curves) => new LinearPath2dImpl(curves);
|
|
23
|
+
const fromArray$3 = (curves) => new LinearPath2dImpl(curves);
|
|
24
|
+
const append$3 = dual(2, (p, c) => fromArray$3([...p, c]));
|
|
25
|
+
const length$3 = (p) => {
|
|
26
|
+
let total = 0;
|
|
27
|
+
for (const curve of p) total += length$4(curve, unit);
|
|
28
|
+
return total;
|
|
29
|
+
};
|
|
30
|
+
const solve$3 = dual(2, (p, u) => {
|
|
31
|
+
const curves = p instanceof LinearPath2dImpl ? p.curves : [...p];
|
|
32
|
+
if (u === 1) return solve$4(curves.at(-1), 1);
|
|
33
|
+
const t = u * curves.length;
|
|
34
|
+
const i = Math.floor(t);
|
|
35
|
+
const curve = curves[i];
|
|
36
|
+
return solve$4(curve, t - i);
|
|
37
|
+
});
|
|
38
|
+
const toPathData$3 = (p) => {
|
|
39
|
+
let result = "";
|
|
40
|
+
let prevEndX = NaN;
|
|
41
|
+
let prevEndY = NaN;
|
|
42
|
+
for (const curve of p) {
|
|
43
|
+
const startX = curve.x.c0;
|
|
44
|
+
const startY = curve.y.c0;
|
|
45
|
+
const endX = curve.x.c0 + curve.x.c1;
|
|
46
|
+
const endY = curve.y.c0 + curve.y.c1;
|
|
47
|
+
if (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY)) result += ` M ${startX},${startY}`;
|
|
48
|
+
result += ` L ${endX},${endY}`;
|
|
49
|
+
prevEndX = endX;
|
|
50
|
+
prevEndY = endY;
|
|
51
|
+
}
|
|
52
|
+
return result.slice(1);
|
|
53
|
+
};
|
|
54
|
+
const isContinuous$3 = (p) => {
|
|
55
|
+
let prevEndX = NaN;
|
|
56
|
+
let prevEndY = NaN;
|
|
57
|
+
let first = true;
|
|
58
|
+
for (const curve of p) {
|
|
59
|
+
const startX = curve.x.c0;
|
|
60
|
+
const startY = curve.y.c0;
|
|
61
|
+
if (!first && (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY))) return false;
|
|
62
|
+
prevEndX = curve.x.c0 + curve.x.c1;
|
|
63
|
+
prevEndY = curve.y.c0 + curve.y.c1;
|
|
64
|
+
first = false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
};
|
|
68
|
+
const asContinuous$3 = (p) => {
|
|
69
|
+
invariant(isContinuous$3(p), "linear path is not continuous");
|
|
70
|
+
return p;
|
|
71
|
+
};
|
|
72
|
+
const boundingBox$3 = (p) => {
|
|
73
|
+
const iter = p[Symbol.iterator]();
|
|
74
|
+
let acc = boundingBox$4(iter.next().value);
|
|
75
|
+
for (let next = iter.next(); !next.done; next = iter.next()) acc = union(acc, boundingBox$4(next.value));
|
|
76
|
+
return acc;
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/path/linear2d.ts
|
|
80
|
+
var linear2d_exports = /* @__PURE__ */ __exportAll({
|
|
81
|
+
append: () => append$2,
|
|
82
|
+
asContinuous: () => asContinuous$2,
|
|
83
|
+
boundingBox: () => boundingBox$2,
|
|
84
|
+
fromArray: () => fromArray$2,
|
|
85
|
+
isContinuous: () => isContinuous$2,
|
|
86
|
+
isLinearPath2d: () => isLinearPath2d,
|
|
87
|
+
length: () => length$2,
|
|
88
|
+
make: () => make$2,
|
|
89
|
+
solve: () => solve$2,
|
|
90
|
+
toPathData: () => toPathData$2
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Creates a new `LinearPath2d` instance from a sequence of curves.
|
|
94
|
+
*
|
|
95
|
+
* @param curves - The curves to create the path from.
|
|
96
|
+
* @returns A new `LinearPath2d` instance.
|
|
97
|
+
* @since 2.0.0
|
|
98
|
+
*/
|
|
99
|
+
const make$2 = make$3;
|
|
100
|
+
/**
|
|
101
|
+
* Creates a new `LinearPath2d` instance from an array of curves.
|
|
102
|
+
*
|
|
103
|
+
* @param curves - The curves to create the path from.
|
|
104
|
+
* @returns A new `LinearPath2d` instance.
|
|
105
|
+
* @since 2.0.0
|
|
106
|
+
*/
|
|
107
|
+
const fromArray$2 = fromArray$3;
|
|
108
|
+
/**
|
|
109
|
+
* Checks if a value is a `LinearPath2d`.
|
|
110
|
+
*
|
|
111
|
+
* @param p - The value to check.
|
|
112
|
+
* @returns `true` if the value is a `LinearPath2d`, `false` otherwise.
|
|
113
|
+
* @since 1.0.0
|
|
114
|
+
*/
|
|
115
|
+
const isLinearPath2d = isLinearPath2d$1;
|
|
116
|
+
const append$2 = append$3;
|
|
117
|
+
/**
|
|
118
|
+
* Calculates the length of a linear path.
|
|
119
|
+
*
|
|
120
|
+
* @param p - The linear path to calculate the length of.
|
|
121
|
+
* @returns The length of the linear path.
|
|
122
|
+
* @since 1.0.0
|
|
123
|
+
*/
|
|
124
|
+
const length$2 = length$3;
|
|
125
|
+
const solve$2 = solve$3;
|
|
126
|
+
/**
|
|
127
|
+
* Serializes a linear path as an SVG path data string (the value of a `<path>`
|
|
128
|
+
* element's `d` attribute), using `M` and `L` commands. Discontinuities between
|
|
129
|
+
* curves emit a fresh `M` command.
|
|
130
|
+
*
|
|
131
|
+
* @param p - The linear path to serialize.
|
|
132
|
+
* @returns The SVG path data string.
|
|
133
|
+
* @since 2.0.0
|
|
134
|
+
*/
|
|
135
|
+
const toPathData$2 = toPathData$3;
|
|
136
|
+
/**
|
|
137
|
+
* Type-narrowing predicate: refines `LinearPath2d<T>` to
|
|
138
|
+
* `LinearPath2d<T & Continuous>` when adjacent curves connect at their join
|
|
139
|
+
* points.
|
|
140
|
+
*
|
|
141
|
+
* @param p - The linear path to check.
|
|
142
|
+
* @returns `true` when the path is continuous (G⁰).
|
|
143
|
+
* @since 2.0.0
|
|
144
|
+
*/
|
|
145
|
+
const isContinuous$2 = isContinuous$3;
|
|
146
|
+
/**
|
|
147
|
+
* Asserts that the linear path is continuous, throwing on failure.
|
|
148
|
+
*
|
|
149
|
+
* @param p - The linear path to assert against.
|
|
150
|
+
* @returns The same path, typed with the `Continuous` brand.
|
|
151
|
+
* @throws When the path has a discontinuity between adjacent curves.
|
|
152
|
+
* @since 2.0.0
|
|
153
|
+
*/
|
|
154
|
+
const asContinuous$2 = asContinuous$3;
|
|
155
|
+
/**
|
|
156
|
+
* Computes the axis-aligned bounding box of the path — the smallest closed
|
|
157
|
+
* `Box2d` enclosing every segment.
|
|
158
|
+
*
|
|
159
|
+
* @param p - The linear path.
|
|
160
|
+
* @returns A closed `Box2d` enclosing the path.
|
|
161
|
+
* @since 2.1.0
|
|
162
|
+
*/
|
|
163
|
+
const boundingBox$2 = boundingBox$3;
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/path/quadratic2d.internal.ts
|
|
166
|
+
const QuadraticPath2dTypeId = Symbol("curvy/path/quadratic2d");
|
|
167
|
+
var QuadraticPath2dImpl = class extends Pipeable {
|
|
168
|
+
[QuadraticPath2dTypeId] = QuadraticPath2dTypeId;
|
|
169
|
+
curves;
|
|
170
|
+
constructor(curves) {
|
|
171
|
+
super();
|
|
172
|
+
this.curves = curves;
|
|
173
|
+
}
|
|
174
|
+
[Symbol.iterator]() {
|
|
175
|
+
return this.curves[Symbol.iterator]();
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const isQuadraticPath2d$1 = (p) => typeof p === "object" && p !== null && QuadraticPath2dTypeId in p;
|
|
179
|
+
const make$1 = (...curves) => new QuadraticPath2dImpl(curves);
|
|
180
|
+
const fromArray$1 = (curves) => new QuadraticPath2dImpl(curves);
|
|
181
|
+
const append$1 = dual(2, (p, c) => fromArray$1([...p, c]));
|
|
182
|
+
const length$1 = (p) => {
|
|
183
|
+
let total = 0;
|
|
184
|
+
for (const curve of p) total += length$5(curve, unit);
|
|
185
|
+
return total;
|
|
186
|
+
};
|
|
187
|
+
const solve$1 = dual(2, (p, u) => {
|
|
188
|
+
const curves = p instanceof QuadraticPath2dImpl ? p.curves : [...p];
|
|
189
|
+
if (u === 1) return solve$5(curves.at(-1), 1);
|
|
190
|
+
const t = u * curves.length;
|
|
191
|
+
const i = Math.floor(t);
|
|
192
|
+
const curve = curves[i];
|
|
193
|
+
return solve$5(curve, t - i);
|
|
194
|
+
});
|
|
195
|
+
const toPathData$1 = (p) => {
|
|
196
|
+
let result = "";
|
|
197
|
+
let prevEndX = NaN;
|
|
198
|
+
let prevEndY = NaN;
|
|
199
|
+
for (const curve of p) {
|
|
200
|
+
const c0x = curve.x.c0;
|
|
201
|
+
const c0y = curve.y.c0;
|
|
202
|
+
const c1x = curve.x.c1;
|
|
203
|
+
const c1y = curve.y.c1;
|
|
204
|
+
const c2x = curve.x.c2;
|
|
205
|
+
const c2y = curve.y.c2;
|
|
206
|
+
const startX = c0x;
|
|
207
|
+
const startY = c0y;
|
|
208
|
+
const ctrlX = c0x + c1x / 2;
|
|
209
|
+
const ctrlY = c0y + c1y / 2;
|
|
210
|
+
const endX = c0x + c1x + c2x;
|
|
211
|
+
const endY = c0y + c1y + c2y;
|
|
212
|
+
if (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY)) result += ` M ${startX},${startY}`;
|
|
213
|
+
result += ` Q ${ctrlX},${ctrlY} ${endX},${endY}`;
|
|
214
|
+
prevEndX = endX;
|
|
215
|
+
prevEndY = endY;
|
|
216
|
+
}
|
|
217
|
+
return result.slice(1);
|
|
218
|
+
};
|
|
219
|
+
const isContinuous$1 = (p) => {
|
|
220
|
+
let prevEndX = NaN;
|
|
221
|
+
let prevEndY = NaN;
|
|
222
|
+
let first = true;
|
|
223
|
+
for (const curve of p) {
|
|
224
|
+
const startX = curve.x.c0;
|
|
225
|
+
const startY = curve.y.c0;
|
|
226
|
+
if (!first && (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY))) return false;
|
|
227
|
+
prevEndX = curve.x.c0 + curve.x.c1 + curve.x.c2;
|
|
228
|
+
prevEndY = curve.y.c0 + curve.y.c1 + curve.y.c2;
|
|
229
|
+
first = false;
|
|
230
|
+
}
|
|
231
|
+
return true;
|
|
232
|
+
};
|
|
233
|
+
const asContinuous$1 = (p) => {
|
|
234
|
+
invariant(isContinuous$1(p), "quadratic path is not continuous");
|
|
235
|
+
return p;
|
|
236
|
+
};
|
|
237
|
+
const boundingBox$1 = (p) => {
|
|
238
|
+
const iter = p[Symbol.iterator]();
|
|
239
|
+
let acc = boundingBox$5(iter.next().value);
|
|
240
|
+
for (let next = iter.next(); !next.done; next = iter.next()) acc = union(acc, boundingBox$5(next.value));
|
|
241
|
+
return acc;
|
|
242
|
+
};
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/path/quadratic2d.ts
|
|
245
|
+
var quadratic2d_exports = /* @__PURE__ */ __exportAll({
|
|
246
|
+
append: () => append,
|
|
247
|
+
asContinuous: () => asContinuous,
|
|
248
|
+
boundingBox: () => boundingBox,
|
|
249
|
+
fromArray: () => fromArray,
|
|
250
|
+
isContinuous: () => isContinuous,
|
|
251
|
+
isQuadraticPath2d: () => isQuadraticPath2d,
|
|
252
|
+
length: () => length,
|
|
253
|
+
make: () => make,
|
|
254
|
+
solve: () => solve,
|
|
255
|
+
toPathData: () => toPathData
|
|
256
|
+
});
|
|
257
|
+
/**
|
|
258
|
+
* Creates a new `QuadraticPath2d` instance from a sequence of curves.
|
|
259
|
+
*
|
|
260
|
+
* @param curves - The curves to create the path from.
|
|
261
|
+
* @returns A new `QuadraticPath2d` instance.
|
|
262
|
+
* @since 2.0.0
|
|
263
|
+
*/
|
|
264
|
+
const make = make$1;
|
|
265
|
+
/**
|
|
266
|
+
* Creates a new `QuadraticPath2d` instance from an array of curves.
|
|
267
|
+
*
|
|
268
|
+
* @param curves - The curves to create the path from.
|
|
269
|
+
* @returns A new `QuadraticPath2d` instance.
|
|
270
|
+
* @since 2.0.0
|
|
271
|
+
*/
|
|
272
|
+
const fromArray = fromArray$1;
|
|
273
|
+
/**
|
|
274
|
+
* Checks if a value is a `QuadraticPath2d`.
|
|
275
|
+
*
|
|
276
|
+
* @param p - The value to check.
|
|
277
|
+
* @returns `true` if the value is a `QuadraticPath2d`, `false` otherwise.
|
|
278
|
+
* @since 1.0.0
|
|
279
|
+
*/
|
|
280
|
+
const isQuadraticPath2d = isQuadraticPath2d$1;
|
|
281
|
+
const append = append$1;
|
|
282
|
+
/**
|
|
283
|
+
* Calculates the length of a quadratic path.
|
|
284
|
+
*
|
|
285
|
+
* @param p - The quadratic path to calculate the length of.
|
|
286
|
+
* @returns The length of the path.
|
|
287
|
+
*/
|
|
288
|
+
const length = length$1;
|
|
289
|
+
const solve = solve$1;
|
|
290
|
+
/**
|
|
291
|
+
* Serializes a quadratic path as an SVG path data string (the value of a
|
|
292
|
+
* `<path>` element's `d` attribute), using `M` and `Q` commands. Discontinuities
|
|
293
|
+
* between curves emit a fresh `M` command.
|
|
294
|
+
*
|
|
295
|
+
* @param p - The quadratic path to serialize.
|
|
296
|
+
* @returns The SVG path data string.
|
|
297
|
+
* @since 2.0.0
|
|
298
|
+
*/
|
|
299
|
+
const toPathData = toPathData$1;
|
|
300
|
+
/**
|
|
301
|
+
* Type-narrowing predicate: refines `QuadraticPath2d<T>` to
|
|
302
|
+
* `QuadraticPath2d<T & Continuous>` when adjacent curves connect.
|
|
303
|
+
*
|
|
304
|
+
* @since 2.0.0
|
|
305
|
+
*/
|
|
306
|
+
const isContinuous = isContinuous$1;
|
|
307
|
+
/**
|
|
308
|
+
* Asserts that the quadratic path is continuous, throwing on failure.
|
|
309
|
+
*
|
|
310
|
+
* @since 2.0.0
|
|
311
|
+
*/
|
|
312
|
+
const asContinuous = asContinuous$1;
|
|
313
|
+
/**
|
|
314
|
+
* Computes the axis-aligned bounding box of the path — the smallest closed
|
|
315
|
+
* `Box2d` enclosing every segment.
|
|
316
|
+
*
|
|
317
|
+
* @param p - The quadratic path.
|
|
318
|
+
* @returns A closed `Box2d` enclosing the path.
|
|
319
|
+
* @since 2.1.0
|
|
320
|
+
*/
|
|
321
|
+
const boundingBox = boundingBox$1;
|
|
322
|
+
//#endregion
|
|
323
|
+
export { cubic2d_exports as CubicPath2d, linear2d_exports as LinearPath2d, quadratic2d_exports as QuadraticPath2d, rationalCubic2d_exports as RationalCubicPath2d };
|
|
324
|
+
|
|
325
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["isLinearPath2d","make","fromArray","append","length","LinearCurve2d.length","Interval.unit","solve","LinearCurve2d.solve","toPathData","isContinuous","asContinuous","boundingBox","LinearCurve2d.boundingBox","Interval2d.union","make","internal.make","fromArray","internal.fromArray","internal.isLinearPath2d","append","internal.append","length","internal.length","solve","internal.solve","toPathData","internal.toPathData","isContinuous","internal.isContinuous","asContinuous","internal.asContinuous","boundingBox","internal.boundingBox","isQuadraticPath2d","make","fromArray","append","length","QuadraticCurve2d.length","Interval.unit","solve","QuadraticCurve2d.solve","toPathData","isContinuous","asContinuous","boundingBox","QuadraticCurve2d.boundingBox","Interval2d.union","internal.make","internal.fromArray","internal.isQuadraticPath2d","internal.append","internal.length","internal.solve","internal.toPathData","internal.isContinuous","internal.asContinuous","internal.boundingBox"],"sources":["../../src/path/linear2d.internal.ts","../../src/path/linear2d.ts","../../src/path/quadratic2d.internal.ts","../../src/path/quadratic2d.ts"],"sourcesContent":["import * as Interval2d from '../interval/interval2d'\nimport * as LinearCurve2d from '../curve/linear2d'\nimport * as Interval from '../interval/interval'\nimport { dual, Pipeable } from '../utils'\nimport { invariant } from '../utils'\nimport { epsEquals } from '../number'\nimport type { Vector2 } from '../vector/vector2'\nimport type { LinearPath2d } from './linear2d'\nimport { PathTraits, type Continuous } from './traits'\n\nexport const LinearPath2dTypeId: unique symbol = Symbol('curvy/path/linear2d')\nexport type LinearPath2dTypeId = typeof LinearPath2dTypeId\n\nexport class LinearPath2dImpl extends Pipeable implements LinearPath2d<unknown> {\n readonly [LinearPath2dTypeId]: LinearPath2dTypeId = LinearPath2dTypeId\n declare readonly [PathTraits]: unknown\n\n readonly curves: ReadonlyArray<LinearCurve2d.LinearCurve2d>\n\n constructor(curves: ReadonlyArray<LinearCurve2d.LinearCurve2d>) {\n super()\n this.curves = curves\n }\n\n [Symbol.iterator](): Iterator<LinearCurve2d.LinearCurve2d> {\n return this.curves[Symbol.iterator]()\n }\n}\n\nexport const isLinearPath2d = (p: unknown): p is LinearPath2d =>\n typeof p === 'object' && p !== null && LinearPath2dTypeId in p\n\nexport const make = (...curves: ReadonlyArray<LinearCurve2d.LinearCurve2d>): LinearPath2d =>\n new LinearPath2dImpl(curves)\n\nexport const fromArray = (curves: ReadonlyArray<LinearCurve2d.LinearCurve2d>) =>\n new LinearPath2dImpl(curves)\n\nexport const append = dual<\n (c: LinearCurve2d.LinearCurve2d) => (p: LinearPath2d) => LinearPath2d,\n (p: LinearPath2d, c: LinearCurve2d.LinearCurve2d) => LinearPath2d\n>(2, (p: LinearPath2d, c: LinearCurve2d.LinearCurve2d) => fromArray([...p, c]))\n\nexport const length = (p: LinearPath2d) => {\n let total = 0\n for (const curve of p) {\n total += LinearCurve2d.length(curve, Interval.unit)\n }\n\n return total\n}\n\nexport const solve = dual<\n (u: number) => (p: LinearPath2d) => Vector2,\n (p: LinearPath2d, u: number) => Vector2\n>(2, (p: LinearPath2d, u: number) => {\n const curves = p instanceof LinearPath2dImpl ? p.curves : [...p]\n\n if (u === 1) {\n const last = curves.at(-1) as LinearCurve2d.LinearCurve2d\n return LinearCurve2d.solve(last, 1)\n }\n\n const t = u * curves.length\n const i = Math.floor(t)\n const curve = curves[i] as LinearCurve2d.LinearCurve2d\n return LinearCurve2d.solve(curve, t - i)\n})\n\nexport const toPathData = (p: LinearPath2d): string => {\n let result = ''\n let prevEndX = Number.NaN\n let prevEndY = Number.NaN\n\n for (const curve of p) {\n const startX = curve.x.c0\n const startY = curve.y.c0\n const endX = curve.x.c0 + curve.x.c1\n const endY = curve.y.c0 + curve.y.c1\n\n if (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY)) {\n result += ` M ${startX},${startY}`\n }\n result += ` L ${endX},${endY}`\n\n prevEndX = endX\n prevEndY = endY\n }\n\n return result.slice(1)\n}\n\nexport const isContinuous = <T>(p: LinearPath2d<T>): p is LinearPath2d<T & Continuous> => {\n let prevEndX = Number.NaN\n let prevEndY = Number.NaN\n let first = true\n\n for (const curve of p) {\n const startX = curve.x.c0\n const startY = curve.y.c0\n if (!first && (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY))) {\n return false\n }\n prevEndX = curve.x.c0 + curve.x.c1\n prevEndY = curve.y.c0 + curve.y.c1\n first = false\n }\n return true\n}\n\nexport const asContinuous = <T>(p: LinearPath2d<T>): LinearPath2d<T & Continuous> => {\n invariant(isContinuous(p), 'linear path is not continuous')\n return p\n}\n\nexport const boundingBox = (\n p: LinearPath2d,\n): Interval2d.Interval2d<Interval.Closed, Interval.Closed> => {\n const iter = p[Symbol.iterator]()\n const first = iter.next()\n // path invariant: at least one curve, so first.value is defined\n let acc = LinearCurve2d.boundingBox(first.value as LinearCurve2d.LinearCurve2d)\n for (let next = iter.next(); !next.done; next = iter.next()) {\n acc = Interval2d.union(acc, LinearCurve2d.boundingBox(next.value))\n }\n return acc\n}\n","import type { Interval2d } from '../interval/interval2d'\nimport type { LinearCurve2d } from '../curve/linear2d'\nimport type { Closed } from '../interval/interval'\nimport type { Pipeable } from '../utils'\nimport type { Vector2 } from '../vector/vector2'\nimport type { LinearPath2dTypeId } from './linear2d.internal'\nimport * as internal from './linear2d.internal'\nimport type { Continuous, PathTraits } from './traits'\n\nexport type { Continuous } from './traits'\n\n/**\n * A linear path in 2D space.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * The `Trait` type parameter accumulates trait brands as the path is refined\n * via `isContinuous` / `asContinuous`. A `Continuous` path's `toPathData`\n * skips the per-segment discontinuity check.\n *\n * @since 1.0.0\n */\nexport interface LinearPath2d<out Trait = unknown> extends Pipeable, Iterable<LinearCurve2d> {\n readonly [LinearPath2dTypeId]: LinearPath2dTypeId\n readonly [PathTraits]: Trait\n}\n\n/**\n * Creates a new `LinearPath2d` instance from a sequence of curves.\n *\n * @param curves - The curves to create the path from.\n * @returns A new `LinearPath2d` instance.\n * @since 2.0.0\n */\nexport const make: (...curves: ReadonlyArray<LinearCurve2d>) => LinearPath2d = internal.make\n\n/**\n * Creates a new `LinearPath2d` instance from an array of curves.\n *\n * @param curves - The curves to create the path from.\n * @returns A new `LinearPath2d` instance.\n * @since 2.0.0\n */\nexport const fromArray: (curves: ReadonlyArray<LinearCurve2d>) => LinearPath2d = internal.fromArray\n\n/**\n * Checks if a value is a `LinearPath2d`.\n *\n * @param p - The value to check.\n * @returns `true` if the value is a `LinearPath2d`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isLinearPath2d: (p: unknown) => p is LinearPath2d = internal.isLinearPath2d\n\nexport const append: {\n /**\n * Appends a linear curve to a linear path.\n *\n * @param c - The linear curve to append.\n * @returns A function that takes a linear path and returns a new linear path.\n * @since 1.0.0\n */\n (c: LinearCurve2d): (p: LinearPath2d) => LinearPath2d\n /**\n * Appends a linear curve to a linear path.\n *\n * @param p - The linear path to append to.\n * @param c - The linear curve to append.\n * @returns A new `LinearPath2d` instance with the appended curve.\n * @since 1.0.0\n */\n (p: LinearPath2d, c: LinearCurve2d): LinearPath2d\n} = internal.append\n\n/**\n * Calculates the length of a linear path.\n *\n * @param p - The linear path to calculate the length of.\n * @returns The length of the linear path.\n * @since 1.0.0\n */\nexport const length: (p: LinearPath2d) => number = internal.length\n\nexport const solve: {\n /**\n * Solves a linear path for a given parameter.\n *\n * @param u - The parameter to solve for.\n * @returns A function that takes a linear path and returns the solved point.\n * @since 1.0.0\n */\n (u: number): (p: LinearPath2d) => Vector2\n /**\n * Solves a linear path for a given parameter.\n *\n * @param p - The linear path to solve.\n * @param u - The parameter to solve for.\n * @returns The solved point on the linear path.\n * @since 1.0.0\n */\n (p: LinearPath2d, u: number): Vector2\n} = internal.solve\n\n/**\n * Serializes a linear path as an SVG path data string (the value of a `<path>`\n * element's `d` attribute), using `M` and `L` commands. Discontinuities between\n * curves emit a fresh `M` command.\n *\n * @param p - The linear path to serialize.\n * @returns The SVG path data string.\n * @since 2.0.0\n */\nexport const toPathData: (p: LinearPath2d) => string = internal.toPathData\n\n/**\n * Type-narrowing predicate: refines `LinearPath2d<T>` to\n * `LinearPath2d<T & Continuous>` when adjacent curves connect at their join\n * points.\n *\n * @param p - The linear path to check.\n * @returns `true` when the path is continuous (G⁰).\n * @since 2.0.0\n */\nexport const isContinuous: <T>(p: LinearPath2d<T>) => p is LinearPath2d<T & Continuous> =\n internal.isContinuous\n\n/**\n * Asserts that the linear path is continuous, throwing on failure.\n *\n * @param p - The linear path to assert against.\n * @returns The same path, typed with the `Continuous` brand.\n * @throws When the path has a discontinuity between adjacent curves.\n * @since 2.0.0\n */\nexport const asContinuous: <T>(p: LinearPath2d<T>) => LinearPath2d<T & Continuous> =\n internal.asContinuous\n\n/**\n * Computes the axis-aligned bounding box of the path — the smallest closed\n * `Box2d` enclosing every segment.\n *\n * @param p - The linear path.\n * @returns A closed `Box2d` enclosing the path.\n * @since 2.1.0\n */\nexport const boundingBox: (p: LinearPath2d) => Interval2d<Closed, Closed> = internal.boundingBox\n","import * as Interval2d from '../interval/interval2d'\nimport * as QuadraticCurve2d from '../curve/quadratic2d'\nimport * as Interval from '../interval/interval'\nimport { dual, Pipeable } from '../utils'\nimport { invariant } from '../utils'\nimport { epsEquals } from '../number'\nimport type { Vector2 } from '../vector/vector2'\nimport type { QuadraticPath2d } from './quadratic2d'\nimport { PathTraits, type Continuous } from './traits'\n\nexport const QuadraticPath2dTypeId: unique symbol = Symbol('curvy/path/quadratic2d')\nexport type QuadraticPath2dTypeId = typeof QuadraticPath2dTypeId\n\nexport class QuadraticPath2dImpl extends Pipeable implements QuadraticPath2d<unknown> {\n readonly [QuadraticPath2dTypeId]: QuadraticPath2dTypeId = QuadraticPath2dTypeId\n declare readonly [PathTraits]: unknown\n\n readonly curves: ReadonlyArray<QuadraticCurve2d.QuadraticCurve2d>\n\n constructor(curves: ReadonlyArray<QuadraticCurve2d.QuadraticCurve2d>) {\n super()\n this.curves = curves\n }\n\n [Symbol.iterator](): Iterator<QuadraticCurve2d.QuadraticCurve2d> {\n return this.curves[Symbol.iterator]()\n }\n}\n\nexport const isQuadraticPath2d = (p: unknown): p is QuadraticPath2d =>\n typeof p === 'object' && p !== null && QuadraticPath2dTypeId in p\n\nexport const make = (\n ...curves: ReadonlyArray<QuadraticCurve2d.QuadraticCurve2d>\n): QuadraticPath2d => new QuadraticPath2dImpl(curves)\n\nexport const fromArray = (\n curves: ReadonlyArray<QuadraticCurve2d.QuadraticCurve2d>,\n): QuadraticPath2d => new QuadraticPath2dImpl(curves)\n\nexport const append = dual<\n (c: QuadraticCurve2d.QuadraticCurve2d) => (p: QuadraticPath2d) => QuadraticPath2d,\n (p: QuadraticPath2d, c: QuadraticCurve2d.QuadraticCurve2d) => QuadraticPath2d\n>(2, (p: QuadraticPath2d, c: QuadraticCurve2d.QuadraticCurve2d) => fromArray([...p, c]))\n\nexport const length = (p: QuadraticPath2d) => {\n let total = 0\n for (const curve of p) {\n total += QuadraticCurve2d.length(curve, Interval.unit)\n }\n\n return total\n}\n\nexport const solve = dual<\n (u: number) => (p: QuadraticPath2d) => Vector2,\n (p: QuadraticPath2d, u: number) => Vector2\n>(2, (p: QuadraticPath2d, u: number) => {\n const curves = p instanceof QuadraticPath2dImpl ? p.curves : [...p]\n\n if (u === 1) {\n const last = curves.at(-1) as QuadraticCurve2d.QuadraticCurve2d\n return QuadraticCurve2d.solve(last, 1)\n }\n\n const t = u * curves.length\n const i = Math.floor(t)\n const curve = curves[i] as QuadraticCurve2d.QuadraticCurve2d\n return QuadraticCurve2d.solve(curve, t - i)\n})\n\n// Quadratic Bernstein basis: P(t) = (1-t)²·p0 + 2(1-t)t·p1 + t²·p2\n// expanded gives c0 = p0, c1 = -2p0 + 2p1, c2 = p0 - 2p1 + p2, so:\n// p0 = c0, p1 = c0 + c1/2, p2 = c0 + c1 + c2.\nexport const toPathData = (p: QuadraticPath2d): string => {\n let result = ''\n let prevEndX = Number.NaN\n let prevEndY = Number.NaN\n\n for (const curve of p) {\n const c0x = curve.x.c0\n const c0y = curve.y.c0\n const c1x = curve.x.c1\n const c1y = curve.y.c1\n const c2x = curve.x.c2\n const c2y = curve.y.c2\n\n const startX = c0x\n const startY = c0y\n const ctrlX = c0x + c1x / 2\n const ctrlY = c0y + c1y / 2\n const endX = c0x + c1x + c2x\n const endY = c0y + c1y + c2y\n\n if (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY)) {\n result += ` M ${startX},${startY}`\n }\n result += ` Q ${ctrlX},${ctrlY} ${endX},${endY}`\n\n prevEndX = endX\n prevEndY = endY\n }\n\n return result.slice(1)\n}\n\nexport const isContinuous = <T>(p: QuadraticPath2d<T>): p is QuadraticPath2d<T & Continuous> => {\n let prevEndX = Number.NaN\n let prevEndY = Number.NaN\n let first = true\n\n for (const curve of p) {\n const startX = curve.x.c0\n const startY = curve.y.c0\n if (!first && (!epsEquals(startX, prevEndX) || !epsEquals(startY, prevEndY))) {\n return false\n }\n prevEndX = curve.x.c0 + curve.x.c1 + curve.x.c2\n prevEndY = curve.y.c0 + curve.y.c1 + curve.y.c2\n first = false\n }\n return true\n}\n\nexport const asContinuous = <T>(p: QuadraticPath2d<T>): QuadraticPath2d<T & Continuous> => {\n invariant(isContinuous(p), 'quadratic path is not continuous')\n return p\n}\n\nexport const boundingBox = (\n p: QuadraticPath2d,\n): Interval2d.Interval2d<Interval.Closed, Interval.Closed> => {\n const iter = p[Symbol.iterator]()\n const first = iter.next()\n let acc = QuadraticCurve2d.boundingBox(first.value as QuadraticCurve2d.QuadraticCurve2d)\n for (let next = iter.next(); !next.done; next = iter.next()) {\n acc = Interval2d.union(acc, QuadraticCurve2d.boundingBox(next.value))\n }\n return acc\n}\n","import type { Interval2d } from '../interval/interval2d'\nimport type { QuadraticCurve2d } from '../curve/quadratic2d'\nimport type { Closed } from '../interval/interval'\nimport type { Pipeable } from '../utils'\nimport type { Vector2 } from '../vector/vector2'\nimport type { QuadraticPath2dTypeId } from './quadratic2d.internal'\nimport * as internal from './quadratic2d.internal'\nimport type { Continuous, PathTraits } from './traits'\n\nexport type { Continuous } from './traits'\n\n/**\n * A quadratic path in 2D space.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * The `Trait` type parameter accumulates trait brands as the path is refined\n * via `isContinuous` / `asContinuous`.\n *\n * @since 1.0.0\n */\nexport interface QuadraticPath2d<out Trait = unknown> extends Pipeable, Iterable<QuadraticCurve2d> {\n readonly [QuadraticPath2dTypeId]: QuadraticPath2dTypeId\n readonly [PathTraits]: Trait\n}\n\n/**\n * Creates a new `QuadraticPath2d` instance from a sequence of curves.\n *\n * @param curves - The curves to create the path from.\n * @returns A new `QuadraticPath2d` instance.\n * @since 2.0.0\n */\nexport const make: (...curves: ReadonlyArray<QuadraticCurve2d>) => QuadraticPath2d = internal.make\n\n/**\n * Creates a new `QuadraticPath2d` instance from an array of curves.\n *\n * @param curves - The curves to create the path from.\n * @returns A new `QuadraticPath2d` instance.\n * @since 2.0.0\n */\nexport const fromArray: (curves: ReadonlyArray<QuadraticCurve2d>) => QuadraticPath2d =\n internal.fromArray\n\n/**\n * Checks if a value is a `QuadraticPath2d`.\n *\n * @param p - The value to check.\n * @returns `true` if the value is a `QuadraticPath2d`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isQuadraticPath2d: (p: unknown) => p is QuadraticPath2d = internal.isQuadraticPath2d\n\nexport const append: {\n /**\n * Appends a quadratic curve to a quadratic path.\n *\n * @param c - The quadratic curve to append.\n * @returns A function that takes a quadratic path and returns a new quadratic path.\n * @since 1.0.0\n */\n (c: QuadraticCurve2d): (p: QuadraticPath2d) => QuadraticPath2d\n /**\n * Appends a quadratic curve to a quadratic path.\n *\n * @param p - The quadratic path to append to.\n * @param c - The quadratic curve to append.\n * @returns A new `QuadraticPath2d` instance with the appended curve.\n * @since 1.0.0\n */\n (p: QuadraticPath2d, c: QuadraticCurve2d): QuadraticPath2d\n} = internal.append\n\n/**\n * Calculates the length of a quadratic path.\n *\n * @param p - The quadratic path to calculate the length of.\n * @returns The length of the path.\n */\nexport const length: (p: QuadraticPath2d) => number = internal.length\n\nexport const solve: {\n /**\n * Solves a quadratic path at a given parameter.\n *\n * @param u - The parameter to solve for.\n * @returns A function that takes a quadratic path and returns the solved point.\n * @since 1.0.0\n */\n (u: number): (p: QuadraticPath2d) => Vector2\n /**\n * Solves a quadratic path at a given parameter.\n *\n * @param p - The quadratic path to solve.\n * @param u - The parameter to solve for.\n * @returns The solved point.\n * @since 1.0.0\n */\n (p: QuadraticPath2d, u: number): Vector2\n} = internal.solve\n\n/**\n * Serializes a quadratic path as an SVG path data string (the value of a\n * `<path>` element's `d` attribute), using `M` and `Q` commands. Discontinuities\n * between curves emit a fresh `M` command.\n *\n * @param p - The quadratic path to serialize.\n * @returns The SVG path data string.\n * @since 2.0.0\n */\nexport const toPathData: (p: QuadraticPath2d) => string = internal.toPathData\n\n/**\n * Type-narrowing predicate: refines `QuadraticPath2d<T>` to\n * `QuadraticPath2d<T & Continuous>` when adjacent curves connect.\n *\n * @since 2.0.0\n */\nexport const isContinuous: <T>(p: QuadraticPath2d<T>) => p is QuadraticPath2d<T & Continuous> =\n internal.isContinuous\n\n/**\n * Asserts that the quadratic path is continuous, throwing on failure.\n *\n * @since 2.0.0\n */\nexport const asContinuous: <T>(p: QuadraticPath2d<T>) => QuadraticPath2d<T & Continuous> =\n internal.asContinuous\n\n/**\n * Computes the axis-aligned bounding box of the path — the smallest closed\n * `Box2d` enclosing every segment.\n *\n * @param p - The quadratic path.\n * @returns A closed `Box2d` enclosing the path.\n * @since 2.1.0\n */\nexport const boundingBox: (p: QuadraticPath2d) => Interval2d<Closed, Closed> = internal.boundingBox\n"],"mappings":"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"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { t as cubic_exports } from "../shared/cubic-CpHAx8cC.mjs";
|
|
2
|
+
import { o as quadratic_exports, p as linear_exports } from "../shared/quadratic-CamozcFc.mjs";
|
|
3
|
+
export { cubic_exports as CubicPolynomial, linear_exports as LinearPolynomial, quadratic_exports as QuadraticPolynomial };
|