@thi.ng/geom-splines 2.0.9 → 2.1.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +81 -55
  2. package/dev/arc-debug.js +3 -0
  3. package/package.json +147 -142
package/CHANGELOG.md CHANGED
@@ -1,104 +1,130 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [2.0.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@2.0.8...@thi.ng/geom-splines@2.0.9) (2021-11-10)
7
-
8
- **Note:** Version bump only for package @thi.ng/geom-splines
9
-
10
-
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
11
5
 
6
+ All notable changes to this project will be documented in this file.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
12
8
 
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
13
11
 
14
- ## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@2.0.7...@thi.ng/geom-splines@2.0.8) (2021-11-04)
15
-
16
- **Note:** Version bump only for package @thi.ng/geom-splines
17
-
18
-
12
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@2.1.0) (2021-11-17)
19
13
 
14
+ #### 🚀 Features
20
15
 
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
21
21
 
22
- ## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@2.0.6...@thi.ng/geom-splines@2.0.7) (2021-11-03)
22
+ #### ♻️ Refactoring
23
23
 
24
- **Note:** Version bump only for package @thi.ng/geom-splines
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
25
30
 
31
+ ### [2.0.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@2.0.9) (2021-11-10)
26
32
 
33
+ #### ♻️ Refactoring
27
34
 
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
28
36
 
37
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@2.0.1) (2021-10-13)
29
38
 
30
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@1.0.5...@thi.ng/geom-splines@2.0.0) (2021-10-12)
39
+ #### ♻️ Refactoring
31
40
 
41
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
42
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
43
+ - add .js suffix for all relative imports
32
44
 
33
- ### Build System
45
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@2.0.0) (2021-10-12)
34
46
 
35
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
47
+ #### 🛑 Breaking changes
36
48
 
49
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
50
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
51
+ - only ESM modules will be published from now on
52
+ - CJS obsolete due to ESM support in recent versions of node:
53
+ - i.e. launch NodeJS via:
54
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
55
+ - in the node REPL use `await import(...)` instead of `require()`
56
+ - UMD obsolete due to widespread browser support for ESM
57
+ Also:
58
+ - normalize/restructure/reorg all package.json files
59
+ - cleanup all build scripts, remove obsolete
60
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
37
61
 
38
- ### BREAKING CHANGES
62
+ #### ♻️ Refactoring
39
63
 
