@thi.ng/geom-splines 2.3.30 → 2.3.32
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/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/cubic-closest-point.d.ts +1 -1
- package/cubic-hobby.d.ts +2 -1
- package/cubic-quadratic.d.ts +3 -3
- package/package.json +10 -11
- package/quadratic-closest-point.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 201 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/cubic-closest-point.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
5
5
|
* control the recursion behavior. If `eps` is given, the search is terminated
|
|
6
6
|
* as soon as a point with a shorter *squared* distance than `eps` is found.
|
|
7
7
|
*
|
|
8
|
-
* [`minError
|
|
8
|
+
* [`minError`](https://docs.thi.ng/umbrella/math/functions/minError.html)
|
|
9
9
|
*
|
|
10
10
|
* @param p - query point
|
|
11
11
|
* @param a - control point 1
|
package/cubic-hobby.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type ReadonlyVec, type Vec } from "@thi.ng/vectors";
|
|
2
2
|
/**
|
|
3
3
|
* Fits a cubic bezier spline to the given array of `points` and tension param
|
|
4
|
-
* `omega` (in [0,1] range), using John D. Hobby's algorithm/paper: "Smooth,
|
|
4
|
+
* `omega` (in `[0,1]` range), using John D. Hobby's algorithm/paper: "Smooth,
|
|
5
5
|
* Easy to Compute Interpolating Splines".
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* References:
|
|
9
|
+
*
|
|
9
10
|
* - https://link.springer.com/content/pdf/10.1007/BF02187690.pdf
|
|
10
11
|
* - https://web.archive.org/web/20220816011347/https://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/hobby/hobby.pdf
|
|
11
12
|
* - http://weitz.de/hobby/
|
package/cubic-quadratic.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
11
11
|
export declare const cubicFromQuadratic: FnU3<ReadonlyVec, Vec[]>;
|
|
12
12
|
/**
|
|
13
13
|
* Splits given cubic curve (defined by given control points) into 2 quadratic
|
|
14
|
-
* curve segments approximating the original curve. The `gamma` param (in
|
|
15
|
-
* interval) can be used to control the split point (default: 0.5).
|
|
16
|
-
* array of new curves (each a 3-tuple of control points).
|
|
14
|
+
* curve segments approximating the original curve. The `gamma` param (in
|
|
15
|
+
* `[0,1]` interval) can be used to control the split point (default: 0.5).
|
|
16
|
+
* Returns array of new curves (each a 3-tuple of control points).
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
* Reference: https://ttnghia.github.io/pdf/QuadraticApproximation.pdf
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-splines",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.32",
|
|
4
4
|
"description": "nD cubic & quadratic curve analysis, conversion, interpolation, splitting",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -33,23 +33,22 @@
|
|
|
33
33
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
34
34
|
"clean": "bun ../../tools/src/clean-package.ts",
|
|
35
35
|
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
36
|
-
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
37
36
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
38
37
|
"pub": "yarn npm publish --access public",
|
|
39
38
|
"test": "bun test",
|
|
40
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.11.
|
|
44
|
-
"@thi.ng/checks": "^3.6.
|
|
45
|
-
"@thi.ng/geom-arc": "^2.1.
|
|
46
|
-
"@thi.ng/geom-resample": "^3.0.
|
|
47
|
-
"@thi.ng/math": "^5.11.
|
|
48
|
-
"@thi.ng/vectors": "^7.12.
|
|
42
|
+
"@thi.ng/api": "^8.11.20",
|
|
43
|
+
"@thi.ng/checks": "^3.6.23",
|
|
44
|
+
"@thi.ng/geom-arc": "^2.1.165",
|
|
45
|
+
"@thi.ng/geom-resample": "^3.0.32",
|
|
46
|
+
"@thi.ng/math": "^5.11.20",
|
|
47
|
+
"@thi.ng/vectors": "^7.12.20"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
|
-
"esbuild": "^0.
|
|
52
|
-
"typedoc": "^0.27.
|
|
50
|
+
"esbuild": "^0.25.0",
|
|
51
|
+
"typedoc": "^0.27.7",
|
|
53
52
|
"typescript": "^5.7.3"
|
|
54
53
|
},
|
|
55
54
|
"keywords": [
|
|
@@ -149,5 +148,5 @@
|
|
|
149
148
|
"geom-subdiv-curve"
|
|
150
149
|
]
|
|
151
150
|
},
|
|
152
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
153
152
|
}
|
|
@@ -5,7 +5,7 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
5
5
|
* control the recursion behavior. If `eps` is given, the search is terminated
|
|
6
6
|
* as soon as a point with a shorter *squared* distance than `eps` is found.
|
|
7
7
|
*
|
|
8
|
-
* [`minError
|
|
8
|
+
* [`minError`](https://docs.thi.ng/umbrella/math/functions/minError.html)
|
|
9
9
|
*
|
|
10
10
|
* @param p - query point
|
|
11
11
|
* @param a - control point 1
|