@thi.ng/geom-subdiv-curve 2.0.8 → 2.0.9
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 +8 -0
- package/README.md +1 -1
- package/package.json +6 -6
- package/subdivide.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-subdiv-curve@2.0.8...@thi.ng/geom-subdiv-curve@2.0.9) (2021-11-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @thi.ng/geom-subdiv-curve
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-subdiv-curve@2.0.7...@thi.ng/geom-subdiv-curve@2.0.8) (2021-11-04)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @thi.ng/geom-subdiv-curve
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-subdiv-curve",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Freely customizable, iterative nD subdivision curves for open / closed geometries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/geom-api": "^3.0.
|
|
39
|
-
"@thi.ng/transducers": "^8.0.
|
|
40
|
-
"@thi.ng/vectors": "^7.1.
|
|
37
|
+
"@thi.ng/api": "^8.2.0",
|
|
38
|
+
"@thi.ng/geom-api": "^3.0.9",
|
|
39
|
+
"@thi.ng/transducers": "^8.0.8",
|
|
40
|
+
"@thi.ng/vectors": "^7.1.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@thi.ng/testament": "^0.1.6"
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"geom-splines"
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
|
|
90
90
|
}
|
package/subdivide.js
CHANGED
|
@@ -11,7 +11,7 @@ import { transduce } from "@thi.ng/transducers/transduce";
|
|
|
11
11
|
* @param iter - number of iterations
|
|
12
12
|
*/
|
|
13
13
|
export const subdivide = (pts, { fn, pre, size }, iter = 1) => {
|
|
14
|
-
while (--
|
|
14
|
+
while (iter-- > 0) {
|
|
15
15
|
const nump = pts.length;
|
|
16
16
|
pts = transduce(comp(partition(size, 1), mapcatIndexed((i, pts) => fn(pts, i, nump))), push(), pre ? pre(pts) : pts);
|
|
17
17
|
}
|