curvy 1.0.8 → 2.0.0-alpha.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/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 +2 -0
- package/dist/interval/index.mjs +2 -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 +241 -0
- package/dist/path/index.mjs +292 -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-BGRxcxUH.mjs +104 -0
- package/dist/shared/characteristic-BGRxcxUH.mjs.map +1 -0
- package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
- package/dist/shared/cubic-CYYEUHNm.mjs +479 -0
- package/dist/shared/cubic-CYYEUHNm.mjs.map +1 -0
- package/dist/shared/cubic-Dfn6DB02.d.mts +1099 -0
- package/dist/shared/interval-CCEqzPgA.mjs +376 -0
- package/dist/shared/interval-CCEqzPgA.mjs.map +1 -0
- package/dist/shared/interval-hQDiKqj0.d.mts +494 -0
- package/dist/shared/matrix4x4-Bt_DBlP0.d.mts +1182 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs +440 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs.map +1 -0
- package/dist/shared/quadratic-DEhuAKuE.mjs +330 -0
- package/dist/shared/quadratic-DEhuAKuE.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-BPLohNuI.d.mts +787 -0
- package/dist/shared/rationalCubic2d-CP4oGpnk.mjs +658 -0
- package/dist/shared/rationalCubic2d-CP4oGpnk.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-CXa7Yren.mjs +278 -0
- package/dist/shared/rationalCubic2d-CXa7Yren.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-D_-XWxcm.d.mts +297 -0
- package/dist/shared/solution-BjoW7ov4.d.mts +251 -0
- package/dist/shared/solution-CbSWzXCn.mjs +306 -0
- package/dist/shared/solution-CbSWzXCn.mjs.map +1 -0
- package/dist/{pipe.d.mts → shared/utils-DqTGyXrP.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-TV0UnlxY.d.mts +1168 -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/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 -27
- package/dist/utils.mjs +88 -43
- package/dist/utils.mjs.map +1 -0
- package/dist/vector/index.d.mts +2 -0
- package/dist/vector/index.mjs +4 -0
- package/package.json +49 -92
- package/dist/curve/cubic2d.d.mts +0 -31
- package/dist/curve/cubic2d.d.ts +0 -31
- package/dist/curve/cubic2d.mjs +0 -97
- package/dist/curve/linear2d.d.mts +0 -28
- package/dist/curve/linear2d.d.ts +0 -28
- package/dist/curve/linear2d.mjs +0 -49
- package/dist/curve/quadratic2d.d.mts +0 -33
- package/dist/curve/quadratic2d.d.ts +0 -33
- package/dist/curve/quadratic2d.mjs +0 -87
- package/dist/interval.d.mts +0 -58
- package/dist/interval.d.ts +0 -58
- package/dist/interval.mjs +0 -89
- package/dist/matrix/matrix2x2.d.mts +0 -49
- package/dist/matrix/matrix2x2.d.ts +0 -49
- package/dist/matrix/matrix2x2.mjs +0 -24
- package/dist/matrix/matrix3x3.d.mts +0 -63
- package/dist/matrix/matrix3x3.d.ts +0 -63
- package/dist/matrix/matrix3x3.mjs +0 -27
- package/dist/matrix/matrix4x4.d.mts +0 -72
- package/dist/matrix/matrix4x4.d.ts +0 -72
- package/dist/matrix/matrix4x4.mjs +0 -215
- package/dist/path/cubic2d.d.mts +0 -29
- package/dist/path/cubic2d.d.ts +0 -29
- package/dist/path/cubic2d.mjs +0 -62
- package/dist/path/linear2d.d.mts +0 -29
- package/dist/path/linear2d.d.ts +0 -29
- package/dist/path/linear2d.mjs +0 -55
- package/dist/path/quadratic2d.d.mts +0 -30
- package/dist/path/quadratic2d.d.ts +0 -30
- package/dist/path/quadratic2d.mjs +0 -61
- package/dist/pipe.d.ts +0 -58
- package/dist/pipe.mjs +0 -91
- package/dist/polynomial/cubic.d.mts +0 -7
- package/dist/polynomial/cubic.d.ts +0 -7
- package/dist/polynomial/cubic.mjs +0 -148
- package/dist/polynomial/linear.d.mts +0 -7
- package/dist/polynomial/linear.d.ts +0 -7
- package/dist/polynomial/linear.mjs +0 -23
- package/dist/polynomial/quadratic.d.mts +0 -7
- package/dist/polynomial/quadratic.d.ts +0 -7
- package/dist/polynomial/quadratic.mjs +0 -24
- package/dist/shared/curvy.BDhiZ7He.mjs +0 -80
- package/dist/shared/curvy.BZ_mTkJe.mjs +0 -60
- package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
- package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
- package/dist/shared/curvy.BsHoYJNv.d.ts +0 -155
- package/dist/shared/curvy.BzVmUIKm.mjs +0 -131
- package/dist/shared/curvy.C2XGH0R0.mjs +0 -75
- package/dist/shared/curvy.CE4X6_Is.mjs +0 -181
- package/dist/shared/curvy.Cps2R_RU.mjs +0 -120
- package/dist/shared/curvy.Cv-wIzDr.mjs +0 -124
- package/dist/shared/curvy.DmVFTi0N.mjs +0 -34
- package/dist/shared/curvy.NsmY7zcr.d.mts +0 -155
- package/dist/shared/curvy.wYJQhFW-.mjs +0 -87
- package/dist/splines/basis2d.d.mts +0 -38
- package/dist/splines/basis2d.d.ts +0 -38
- package/dist/splines/basis2d.mjs +0 -89
- package/dist/splines/bezier2d.d.mts +0 -48
- package/dist/splines/bezier2d.d.ts +0 -48
- package/dist/splines/bezier2d.mjs +0 -22
- package/dist/splines/cardinal2d.d.mts +0 -49
- package/dist/splines/cardinal2d.d.ts +0 -49
- package/dist/splines/cardinal2d.mjs +0 -123
- package/dist/splines/hermite2d.d.mts +0 -33
- package/dist/splines/hermite2d.d.ts +0 -33
- package/dist/splines/hermite2d.mjs +0 -77
- package/dist/utils.d.ts +0 -27
- package/dist/vector/vector2.d.mts +0 -66
- package/dist/vector/vector2.d.ts +0 -66
- package/dist/vector/vector2.mjs +0 -28
- package/dist/vector/vector3.d.mts +0 -77
- package/dist/vector/vector3.d.ts +0 -77
- package/dist/vector/vector3.mjs +0 -32
- package/dist/vector/vector4.d.mts +0 -43
- package/dist/vector/vector4.d.ts +0 -43
- package/dist/vector/vector4.mjs +0 -18
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.mjs';
|
|
3
|
-
import { Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.mjs';
|
|
5
|
-
import { Bezier2d } from './bezier2d.mjs';
|
|
6
|
-
import '../shared/curvy.Bf5TIk31.mjs';
|
|
7
|
-
import '../vector/vector4.mjs';
|
|
8
|
-
import '../matrix/matrix3x3.mjs';
|
|
9
|
-
import '../vector/vector3.mjs';
|
|
10
|
-
import '../matrix/matrix2x2.mjs';
|
|
11
|
-
import '../curve/cubic2d.mjs';
|
|
12
|
-
import '../interval.mjs';
|
|
13
|
-
import '../shared/curvy.NsmY7zcr.mjs';
|
|
14
|
-
|
|
15
|
-
declare const Basis2dTypeId: unique symbol;
|
|
16
|
-
type Basis2dTypeId = typeof Basis2dTypeId;
|
|
17
|
-
|
|
18
|
-
declare const characteristic: Matrix4x4;
|
|
19
|
-
interface Basis2d extends Pipeable {
|
|
20
|
-
readonly [Basis2dTypeId]: Basis2dTypeId;
|
|
21
|
-
[Symbol.iterator](): Iterator<Vector2>;
|
|
22
|
-
}
|
|
23
|
-
declare const isBasis2d: (p: unknown) => p is Basis2d;
|
|
24
|
-
declare const make: (p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) => Basis2d;
|
|
25
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Basis2d;
|
|
26
|
-
declare const append: {
|
|
27
|
-
(...points: ReadonlyArray<Vector2>): (p: Basis2d) => Basis2d;
|
|
28
|
-
(p: Basis2d, ...points: ReadonlyArray<Vector2>): Basis2d;
|
|
29
|
-
};
|
|
30
|
-
declare const prepend: {
|
|
31
|
-
(...points: ReadonlyArray<Vector2>): (p: Basis2d) => Basis2d;
|
|
32
|
-
(p: Basis2d, ...points: ReadonlyArray<Vector2>): Basis2d;
|
|
33
|
-
};
|
|
34
|
-
declare const withTriplicatedEndpoints: (p: Basis2d) => Basis2d;
|
|
35
|
-
declare const toPath: (p: Basis2d) => CubicPath2d;
|
|
36
|
-
declare const toBezier: (p: Basis2d) => Bezier2d;
|
|
37
|
-
|
|
38
|
-
export { type Basis2d, append, characteristic, fromArray, isBasis2d, make, prepend, toBezier, toPath, withTriplicatedEndpoints };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.js';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.js';
|
|
3
|
-
import { Pipeable } from '../pipe.js';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.js';
|
|
5
|
-
import { Bezier2d } from './bezier2d.js';
|
|
6
|
-
import '../shared/curvy.Bf5TIk31.js';
|
|
7
|
-
import '../vector/vector4.js';
|
|
8
|
-
import '../matrix/matrix3x3.js';
|
|
9
|
-
import '../vector/vector3.js';
|
|
10
|
-
import '../matrix/matrix2x2.js';
|
|
11
|
-
import '../curve/cubic2d.js';
|
|
12
|
-
import '../interval.js';
|
|
13
|
-
import '../shared/curvy.BsHoYJNv.js';
|
|
14
|
-
|
|
15
|
-
declare const Basis2dTypeId: unique symbol;
|
|
16
|
-
type Basis2dTypeId = typeof Basis2dTypeId;
|
|
17
|
-
|
|
18
|
-
declare const characteristic: Matrix4x4;
|
|
19
|
-
interface Basis2d extends Pipeable {
|
|
20
|
-
readonly [Basis2dTypeId]: Basis2dTypeId;
|
|
21
|
-
[Symbol.iterator](): Iterator<Vector2>;
|
|
22
|
-
}
|
|
23
|
-
declare const isBasis2d: (p: unknown) => p is Basis2d;
|
|
24
|
-
declare const make: (p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) => Basis2d;
|
|
25
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Basis2d;
|
|
26
|
-
declare const append: {
|
|
27
|
-
(...points: ReadonlyArray<Vector2>): (p: Basis2d) => Basis2d;
|
|
28
|
-
(p: Basis2d, ...points: ReadonlyArray<Vector2>): Basis2d;
|
|
29
|
-
};
|
|
30
|
-
declare const prepend: {
|
|
31
|
-
(...points: ReadonlyArray<Vector2>): (p: Basis2d) => Basis2d;
|
|
32
|
-
(p: Basis2d, ...points: ReadonlyArray<Vector2>): Basis2d;
|
|
33
|
-
};
|
|
34
|
-
declare const withTriplicatedEndpoints: (p: Basis2d) => Basis2d;
|
|
35
|
-
declare const toPath: (p: Basis2d) => CubicPath2d;
|
|
36
|
-
declare const toBezier: (p: Basis2d) => Bezier2d;
|
|
37
|
-
|
|
38
|
-
export { type Basis2d, append, characteristic, fromArray, isBasis2d, make, prepend, toBezier, toPath, withTriplicatedEndpoints };
|
package/dist/splines/basis2d.mjs
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { make as make$2 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { fromCurves } from '../path/cubic2d.mjs';
|
|
3
|
-
import { dual, Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { roundDown, invariant } from '../utils.mjs';
|
|
5
|
-
import { t as toCurves, f as fromSpline } from '../shared/curvy.CE4X6_Is.mjs';
|
|
6
|
-
import '../shared/curvy.Cps2R_RU.mjs';
|
|
7
|
-
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
8
|
-
import '../shared/curvy.C2XGH0R0.mjs';
|
|
9
|
-
import '../shared/curvy.Cv-wIzDr.mjs';
|
|
10
|
-
import '../shared/curvy.wYJQhFW-.mjs';
|
|
11
|
-
import '../curve/cubic2d.mjs';
|
|
12
|
-
import '../interval.mjs';
|
|
13
|
-
import '../shared/curvy.DmVFTi0N.mjs';
|
|
14
|
-
import '../polynomial/cubic.mjs';
|
|
15
|
-
import '../shared/curvy.BzVmUIKm.mjs';
|
|
16
|
-
import '../shared/curvy.BDhiZ7He.mjs';
|
|
17
|
-
import '../polynomial/quadratic.mjs';
|
|
18
|
-
import '../vector/vector2.mjs';
|
|
19
|
-
import '../curve/linear2d.mjs';
|
|
20
|
-
import '../polynomial/linear.mjs';
|
|
21
|
-
import '../curve/quadratic2d.mjs';
|
|
22
|
-
import '../vector/vector4.mjs';
|
|
23
|
-
|
|
24
|
-
const characteristic$1 = make$2(
|
|
25
|
-
1 / 6,
|
|
26
|
-
4 / 6,
|
|
27
|
-
roundDown(1 / 6),
|
|
28
|
-
0,
|
|
29
|
-
-0.5,
|
|
30
|
-
0,
|
|
31
|
-
0.5,
|
|
32
|
-
0,
|
|
33
|
-
0.5,
|
|
34
|
-
-1,
|
|
35
|
-
0.5,
|
|
36
|
-
0,
|
|
37
|
-
-1 / 6,
|
|
38
|
-
0.5,
|
|
39
|
-
-0.5,
|
|
40
|
-
1 / 6
|
|
41
|
-
);
|
|
42
|
-
const Basis2dTypeId = Symbol("curvy/splines/basis2d");
|
|
43
|
-
class Basis2dImpl extends Pipeable {
|
|
44
|
-
[Basis2dTypeId] = Basis2dTypeId;
|
|
45
|
-
points;
|
|
46
|
-
constructor(points) {
|
|
47
|
-
invariant(points.length >= 4, "basis splines requires 4 or more points");
|
|
48
|
-
super();
|
|
49
|
-
this.points = points;
|
|
50
|
-
}
|
|
51
|
-
[Symbol.iterator]() {
|
|
52
|
-
return this.points[Symbol.iterator]();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const isBasis2d$1 = (p) => typeof p === "object" && p !== null && Basis2dTypeId in p;
|
|
56
|
-
const make$1 = (p0, p1, p2, p3) => new Basis2dImpl([p0, p1, p2, p3]);
|
|
57
|
-
const fromArray$1 = (points) => new Basis2dImpl(points);
|
|
58
|
-
const append$1 = dual(
|
|
59
|
-
(args) => isBasis2d$1(args[0]),
|
|
60
|
-
(p, ...points) => new Basis2dImpl([...p, ...points])
|
|
61
|
-
);
|
|
62
|
-
const prepend$1 = dual(
|
|
63
|
-
(args) => isBasis2d$1(args[0]),
|
|
64
|
-
(p, ...points) => new Basis2dImpl([...points, ...p])
|
|
65
|
-
);
|
|
66
|
-
const withTriplicatedEndpoints$1 = (p) => {
|
|
67
|
-
const points = p instanceof Basis2dImpl ? p.points : [...p];
|
|
68
|
-
return new Basis2dImpl([
|
|
69
|
-
points[0],
|
|
70
|
-
points[0],
|
|
71
|
-
...points,
|
|
72
|
-
points[points.length - 1],
|
|
73
|
-
points[points.length - 1]
|
|
74
|
-
]);
|
|
75
|
-
};
|
|
76
|
-
const toPath$1 = (p) => fromCurves(...toCurves(p, characteristic$1, 1));
|
|
77
|
-
const toBezier$1 = (p) => fromSpline(p, characteristic$1, 1);
|
|
78
|
-
|
|
79
|
-
const characteristic = characteristic$1;
|
|
80
|
-
const isBasis2d = isBasis2d$1;
|
|
81
|
-
const make = make$1;
|
|
82
|
-
const fromArray = fromArray$1;
|
|
83
|
-
const append = append$1;
|
|
84
|
-
const prepend = prepend$1;
|
|
85
|
-
const withTriplicatedEndpoints = withTriplicatedEndpoints$1;
|
|
86
|
-
const toPath = toPath$1;
|
|
87
|
-
const toBezier = toBezier$1;
|
|
88
|
-
|
|
89
|
-
export { append, characteristic, fromArray, isBasis2d, make, prepend, toBezier, toPath, withTriplicatedEndpoints };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.mjs';
|
|
3
|
-
import { Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.mjs';
|
|
5
|
-
import '../shared/curvy.Bf5TIk31.mjs';
|
|
6
|
-
import '../vector/vector4.mjs';
|
|
7
|
-
import '../matrix/matrix3x3.mjs';
|
|
8
|
-
import '../vector/vector3.mjs';
|
|
9
|
-
import '../matrix/matrix2x2.mjs';
|
|
10
|
-
import '../curve/cubic2d.mjs';
|
|
11
|
-
import '../interval.mjs';
|
|
12
|
-
import '../shared/curvy.NsmY7zcr.mjs';
|
|
13
|
-
|
|
14
|
-
declare const Bezier2dTypeId: unique symbol;
|
|
15
|
-
type Bezier2dTypeId = typeof Bezier2dTypeId;
|
|
16
|
-
|
|
17
|
-
interface Bezier2d extends Pipeable {
|
|
18
|
-
readonly [Bezier2dTypeId]: Bezier2dTypeId;
|
|
19
|
-
[Symbol.iterator](): IterableIterator<Vector2>;
|
|
20
|
-
}
|
|
21
|
-
declare const characteristic: Matrix4x4;
|
|
22
|
-
declare const make: (p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) => Bezier2d;
|
|
23
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Bezier2d;
|
|
24
|
-
declare const fromSpline: (points: Iterable<Vector2>, matrix: Matrix4x4, stride: 1 | 2 | 3) => Bezier2d;
|
|
25
|
-
declare const isCubicBezier2d: (p: unknown) => p is Bezier2d;
|
|
26
|
-
declare const append: {
|
|
27
|
-
(p1: Vector2, p2: Vector2, p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
28
|
-
(p: Bezier2d, p1: Vector2, p2: Vector2, p3: Vector2): Bezier2d;
|
|
29
|
-
};
|
|
30
|
-
declare const appendTangentAligned: {
|
|
31
|
-
(ratio: number, p2: Vector2, p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
32
|
-
(p: Bezier2d, ratio: number, p2: Vector2, p3: Vector2): Bezier2d;
|
|
33
|
-
};
|
|
34
|
-
declare const appendCurvatureMirrored: {
|
|
35
|
-
(a: number, b: number, p6: Vector2): (p: Bezier2d) => Bezier2d;
|
|
36
|
-
(p: Bezier2d, a: number, b: number, p6: Vector2): Bezier2d;
|
|
37
|
-
};
|
|
38
|
-
declare const appendVelocityAligned: {
|
|
39
|
-
(p2: Vector2, p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
40
|
-
(p: Bezier2d, p2: Vector2, p3: Vector2): Bezier2d;
|
|
41
|
-
};
|
|
42
|
-
declare const appendAccelerationAligned: {
|
|
43
|
-
(p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
44
|
-
(p: Bezier2d, p3: Vector2): Bezier2d;
|
|
45
|
-
};
|
|
46
|
-
declare const toPath: (p: Bezier2d) => CubicPath2d;
|
|
47
|
-
|
|
48
|
-
export { type Bezier2d, append, appendAccelerationAligned, appendCurvatureMirrored, appendTangentAligned, appendVelocityAligned, characteristic, fromArray, fromSpline, isCubicBezier2d, make, toPath };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.js';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.js';
|
|
3
|
-
import { Pipeable } from '../pipe.js';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.js';
|
|
5
|
-
import '../shared/curvy.Bf5TIk31.js';
|
|
6
|
-
import '../vector/vector4.js';
|
|
7
|
-
import '../matrix/matrix3x3.js';
|
|
8
|
-
import '../vector/vector3.js';
|
|
9
|
-
import '../matrix/matrix2x2.js';
|
|
10
|
-
import '../curve/cubic2d.js';
|
|
11
|
-
import '../interval.js';
|
|
12
|
-
import '../shared/curvy.BsHoYJNv.js';
|
|
13
|
-
|
|
14
|
-
declare const Bezier2dTypeId: unique symbol;
|
|
15
|
-
type Bezier2dTypeId = typeof Bezier2dTypeId;
|
|
16
|
-
|
|
17
|
-
interface Bezier2d extends Pipeable {
|
|
18
|
-
readonly [Bezier2dTypeId]: Bezier2dTypeId;
|
|
19
|
-
[Symbol.iterator](): IterableIterator<Vector2>;
|
|
20
|
-
}
|
|
21
|
-
declare const characteristic: Matrix4x4;
|
|
22
|
-
declare const make: (p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) => Bezier2d;
|
|
23
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Bezier2d;
|
|
24
|
-
declare const fromSpline: (points: Iterable<Vector2>, matrix: Matrix4x4, stride: 1 | 2 | 3) => Bezier2d;
|
|
25
|
-
declare const isCubicBezier2d: (p: unknown) => p is Bezier2d;
|
|
26
|
-
declare const append: {
|
|
27
|
-
(p1: Vector2, p2: Vector2, p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
28
|
-
(p: Bezier2d, p1: Vector2, p2: Vector2, p3: Vector2): Bezier2d;
|
|
29
|
-
};
|
|
30
|
-
declare const appendTangentAligned: {
|
|
31
|
-
(ratio: number, p2: Vector2, p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
32
|
-
(p: Bezier2d, ratio: number, p2: Vector2, p3: Vector2): Bezier2d;
|
|
33
|
-
};
|
|
34
|
-
declare const appendCurvatureMirrored: {
|
|
35
|
-
(a: number, b: number, p6: Vector2): (p: Bezier2d) => Bezier2d;
|
|
36
|
-
(p: Bezier2d, a: number, b: number, p6: Vector2): Bezier2d;
|
|
37
|
-
};
|
|
38
|
-
declare const appendVelocityAligned: {
|
|
39
|
-
(p2: Vector2, p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
40
|
-
(p: Bezier2d, p2: Vector2, p3: Vector2): Bezier2d;
|
|
41
|
-
};
|
|
42
|
-
declare const appendAccelerationAligned: {
|
|
43
|
-
(p3: Vector2): (p: Bezier2d) => Bezier2d;
|
|
44
|
-
(p: Bezier2d, p3: Vector2): Bezier2d;
|
|
45
|
-
};
|
|
46
|
-
declare const toPath: (p: Bezier2d) => CubicPath2d;
|
|
47
|
-
|
|
48
|
-
export { type Bezier2d, append, appendAccelerationAligned, appendCurvatureMirrored, appendTangentAligned, appendVelocityAligned, characteristic, fromArray, fromSpline, isCubicBezier2d, make, toPath };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { b as append, h as appendAccelerationAligned, e as appendCurvatureMirrored, d as appendTangentAligned, g as appendVelocityAligned, c as characteristic, a as fromArray, f as fromSpline, i as isCubicBezier2d, m as make, j as toPath } from '../shared/curvy.CE4X6_Is.mjs';
|
|
2
|
-
import '../matrix/matrix4x4.mjs';
|
|
3
|
-
import '../shared/curvy.Cps2R_RU.mjs';
|
|
4
|
-
import '../utils.mjs';
|
|
5
|
-
import '../pipe.mjs';
|
|
6
|
-
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
7
|
-
import '../shared/curvy.C2XGH0R0.mjs';
|
|
8
|
-
import '../shared/curvy.Cv-wIzDr.mjs';
|
|
9
|
-
import '../shared/curvy.wYJQhFW-.mjs';
|
|
10
|
-
import '../path/cubic2d.mjs';
|
|
11
|
-
import '../curve/cubic2d.mjs';
|
|
12
|
-
import '../interval.mjs';
|
|
13
|
-
import '../shared/curvy.DmVFTi0N.mjs';
|
|
14
|
-
import '../polynomial/cubic.mjs';
|
|
15
|
-
import '../shared/curvy.BzVmUIKm.mjs';
|
|
16
|
-
import '../shared/curvy.BDhiZ7He.mjs';
|
|
17
|
-
import '../polynomial/quadratic.mjs';
|
|
18
|
-
import '../vector/vector2.mjs';
|
|
19
|
-
import '../curve/linear2d.mjs';
|
|
20
|
-
import '../polynomial/linear.mjs';
|
|
21
|
-
import '../curve/quadratic2d.mjs';
|
|
22
|
-
import '../vector/vector4.mjs';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.mjs';
|
|
3
|
-
import { Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.mjs';
|
|
5
|
-
import { Bezier2d } from './bezier2d.mjs';
|
|
6
|
-
import '../shared/curvy.Bf5TIk31.mjs';
|
|
7
|
-
import '../vector/vector4.mjs';
|
|
8
|
-
import '../matrix/matrix3x3.mjs';
|
|
9
|
-
import '../vector/vector3.mjs';
|
|
10
|
-
import '../matrix/matrix2x2.mjs';
|
|
11
|
-
import '../curve/cubic2d.mjs';
|
|
12
|
-
import '../interval.mjs';
|
|
13
|
-
import '../shared/curvy.NsmY7zcr.mjs';
|
|
14
|
-
|
|
15
|
-
declare const Cardinal2dTypeId: unique symbol;
|
|
16
|
-
type Cardinal2dTypeId = typeof Cardinal2dTypeId;
|
|
17
|
-
|
|
18
|
-
interface Cardinal2d extends Pipeable {
|
|
19
|
-
readonly [Cardinal2dTypeId]: Cardinal2dTypeId;
|
|
20
|
-
[Symbol.iterator](): IterableIterator<Vector2>;
|
|
21
|
-
}
|
|
22
|
-
declare const characteristic: (scale: number) => Matrix4x4;
|
|
23
|
-
declare const catRomCharacteristic: Matrix4x4;
|
|
24
|
-
declare const isCardinal2d: (p: unknown) => p is Cardinal2d;
|
|
25
|
-
declare const make: (p0: Vector2, p1: Vector2, ...points: ReadonlyArray<Vector2>) => Cardinal2d;
|
|
26
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Cardinal2d;
|
|
27
|
-
declare const append: {
|
|
28
|
-
(...points: ReadonlyArray<Vector2>): (c: Cardinal2d) => Cardinal2d;
|
|
29
|
-
(c: Cardinal2d, ...points: ReadonlyArray<Vector2>): Cardinal2d;
|
|
30
|
-
};
|
|
31
|
-
declare const prepend: {
|
|
32
|
-
(...points: ReadonlyArray<Vector2>): (c: Cardinal2d) => Cardinal2d;
|
|
33
|
-
(c: Cardinal2d, ...points: ReadonlyArray<Vector2>): Cardinal2d;
|
|
34
|
-
};
|
|
35
|
-
declare const withDuplicatedEndpoints: (c: Cardinal2d) => Cardinal2d;
|
|
36
|
-
declare const withReflectedEndpoints: {
|
|
37
|
-
(scale: number): (c: Cardinal2d) => Cardinal2d;
|
|
38
|
-
(c: Cardinal2d, scale?: number): Cardinal2d;
|
|
39
|
-
};
|
|
40
|
-
declare const toPath: {
|
|
41
|
-
(scale: number): (c: Cardinal2d) => CubicPath2d;
|
|
42
|
-
(c: Cardinal2d, scale?: number): CubicPath2d;
|
|
43
|
-
};
|
|
44
|
-
declare const toBezier: {
|
|
45
|
-
(p: Cardinal2d): Bezier2d;
|
|
46
|
-
(p: Cardinal2d, scale: number): Bezier2d;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export { type Cardinal2d, append, catRomCharacteristic, characteristic, fromArray, isCardinal2d, make, prepend, toBezier, toPath, withDuplicatedEndpoints, withReflectedEndpoints };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.js';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.js';
|
|
3
|
-
import { Pipeable } from '../pipe.js';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.js';
|
|
5
|
-
import { Bezier2d } from './bezier2d.js';
|
|
6
|
-
import '../shared/curvy.Bf5TIk31.js';
|
|
7
|
-
import '../vector/vector4.js';
|
|
8
|
-
import '../matrix/matrix3x3.js';
|
|
9
|
-
import '../vector/vector3.js';
|
|
10
|
-
import '../matrix/matrix2x2.js';
|
|
11
|
-
import '../curve/cubic2d.js';
|
|
12
|
-
import '../interval.js';
|
|
13
|
-
import '../shared/curvy.BsHoYJNv.js';
|
|
14
|
-
|
|
15
|
-
declare const Cardinal2dTypeId: unique symbol;
|
|
16
|
-
type Cardinal2dTypeId = typeof Cardinal2dTypeId;
|
|
17
|
-
|
|
18
|
-
interface Cardinal2d extends Pipeable {
|
|
19
|
-
readonly [Cardinal2dTypeId]: Cardinal2dTypeId;
|
|
20
|
-
[Symbol.iterator](): IterableIterator<Vector2>;
|
|
21
|
-
}
|
|
22
|
-
declare const characteristic: (scale: number) => Matrix4x4;
|
|
23
|
-
declare const catRomCharacteristic: Matrix4x4;
|
|
24
|
-
declare const isCardinal2d: (p: unknown) => p is Cardinal2d;
|
|
25
|
-
declare const make: (p0: Vector2, p1: Vector2, ...points: ReadonlyArray<Vector2>) => Cardinal2d;
|
|
26
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Cardinal2d;
|
|
27
|
-
declare const append: {
|
|
28
|
-
(...points: ReadonlyArray<Vector2>): (c: Cardinal2d) => Cardinal2d;
|
|
29
|
-
(c: Cardinal2d, ...points: ReadonlyArray<Vector2>): Cardinal2d;
|
|
30
|
-
};
|
|
31
|
-
declare const prepend: {
|
|
32
|
-
(...points: ReadonlyArray<Vector2>): (c: Cardinal2d) => Cardinal2d;
|
|
33
|
-
(c: Cardinal2d, ...points: ReadonlyArray<Vector2>): Cardinal2d;
|
|
34
|
-
};
|
|
35
|
-
declare const withDuplicatedEndpoints: (c: Cardinal2d) => Cardinal2d;
|
|
36
|
-
declare const withReflectedEndpoints: {
|
|
37
|
-
(scale: number): (c: Cardinal2d) => Cardinal2d;
|
|
38
|
-
(c: Cardinal2d, scale?: number): Cardinal2d;
|
|
39
|
-
};
|
|
40
|
-
declare const toPath: {
|
|
41
|
-
(scale: number): (c: Cardinal2d) => CubicPath2d;
|
|
42
|
-
(c: Cardinal2d, scale?: number): CubicPath2d;
|
|
43
|
-
};
|
|
44
|
-
declare const toBezier: {
|
|
45
|
-
(p: Cardinal2d): Bezier2d;
|
|
46
|
-
(p: Cardinal2d, scale: number): Bezier2d;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export { type Cardinal2d, append, catRomCharacteristic, characteristic, fromArray, isCardinal2d, make, prepend, toBezier, toPath, withDuplicatedEndpoints, withReflectedEndpoints };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { make as make$2 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { fromCurves } from '../path/cubic2d.mjs';
|
|
3
|
-
import { dual, Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { invariant } from '../utils.mjs';
|
|
5
|
-
import { subtract, scale, add } from '../vector/vector2.mjs';
|
|
6
|
-
import { t as toCurves, f as fromSpline } from '../shared/curvy.CE4X6_Is.mjs';
|
|
7
|
-
import '../shared/curvy.Cps2R_RU.mjs';
|
|
8
|
-
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
9
|
-
import '../shared/curvy.C2XGH0R0.mjs';
|
|
10
|
-
import '../shared/curvy.Cv-wIzDr.mjs';
|
|
11
|
-
import '../shared/curvy.wYJQhFW-.mjs';
|
|
12
|
-
import '../curve/cubic2d.mjs';
|
|
13
|
-
import '../interval.mjs';
|
|
14
|
-
import '../shared/curvy.DmVFTi0N.mjs';
|
|
15
|
-
import '../polynomial/cubic.mjs';
|
|
16
|
-
import '../shared/curvy.BzVmUIKm.mjs';
|
|
17
|
-
import '../shared/curvy.BDhiZ7He.mjs';
|
|
18
|
-
import '../polynomial/quadratic.mjs';
|
|
19
|
-
import '../curve/linear2d.mjs';
|
|
20
|
-
import '../polynomial/linear.mjs';
|
|
21
|
-
import '../curve/quadratic2d.mjs';
|
|
22
|
-
import '../vector/vector4.mjs';
|
|
23
|
-
|
|
24
|
-
const characteristic$1 = (scale) => make$2(
|
|
25
|
-
0,
|
|
26
|
-
1,
|
|
27
|
-
0,
|
|
28
|
-
0,
|
|
29
|
-
-scale,
|
|
30
|
-
0,
|
|
31
|
-
scale,
|
|
32
|
-
0,
|
|
33
|
-
2 * scale,
|
|
34
|
-
scale - 3,
|
|
35
|
-
3 - 2 * scale,
|
|
36
|
-
-scale,
|
|
37
|
-
-scale,
|
|
38
|
-
2 - scale,
|
|
39
|
-
scale - 2,
|
|
40
|
-
scale
|
|
41
|
-
);
|
|
42
|
-
const catRomCharacteristic$1 = characteristic$1(0.5);
|
|
43
|
-
const Cardinal2dTypeId = Symbol.for(
|
|
44
|
-
"curvy/splines/cardinal2d"
|
|
45
|
-
);
|
|
46
|
-
class Cardinal2dImpl extends Pipeable {
|
|
47
|
-
[Cardinal2dTypeId] = Cardinal2dTypeId;
|
|
48
|
-
points;
|
|
49
|
-
constructor(points) {
|
|
50
|
-
invariant(points.length >= 2, "cardinal splines requires 2 or more points");
|
|
51
|
-
super();
|
|
52
|
-
this.points = points;
|
|
53
|
-
}
|
|
54
|
-
[Symbol.iterator]() {
|
|
55
|
-
return this.points[Symbol.iterator]();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const isCardinal2d$1 = (p) => typeof p === "object" && p !== null && Cardinal2dTypeId in p;
|
|
59
|
-
const make$1 = (...points) => new Cardinal2dImpl(points);
|
|
60
|
-
const fromArray$1 = (points) => new Cardinal2dImpl(points);
|
|
61
|
-
const append$1 = dual(
|
|
62
|
-
(args) => isCardinal2d$1(args[0]),
|
|
63
|
-
(p, ...points) => new Cardinal2dImpl([...p, ...points])
|
|
64
|
-
);
|
|
65
|
-
const prepend$1 = dual(
|
|
66
|
-
(args) => isCardinal2d$1(args[0]),
|
|
67
|
-
(p, ...points) => new Cardinal2dImpl([...points, ...p])
|
|
68
|
-
);
|
|
69
|
-
const withDuplicatedEndpoints$1 = (p) => {
|
|
70
|
-
const points = p instanceof Cardinal2dImpl ? p.points : [...p];
|
|
71
|
-
return new Cardinal2dImpl([
|
|
72
|
-
points[0],
|
|
73
|
-
...points,
|
|
74
|
-
points[points.length - 1]
|
|
75
|
-
]);
|
|
76
|
-
};
|
|
77
|
-
const withReflectedEndpoints$1 = dual(
|
|
78
|
-
(args) => isCardinal2d$1(args[0]),
|
|
79
|
-
(p, scale$1 = 1) => {
|
|
80
|
-
if (scale$1 === 0) {
|
|
81
|
-
return withDuplicatedEndpoints$1(p);
|
|
82
|
-
}
|
|
83
|
-
const points = p instanceof Cardinal2dImpl ? p.points : [...p];
|
|
84
|
-
const p0 = points[0];
|
|
85
|
-
const p1 = points[1];
|
|
86
|
-
const p2 = points[points.length - 2];
|
|
87
|
-
const p3 = points[points.length - 1];
|
|
88
|
-
return new Cardinal2dImpl([
|
|
89
|
-
subtract(p1, p0).pipe(scale(scale$1), add(p0)),
|
|
90
|
-
...points,
|
|
91
|
-
subtract(p2, p3).pipe(scale(scale$1), add(p3))
|
|
92
|
-
]);
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
const toPath$1 = dual(
|
|
96
|
-
(args) => isCardinal2d$1(args[0]),
|
|
97
|
-
(p, scale = 0.5) => fromCurves(
|
|
98
|
-
...toCurves(
|
|
99
|
-
p,
|
|
100
|
-
scale === 0.5 ? catRomCharacteristic$1 : characteristic$1(scale),
|
|
101
|
-
1
|
|
102
|
-
)
|
|
103
|
-
)
|
|
104
|
-
);
|
|
105
|
-
const toBezier$1 = (p, scale = 0.5) => fromSpline(
|
|
106
|
-
p,
|
|
107
|
-
scale === 0.5 ? catRomCharacteristic$1 : characteristic$1(scale),
|
|
108
|
-
1
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
const characteristic = characteristic$1;
|
|
112
|
-
const catRomCharacteristic = catRomCharacteristic$1;
|
|
113
|
-
const isCardinal2d = isCardinal2d$1;
|
|
114
|
-
const make = make$1;
|
|
115
|
-
const fromArray = fromArray$1;
|
|
116
|
-
const append = append$1;
|
|
117
|
-
const prepend = prepend$1;
|
|
118
|
-
const withDuplicatedEndpoints = withDuplicatedEndpoints$1;
|
|
119
|
-
const withReflectedEndpoints = withReflectedEndpoints$1;
|
|
120
|
-
const toPath = toPath$1;
|
|
121
|
-
const toBezier = toBezier$1;
|
|
122
|
-
|
|
123
|
-
export { append, catRomCharacteristic, characteristic, fromArray, isCardinal2d, make, prepend, toBezier, toPath, withDuplicatedEndpoints, withReflectedEndpoints };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.mjs';
|
|
3
|
-
import { Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.mjs';
|
|
5
|
-
import { Bezier2d } from './bezier2d.mjs';
|
|
6
|
-
import '../shared/curvy.Bf5TIk31.mjs';
|
|
7
|
-
import '../vector/vector4.mjs';
|
|
8
|
-
import '../matrix/matrix3x3.mjs';
|
|
9
|
-
import '../vector/vector3.mjs';
|
|
10
|
-
import '../matrix/matrix2x2.mjs';
|
|
11
|
-
import '../curve/cubic2d.mjs';
|
|
12
|
-
import '../interval.mjs';
|
|
13
|
-
import '../shared/curvy.NsmY7zcr.mjs';
|
|
14
|
-
|
|
15
|
-
declare const Hermite2dTypeId: unique symbol;
|
|
16
|
-
type Hermite2dTypeId = typeof Hermite2dTypeId;
|
|
17
|
-
|
|
18
|
-
interface Hermite2d extends Pipeable {
|
|
19
|
-
readonly [Hermite2dTypeId]: Hermite2dTypeId;
|
|
20
|
-
[Symbol.iterator](): IterableIterator<Vector2>;
|
|
21
|
-
}
|
|
22
|
-
declare const characteristic: Matrix4x4;
|
|
23
|
-
declare const make: (p0: Vector2, v0: Vector2, p1: Vector2, v1: Vector2) => Hermite2d;
|
|
24
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Hermite2d;
|
|
25
|
-
declare const isHermite2d: (p: unknown) => p is Hermite2d;
|
|
26
|
-
declare const append: {
|
|
27
|
-
(p1: Vector2, v1: Vector2): (p: Hermite2d) => Hermite2d;
|
|
28
|
-
(p: Hermite2d, p1: Vector2, v1: Vector2): Hermite2d;
|
|
29
|
-
};
|
|
30
|
-
declare const toPath: (p: Hermite2d) => CubicPath2d;
|
|
31
|
-
declare const toBezier: (p: Hermite2d) => Bezier2d;
|
|
32
|
-
|
|
33
|
-
export { type Hermite2d, append, characteristic, fromArray, isHermite2d, make, toBezier, toPath };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Matrix4x4 } from '../matrix/matrix4x4.js';
|
|
2
|
-
import { CubicPath2d } from '../path/cubic2d.js';
|
|
3
|
-
import { Pipeable } from '../pipe.js';
|
|
4
|
-
import { Vector2 } from '../vector/vector2.js';
|
|
5
|
-
import { Bezier2d } from './bezier2d.js';
|
|
6
|
-
import '../shared/curvy.Bf5TIk31.js';
|
|
7
|
-
import '../vector/vector4.js';
|
|
8
|
-
import '../matrix/matrix3x3.js';
|
|
9
|
-
import '../vector/vector3.js';
|
|
10
|
-
import '../matrix/matrix2x2.js';
|
|
11
|
-
import '../curve/cubic2d.js';
|
|
12
|
-
import '../interval.js';
|
|
13
|
-
import '../shared/curvy.BsHoYJNv.js';
|
|
14
|
-
|
|
15
|
-
declare const Hermite2dTypeId: unique symbol;
|
|
16
|
-
type Hermite2dTypeId = typeof Hermite2dTypeId;
|
|
17
|
-
|
|
18
|
-
interface Hermite2d extends Pipeable {
|
|
19
|
-
readonly [Hermite2dTypeId]: Hermite2dTypeId;
|
|
20
|
-
[Symbol.iterator](): IterableIterator<Vector2>;
|
|
21
|
-
}
|
|
22
|
-
declare const characteristic: Matrix4x4;
|
|
23
|
-
declare const make: (p0: Vector2, v0: Vector2, p1: Vector2, v1: Vector2) => Hermite2d;
|
|
24
|
-
declare const fromArray: (points: ReadonlyArray<Vector2>) => Hermite2d;
|
|
25
|
-
declare const isHermite2d: (p: unknown) => p is Hermite2d;
|
|
26
|
-
declare const append: {
|
|
27
|
-
(p1: Vector2, v1: Vector2): (p: Hermite2d) => Hermite2d;
|
|
28
|
-
(p: Hermite2d, p1: Vector2, v1: Vector2): Hermite2d;
|
|
29
|
-
};
|
|
30
|
-
declare const toPath: (p: Hermite2d) => CubicPath2d;
|
|
31
|
-
declare const toBezier: (p: Hermite2d) => Bezier2d;
|
|
32
|
-
|
|
33
|
-
export { type Hermite2d, append, characteristic, fromArray, isHermite2d, make, toBezier, toPath };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { make as make$2 } from '../matrix/matrix4x4.mjs';
|
|
2
|
-
import { fromCurves } from '../path/cubic2d.mjs';
|
|
3
|
-
import { dual, Pipeable } from '../pipe.mjs';
|
|
4
|
-
import { invariant } from '../utils.mjs';
|
|
5
|
-
import { t as toCurves, f as fromSpline } from '../shared/curvy.CE4X6_Is.mjs';
|
|
6
|
-
import '../shared/curvy.Cps2R_RU.mjs';
|
|
7
|
-
import '../shared/curvy.BZ_mTkJe.mjs';
|
|
8
|
-
import '../shared/curvy.C2XGH0R0.mjs';
|
|
9
|
-
import '../shared/curvy.Cv-wIzDr.mjs';
|
|
10
|
-
import '../shared/curvy.wYJQhFW-.mjs';
|
|
11
|
-
import '../curve/cubic2d.mjs';
|
|
12
|
-
import '../interval.mjs';
|
|
13
|
-
import '../shared/curvy.DmVFTi0N.mjs';
|
|
14
|
-
import '../polynomial/cubic.mjs';
|
|
15
|
-
import '../shared/curvy.BzVmUIKm.mjs';
|
|
16
|
-
import '../shared/curvy.BDhiZ7He.mjs';
|
|
17
|
-
import '../polynomial/quadratic.mjs';
|
|
18
|
-
import '../vector/vector2.mjs';
|
|
19
|
-
import '../curve/linear2d.mjs';
|
|
20
|
-
import '../polynomial/linear.mjs';
|
|
21
|
-
import '../curve/quadratic2d.mjs';
|
|
22
|
-
import '../vector/vector4.mjs';
|
|
23
|
-
|
|
24
|
-
const characteristic$1 = make$2(
|
|
25
|
-
1,
|
|
26
|
-
0,
|
|
27
|
-
0,
|
|
28
|
-
0,
|
|
29
|
-
0,
|
|
30
|
-
1,
|
|
31
|
-
0,
|
|
32
|
-
0,
|
|
33
|
-
-3,
|
|
34
|
-
-2,
|
|
35
|
-
3,
|
|
36
|
-
-1,
|
|
37
|
-
2,
|
|
38
|
-
1,
|
|
39
|
-
-2,
|
|
40
|
-
1
|
|
41
|
-
);
|
|
42
|
-
const Hermite2dTypeId = Symbol("curvy/splines/hermite2d");
|
|
43
|
-
class Hermite2dImpl extends Pipeable {
|
|
44
|
-
[Hermite2dTypeId] = Hermite2dTypeId;
|
|
45
|
-
points;
|
|
46
|
-
constructor(points) {
|
|
47
|
-
invariant(points.length >= 4, "hermite splines requires 4 or more points");
|
|
48
|
-
invariant(
|
|
49
|
-
points.length % 2 === 0,
|
|
50
|
-
"hermite splines requires (n * 2) points"
|
|
51
|
-
);
|
|
52
|
-
super();
|
|
53
|
-
this.points = points;
|
|
54
|
-
}
|
|
55
|
-
[Symbol.iterator]() {
|
|
56
|
-
return this.points[Symbol.iterator]();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const isHermite2d$1 = (p) => typeof p === "object" && p !== null && Hermite2dTypeId in p;
|
|
60
|
-
const make$1 = (p0, v0, p1, v1) => new Hermite2dImpl([p0, v0, p1, v1]);
|
|
61
|
-
const fromArray$1 = (points) => new Hermite2dImpl(points);
|
|
62
|
-
const append$1 = dual(3, (p, p1, v1) => {
|
|
63
|
-
const points = p instanceof Hermite2dImpl ? p.points : Array.from(p);
|
|
64
|
-
return new Hermite2dImpl(points.concat(p1, v1));
|
|
65
|
-
});
|
|
66
|
-
const toPath$1 = (p) => fromCurves(...toCurves(p, characteristic$1, 2));
|
|
67
|
-
const toBezier$1 = (p) => fromSpline(p, characteristic$1, 2);
|
|
68
|
-
|
|
69
|
-
const characteristic = characteristic$1;
|
|
70
|
-
const make = make$1;
|
|
71
|
-
const fromArray = fromArray$1;
|
|
72
|
-
const isHermite2d = isHermite2d$1;
|
|
73
|
-
const append = append$1;
|
|
74
|
-
const toPath = toPath$1;
|
|
75
|
-
const toBezier = toBezier$1;
|
|
76
|
-
|
|
77
|
-
export { append, characteristic, fromArray, isHermite2d, make, toBezier, toPath };
|