40
- * discontinue CommonJS & UMD versions
64
+ - update imports ([a541240](https://github.com/thi-ng/umbrella/commit/a541240))
65
+ - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
66
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
67
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
41
68
 
42
- - only ESM modules will be published from now on
43
- - CJS obsolete due to ESM support in recent versions of node:
44
- - i.e. launch NodeJS via:
45
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
46
- - in the node REPL use `await import(...)` instead of `require()`
47
- - UMD obsolete due to widespread browser support for ESM
69
+ ### [0.5.37](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.5.37) (2020-12-07)
48
70
 
49
- Also:
50
- - normalize/restructure/reorg all package.json files
51
- - cleanup all build scripts, remove obsolete
52
- - switch from mocha to @thi.ng/testament for all tests
71
+ #### ♻️ Refactoring
53
72
 
73
+ - update type-only imports in various tests/pkgs ([3fd9c24](https://github.com/thi-ng/umbrella/commit/3fd9c24))
54
74
 
75
+ ### [0.5.32](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.5.32) (2020-09-13)
55
76
 
77
+ #### ♻️ Refactoring
56
78
 
79
+ - update deps, imports, use new Fn types ([780a7b7](https://github.com/thi-ng/umbrella/commit/780a7b7))
57
80
 
81
+ ## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.5.0) (2020-02-25)
58
82
 
59
- ## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@1.0.4...@thi.ng/geom-splines@1.0.5) (2021-09-03)
83
+ #### 🚀 Features
60
84
 
61
- **Note:** Version bump only for package @thi.ng/geom-splines
85
+ - add openCubicFromBreakPoints(), refactor, [#208](https://github.com/thi-ng/umbrella/issues/208) ([1882262](https://github.com/thi-ng/umbrella/commit/1882262))
86
+ - add sampleCubicArray(), sampleQuadraticArray(), [#208](https://github.com/thi-ng/umbrella/issues/208) ([bfc09db](https://github.com/thi-ng/umbrella/commit/bfc09db))
87
+ - add openCubicFromControlPoints(), [#208](https://github.com/thi-ng/umbrella/issues/208) ([1a95d94](https://github.com/thi-ng/umbrella/commit/1a95d94))
62
88
 
63
- # [0.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@0.4.5...@thi.ng/geom-splines@0.5.0) (2020-02-25)
89
+ #### ♻️ Refactoring
64
90
 
65
- ### Features
91
+ - update imports ([03f629d](https://github.com/thi-ng/umbrella/commit/03f629d))
66
92
 
67
- - **geom-splines:** add openCubicFromBreakPoints(), refactor, [#208](https://github.com/thi-ng/umbrella/issues/208) ([1882262](https://github.com/thi-ng/umbrella/commit/188226216099a33b6251540b497ce8fd946502d8))
68
- - **geom-splines:** add openCubicFromControlPoints(), [#208](https://github.com/thi-ng/umbrella/issues/208) ([1a95d94](https://github.com/thi-ng/umbrella/commit/1a95d94df2396e14247cca84d3add7385d74a693))
69
- - **geom-splines:** add sampleCubicArray(), sampleQuadraticArray(), [#208](https://github.com/thi-ng/umbrella/issues/208) ([bfc09db](https://github.com/thi-ng/umbrella/commit/bfc09db2493d50576c9f57a93273a3bd102b7ad8))
93
+ ## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.4.0) (2019-08-21)
70
94
 
71
- # [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@0.3.4...@thi.ng/geom-splines@0.4.0) (2019-08-21)
95
+ #### 🚀 Features
72
96
 
73
- ### Features
97
+ - add cubicTangentAt / quadraticTangentAt() ([e1cf355](https://github.com/thi-ng/umbrella/commit/e1cf355))
74
98
 
75
- - **geom-splines:** add cubicTangentAt / quadraticTangentAt() ([e1cf355](https://github.com/thi-ng/umbrella/commit/e1cf355))
99
+ #### ♻️ Refactoring
76
100
 
77
- ## [0.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@0.3.0...@thi.ng/geom-splines@0.3.1) (2019-07-31)
101
+ - split up closedCubicFromControlPoints() ([17ac114](https://github.com/thi-ng/umbrella/commit/17ac114))
102
+ - update cubicBounds() & sampleCubic/Quadratic() ([c3f0973](https://github.com/thi-ng/umbrella/commit/c3f0973))
103
+ - extract private __sample() HOF & re-use
78
104
 
79
- ### Bug Fixes
105
+ ### [0.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.3.1) (2019-07-31)
80
106
 
81
- - **geom-splines:** fix seg count in cubicFromArc(), minor optimizations ([e289ade](https://github.com/thi-ng/umbrella/commit/e289ade))
107
+ #### 🩹 Bug fixes
82
108
 
83
- # [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@0.2.1...@thi.ng/geom-splines@0.3.0) (2019-07-12)
109
+ - fix seg count in cubicFromArc(), minor optimizations ([e289ade](https://github.com/thi-ng/umbrella/commit/e289ade))
84
110
 
85
- ### Bug Fixes
111
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.3.0) (2019-07-12)
86
112
 
87
- - **geom-splines:** add full circle check for cubicFromArc() ([3e386f7](https://github.com/thi-ng/umbrella/commit/3e386f7))
88
- - **geom-splines:** fix [#100](https://github.com/thi-ng/umbrella/issues/100), replace cubicBounds impl ([6c64b88](https://github.com/thi-ng/umbrella/commit/6c64b88))
113
+ #### 🚀 Features
89
114
 
90
- ### Features
115
+ - add closedCubicFromBreak/ControlPoints, update readme ([1284f37](https://github.com/thi-ng/umbrella/commit/1284f37))
91
116
 
92
- - **geom-splines:** add closedCubicFromBreak/ControlPoints, update readme ([1284f37](https://github.com/thi-ng/umbrella/commit/1284f37))
117
+ #### 🩹 Bug fixes
93
118
 
94
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-splines@0.1.17...@thi.ng/geom-splines@0.2.0) (2019-07-07)
119
+ - add full circle check for cubicFromArc() ([3e386f7](https://github.com/thi-ng/umbrella/commit/3e386f7))
120
+ - fix [#100](https://github.com/thi-ng/umbrella/issues/100), replace cubicBounds impl ([6c64b88](https://github.com/thi-ng/umbrella/commit/6c64b88))
95
121
 
96
- ### Features
122
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-splines@0.2.0) (2019-07-07)
97
123
 
98
- - **geom-splines:** enable TS strict compiler flags (refactor) ([748417b](https://github.com/thi-ng/umbrella/commit/748417b))
124
+ #### 🚀 Features
99
125
 
100
- # 0.1.0 (2019-02-05)
126
+ - enable TS strict compiler flags (refactor) ([748417b](https://github.com/thi-ng/umbrella/commit/748417b))
101
127
 
102
- ### Features
128
+ #### ♻️ Refactoring
103
129
 
104
- - **geom-splines:** extract from geom as new package ([027150a](https://github.com/thi-ng/umbrella/commit/027150a))
130
+ - TS strictNullChecks, update return types ([198fb4c](https://github.com/thi-ng/umbrella/commit/198fb4c))
@@ -0,0 +1,3 @@
1
+ const splines = require("@thi.ng/geom-splines");
2
+
3
+ console.log(splines.cubicFromArc([0, 0], [100, 100], 0, 0, Math.PI * 1.66));
package/package.json CHANGED
@@ -1,143 +1,148 @@
1
1
  {
2
- "name": "@thi.ng/geom-splines",
3
- "version": "2.0.9",
4
- "description": "nD cubic & quadratic curve analysis, conversion, interpolation, splitting",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/geom-splines#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc internal",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "test": "testament test"
35
- },
36
- "dependencies": {
37
- "@thi.ng/api": "^8.2.0",
38
- "@thi.ng/checks": "^3.0.7",
39
- "@thi.ng/geom-api": "^3.0.9",
40
- "@thi.ng/geom-arc": "^2.0.9",
41
- "@thi.ng/geom-resample": "^2.0.9",
42
- "@thi.ng/math": "^5.0.8",
43
- "@thi.ng/vectors": "^7.1.1"
44
- },
45
- "devDependencies": {
46
- "@thi.ng/testament": "^0.1.6"
47
- },
48
- "keywords": [
49
- "2d",
50
- "3d",
51
- "arc",
52
- "bbox",
53
- "bezier",
54
- "conversion",
55
- "cubic",
56
- "curve",
57
- "elliptic",
58
- "geometry",
59
- "interpolation",
60
- "nd",
61
- "proximity",
62
- "quadratic",
63
- "sample",
64
- "shape",
65
- "spline",
66
- "split",
67
- "typescript"
68
- ],
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "engines": {
73
- "node": ">=12.7"
74
- },
75
- "files": [
76
- "*.js",
77
- "*.d.ts",
78
- "internal"
79
- ],
80
- "exports": {
81
- ".": {
82
- "import": "./index.js"
83
- },
84
- "./cubic-arc": {
85
- "import": "./cubic-arc.js"
86
- },
87
- "./cubic-bounds": {
88
- "import": "./cubic-bounds.js"
89
- },
90
- "./cubic-closest-point": {
91
- "import": "./cubic-closest-point.js"
92
- },
93
- "./cubic-from-breakpoints": {
94
- "import": "./cubic-from-breakpoints.js"
95
- },
96
- "./cubic-from-controlpoints": {
97
- "import": "./cubic-from-controlpoints.js"
98
- },
99
- "./cubic-line": {
100
- "import": "./cubic-line.js"
101
- },
102
- "./cubic-quadratic": {
103
- "import": "./cubic-quadratic.js"
104
- },
105
- "./cubic-sample": {
106
- "import": "./cubic-sample.js"
107
- },
108
- "./cubic-split": {
109
- "import": "./cubic-split.js"
110
- },
111
- "./cubic-tangent": {
112
- "import": "./cubic-tangent.js"
113
- },
114
- "./point-at": {
115
- "import": "./point-at.js"
116
- },
117
- "./quadratic-bounds": {
118
- "import": "./quadratic-bounds.js"
119
- },
120
- "./quadratic-closest-point": {
121
- "import": "./quadratic-closest-point.js"
122
- },
123
- "./quadratic-line": {
124
- "import": "./quadratic-line.js"
125
- },
126
- "./quadratic-sample": {
127
- "import": "./quadratic-sample.js"
128
- },
129
- "./quadratic-split": {
130
- "import": "./quadratic-split.js"
131
- },
132
- "./quadratic-tangent": {
133
- "import": "./quadratic-tangent.js"
134
- }
135
- },
136
- "thi.ng": {
137
- "parent": "@thi.ng/geom",
138
- "related": [
139
- "geom-subdiv-curve"
140
- ]
141
- },
142
- "gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
143
- }
2
+ "name": "@thi.ng/geom-splines",
3
+ "version": "2.1.3",
4
+ "description": "nD cubic & quadratic curve analysis, conversion, interpolation, splitting",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/geom-splines#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc internal",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/api": "^8.3.2",
38
+ "@thi.ng/checks": "^3.1.2",
39
+ "@thi.ng/geom-api": "^3.1.3",
40
+ "@thi.ng/geom-arc": "^2.1.3",
41
+ "@thi.ng/geom-resample": "^2.1.3",
42
+ "@thi.ng/math": "^5.1.2",
43
+ "@thi.ng/vectors": "^7.3.0"
44
+ },
45
+ "devDependencies": {
46
+ "@microsoft/api-extractor": "^7.18.19",
47
+ "@thi.ng/testament": "^0.2.2",
48
+ "rimraf": "^3.0.2",
49
+ "tools": "^0.0.1",
50
+ "typedoc": "^0.22.9",
51
+ "typescript": "^4.5.2"
52
+ },
53
+ "keywords": [
54
+ "2d",
55
+ "3d",
56
+ "arc",
57
+ "bbox",
58
+ "bezier",
59
+ "conversion",
60
+ "cubic",
61
+ "curve",
62
+ "elliptic",
63
+ "geometry",
64
+ "interpolation",
65
+ "nd",
66
+ "proximity",
67
+ "quadratic",
68
+ "sample",
69
+ "shape",
70
+ "spline",
71
+ "split",
72
+ "typescript"
73
+ ],
74
+ "publishConfig": {
75
+ "access": "public"
76
+ },
77
+ "engines": {
78
+ "node": ">=12.7"
79
+ },
80
+ "files": [
81
+ "*.js",
82
+ "*.d.ts",
83
+ "internal"
84
+ ],
85
+ "exports": {
86
+ ".": {
87
+ "import": "./index.js"
88
+ },
89
+ "./cubic-arc": {
90
+ "import": "./cubic-arc.js"
91
+ },
92
+ "./cubic-bounds": {
93
+ "import": "./cubic-bounds.js"
94
+ },
95
+ "./cubic-closest-point": {
96
+ "import": "./cubic-closest-point.js"
97
+ },
98
+ "./cubic-from-breakpoints": {
99
+ "import": "./cubic-from-breakpoints.js"
100
+ },
101
+ "./cubic-from-controlpoints": {
102
+ "import": "./cubic-from-controlpoints.js"
103
+ },
104
+ "./cubic-line": {
105
+ "import": "./cubic-line.js"
106
+ },
107
+ "./cubic-quadratic": {
108
+ "import": "./cubic-quadratic.js"
109
+ },
110
+ "./cubic-sample": {
111
+ "import": "./cubic-sample.js"
112
+ },
113
+ "./cubic-split": {
114
+ "import": "./cubic-split.js"
115
+ },
116
+ "./cubic-tangent": {
117
+ "import": "./cubic-tangent.js"
118
+ },
119
+ "./point-at": {
120
+ "import": "./point-at.js"
121
+ },
122
+ "./quadratic-bounds": {
123
+ "import": "./quadratic-bounds.js"
124
+ },
125
+ "./quadratic-closest-point": {
126
+ "import": "./quadratic-closest-point.js"
127
+ },
128
+ "./quadratic-line": {
129
+ "import": "./quadratic-line.js"
130
+ },
131
+ "./quadratic-sample": {
132
+ "import": "./quadratic-sample.js"
133
+ },
134
+ "./quadratic-split": {
135
+ "import": "./quadratic-split.js"
136
+ },
137
+ "./quadratic-tangent": {
138
+ "import": "./quadratic-tangent.js"
139
+ }
140
+ },
141
+ "thi.ng": {
142
+ "parent": "@thi.ng/geom",
143
+ "related": [
144
+ "geom-subdiv-curve"
145
+ ]
146
+ },
147
+ "gitHead": "d777b58d7bec4496d38166cdabda4ffb78b0dc47\n"
148
+ }