@thi.ng/geom 3.0.10 → 3.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 (4) hide show
  1. package/CHANGELOG.md +341 -133
  2. package/dev/arcs.js +20 -0
  3. package/dev/chull.js +27 -0
  4. package/package.json +357 -352
package/CHANGELOG.md CHANGED
@@ -1,252 +1,460 @@
1
1
  # Change Log
2
2
 
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
+
3
6
  All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
+
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
11
+
12
+ ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@3.1.0) (2021-11-17)
13
+
14
+ #### 🚀 Features
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
+
22
+ #### ♻️ Refactoring
23
+
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.
30
+
31
+ ### [3.0.10](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@3.0.10) (2021-11-10)
32
+
33
+ #### ♻️ Refactoring
34
+
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
36
+
37
+ ### [3.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@3.0.1) (2021-10-13)
38
+
39
+ #### ♻️ Refactoring
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
44
+
45
+ # [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@3.0.0) (2021-10-12)
46
+
47
+ #### 🛑 Breaking changes
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
61
+
62
+ #### ♻️ Refactoring
63
+
64
+ - rename/restructure internals ([94622fe](https://github.com/thi-ng/umbrella/commit/94622fe))
65
+ - remove internal fns from pkg exports
66
+ - restructure package ([ca56975](https://github.com/thi-ng/umbrella/commit/ca56975))
67
+ - migrate/lift `/src/ctors` source files to `/src` for easier use
68
+ - restructure package ([2439102](https://github.com/thi-ng/umbrella/commit/2439102))
69
+ - migrate/lift `/src/ops` source files to `/src` for easier use
70
+ - sideeffect-free defmulti specs ([2721c1d](https://github.com/thi-ng/umbrella/commit/2721c1d))
71
+ - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
72
+ - largely related to recent updates/restructuring of these packages:
73
+ - api
74
+ - defmulti
75
+ - errors
76
+ - logger
77
+ - update imports (transducers) ([25b674f](https://github.com/thi-ng/umbrella/commit/25b674f))
78
+ - remove obsolete import ([7893fd0](https://github.com/thi-ng/umbrella/commit/7893fd0))
79
+ - update imports ([5ef5559](https://github.com/thi-ng/umbrella/commit/5ef5559))
80
+ - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
81
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
82
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
83
+
84
+ ### [2.1.29](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@2.1.29) (2021-09-03)
5
85
 
6
- ## [3.0.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@3.0.9...@thi.ng/geom@3.0.10) (2021-11-10)
86
+ #### ♻️ Refactoring
7
87
 
8
- **Note:** Version bump only for package @thi.ng/geom
88
+ - fix up TS4.4 changes ([863fa33](https://github.com/thi-ng/umbrella/commit/863fa33))
9
89
 
90
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@2.1.0) (2021-02-20)
10
91
 
92
+ #### 🚀 Features
11
93
 
94
+ - add tangentAt() support for cubic/quadratic ([4302f58](https://github.com/thi-ng/umbrella/commit/4302f58))
12
95
 
96
+ #### 🩹 Bug fixes
13
97
 
14
- ## [3.0.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@3.0.8...@thi.ng/geom@3.0.9) (2021-11-04)
98
+ - fix regression/update buffer arg types ([9cf5e5d](https://github.com/thi-ng/umbrella/commit/9cf5e5d))
99
+ - switch from Vec => NumericArray for backing buffers
100
+ - update remap() / collateWith()
15
101
 
16
- **Note:** Version bump only for package @thi.ng/geom
102
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@2.0.0) (2020-12-22)
17
103
 
104
+ #### 🛑 Breaking changes
18
105
 
106
+ - fix [#256](https://github.com/thi-ng/umbrella/issues/256) replace Type enum w/ alias ([ef7ba74](https://github.com/thi-ng/umbrella/commit/ef7ba74))
107
+ - BREAKING CHANGE: replace Type enum returned by IShape.type w/ string consts
108
+ - update all shape classes
109
+ - update all ops/multimethod dispatches
110
+ - fix [#256](https://github.com/thi-ng/umbrella/issues/256) replace enum w/ type alias ([67988ad](https://github.com/thi-ng/umbrella/commit/67988ad))
111
+ - BREAKING CHANGE: replace SegmentType w/ type alias
19
112
 
113
+ #### 🩹 Bug fixes
20
114
 
115
+ - fix [#268](https://github.com/thi-ng/umbrella/issues/268) add Group.copyTransformed() ([2da6c63](https://github.com/thi-ng/umbrella/commit/2da6c63))
116
+ - update transformVertices(), transform(), translate() impls
21
117
 
22
- ## [3.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@3.0.7...@thi.ng/geom@3.0.8) (2021-11-03)
118
+ ### [1.13.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.13.3) (2020-12-07)
23
119
 
24
- **Note:** Version bump only for package @thi.ng/geom
120
+ #### ♻️ Refactoring
25
121
 
122
+ - update type-only imports ([b8e96cc](https://github.com/thi-ng/umbrella/commit/b8e96cc))
123
+ - update type-only imports in various tests/pkgs ([3fd9c24](https://github.com/thi-ng/umbrella/commit/3fd9c24))
26
124
 
125
+ ### [1.13.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.13.1) (2020-11-24)
27
126
 
127
+ #### 🩹 Bug fixes
28
128
 
129
+ - add missing translate() impls for Cubic/Quadratic ([fe4c027](https://github.com/thi-ng/umbrella/commit/fe4c027))
130
+ - update whitespace check in pathFromSvg() ([2ce5ec1](https://github.com/thi-ng/umbrella/commit/2ce5ec1))
29
131
 
30
- # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@2.1.29...@thi.ng/geom@3.0.0) (2021-10-12)
132
+ ## [1.13.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.13.0) (2020-10-03)
31
133
 
134
+ #### 🩹 Bug fixes
32
135
 
33
- ### Build System
136
+ - arg order pointAt() impl (RAY/RAY3) ([6ec9b46](https://github.com/thi-ng/umbrella/commit/6ec9b46))
34
137
 
35
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
138
+ ## [1.12.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.12.0) (2020-09-22)
36
139
 
140
+ #### 🚀 Features
37
141
 
38
- ### BREAKING CHANGES
142
+ - add basic text support ([9d1424d](https://github.com/thi-ng/umbrella/commit/9d1424d))
39
143
 
40
- * discontinue CommonJS & UMD versions
144
+ #### ♻️ Refactoring
41
145
 
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
146
+ - update fitIntoBounds() fns ([19095b0](https://github.com/thi-ng/umbrella/commit/19095b0))
147
+ - de-dupe asCubic() for polygon/polyline ([65ea389](https://github.com/thi-ng/umbrella/commit/65ea389))
48
148
 
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
149
+ ### [1.11.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.11.7) (2020-08-28)
53
150
 
151
+ #### 🩹 Bug fixes
54
152
 
153
+ - update asPolyline() for PATH/POLYGON ([243962c](https://github.com/thi-ng/umbrella/commit/243962c))
154
+ - ensure last point is unique (copy of 1st)
55
155
 
156
+ ## [1.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.11.0) (2020-07-17)
56
157
 
158
+ #### 🚀 Features
57
159
 
160
+ - add PathBuilderOpts, update Path.toHiccup() ([deb9892](https://github.com/thi-ng/umbrella/commit/deb9892))
161
+ - add support to disable auto-splitting paths in PathBuilder
162
+ - update toHiccup() impl to support multiple `M` cmds
163
+ - add/update clipVertex() impls ([a87c31c](https://github.com/thi-ng/umbrella/commit/a87c31c))
164
+ - add support for `Line` and `Group` shape types
165
+ - update boundary arg type to support raw point arrays
166
+ (rather than only `IShape`). this allows for certain optimizations,
167
+ esp. for group impl.
58
168
 
59
- # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@2.0.6...@thi.ng/geom@2.1.0) (2021-02-20)
169
+ #### 🩹 Bug fixes
60
170
 
61
- ### Bug Fixes
171
+ - update svgDoc() attrib inject (add null check) ([6898975](https://github.com/thi-ng/umbrella/commit/6898975))
62
172
 
63
- - **geom:** fix regression/update buffer arg types ([9cf5e5d](https://github.com/thi-ng/umbrella/commit/9cf5e5d43d648eecfdcba861f44acc4d3e9fd17c))
173
+ #### ♻️ Refactoring
64
174
 
65
- ### Features
175
+ - update various shape ctors ([8b63f9d](https://github.com/thi-ng/umbrella/commit/8b63f9d))
66
176
 
67
- - **geom:** add tangentAt() support for cubic/quadratic ([4302f58](https://github.com/thi-ng/umbrella/commit/4302f58dd4d490fbb0b97754ae7d54f28a8fa269))
177
+ ## [1.10.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.10.0) (2020-06-20)
68
178
 
69
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.13.4...@thi.ng/geom@2.0.0) (2020-12-22)
179
+ #### 🚀 Features
70
180
 
71
- ### Bug Fixes
181
+ - add offset() & initial impls ([819afd1](https://github.com/thi-ng/umbrella/commit/819afd1))
182
+ - add impls for circle, line, rect
183
+ - add rectFromCentroid() ([7837961](https://github.com/thi-ng/umbrella/commit/7837961))
72
184
 
73
- - **geom:** fix [#268](https://github.com/thi-ng/umbrella/issues/268) add Group.copyTransformed() ([2da6c63](https://github.com/thi-ng/umbrella/commit/2da6c63b5a2dbc45bc1272eaf592d3d74d8ce74e))
185
+ #### ♻️ Refactoring
74
186
 
75
- ### Code Refactoring
187
+ - update offset() line impl ([6958280](https://github.com/thi-ng/umbrella/commit/6958280))
76
188
 
77
- - **geom:** fix [#256](https://github.com/thi-ng/umbrella/issues/256) replace enum w/ type alias ([67988ad](https://github.com/thi-ng/umbrella/commit/67988ad31f478b28de85e40d8ab7c51501ef4acb))
78
- - **geom:** fix [#256](https://github.com/thi-ng/umbrella/issues/256) replace Type enum w/ alias ([ef7ba74](https://github.com/thi-ng/umbrella/commit/ef7ba74c189755d760d84c700b0c970a281a3b04))
189
+ ### [1.9.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.9.3) (2020-05-14)
79
190
 
80
- ### BREAKING CHANGES
191
+ #### 🩹 Bug fixes
81
192
 
82
- - **geom:** replace Type enum returned by IShape.type w/ string consts
83
- - update all shape classes
84
- - update all ops/multimethod dispatches
85
- - **geom:** replace SegmentType w/ type alias
193
+ - Path.copy() deep-clone behavior ([2ade10e](https://github.com/thi-ng/umbrella/commit/2ade10e))
86
194
 
87
- ## [1.13.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.13.0...@thi.ng/geom@1.13.1) (2020-11-24)
195
+ ## [1.9.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.9.0) (2020-04-27)
88
196
 
89
- ### Bug Fixes
197
+ #### 🚀 Features
90
198
 
91
- - **geom:** add missing translate() impls for Cubic/Quadratic ([fe4c027](https://github.com/thi-ng/umbrella/commit/fe4c027e8a652ccd7bf7513e9348f21560f50b9c))
92
- - **geom:** update whitespace check in pathFromSvg() ([2ce5ec1](https://github.com/thi-ng/umbrella/commit/2ce5ec178bce371f3b8029ea1041f89e10500ead))
199
+ - update asPolyline() impls ([cca8574](https://github.com/thi-ng/umbrella/commit/cca8574))
200
+ - add arc & quadratic support
201
+ - add transformVertices() op ([ef68a27](https://github.com/thi-ng/umbrella/commit/ef68a27))
93
202
 
94
- # [1.13.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.12.0...@thi.ng/geom@1.13.0) (2020-10-03)
203
+ ### [1.8.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.8.4) (2020-03-06)
95
204
 
96
- ### Bug Fixes
205
+ #### ♻️ Refactoring
97
206
 
98
- - **geom:** arg order pointAt() impl (RAY/RAY3) ([6ec9b46](https://github.com/thi-ng/umbrella/commit/6ec9b462ff4f6aaa0da8634f303ff37c329c8fdf))
207
+ - update skipWS() helper for pathFromSVG() ([ec07ddd](https://github.com/thi-ng/umbrella/commit/ec07ddd))
99
208
 
100
- ### Features
209
+ ## [1.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.8.0) (2020-02-25)
101
210
 
102
- - **vectors, geom:** point on ray at distance ([0b04b80](https://github.com/thi-ng/umbrella/commit/0b04b80f1eaa700e262f99d4726651c90d4fed2b))
211
+ #### 🚀 Features
103
212
 
104
- # [1.12.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.11.8...@thi.ng/geom@1.12.0) (2020-09-22)
213
+ - add cubic polyline impls ([263f2f9](https://github.com/thi-ng/umbrella/commit/263f2f9))
214
+ - add fitIntoBounds3, fix [#202](https://github.com/thi-ng/umbrella/issues/202), [#206](https://github.com/thi-ng/umbrella/issues/206) ([19be3fa](https://github.com/thi-ng/umbrella/commit/19be3fa))
215
+ - add Points3 and supporting ops ([7e1adb7](https://github.com/thi-ng/umbrella/commit/7e1adb7))
216
+ - points3() ctor
217
+ - area()
218
+ - bounds()
219
+ - centroid()
220
+ - flip()
221
+ - pointInside()
222
+ - transform()
223
+ - translate()
224
+ - vertices()
225
+ - add edges() impl for AABB ([b800686](https://github.com/thi-ng/umbrella/commit/b800686))
226
+ - add intersectionAABB/Rect() ([ecc9706](https://github.com/thi-ng/umbrella/commit/ecc9706))
105
227
 
106
- ### Features
228
+ #### 🩹 Bug fixes
107
229
 
108
- - **geom:** add basic text support ([9d1424d](https://github.com/thi-ng/umbrella/commit/9d1424d1c57e4d2c55fb6cfdd507f3ca7cd85dc3))
230
+ - add missing type annotation (asCubic) ([c4f7eae](https://github.com/thi-ng/umbrella/commit/c4f7eae))
109
231
 
110
- ## [1.11.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.11.6...@thi.ng/geom@1.11.7) (2020-08-28)
232
+ #### ♻️ Refactoring
111
233
 
112
- ### Bug Fixes
234
+ - update imports ([69e9ed1](https://github.com/thi-ng/umbrella/commit/69e9ed1))
235
+ - update geom-clip deps & imports ([4fe4bfe](https://github.com/thi-ng/umbrella/commit/4fe4bfe))
113
236
 
114
- - **geom:** update asPolyline() for PATH/POLYGON ([243962c](https://github.com/thi-ng/umbrella/commit/243962ce4b2a690eb84e540f9d55d52d355edc39))
237
+ ### [1.7.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.7.7) (2019-11-09)
115
238
 
116
- # [1.11.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.10.7...@thi.ng/geom@1.11.0) (2020-07-17)
239
+ #### ♻️ Refactoring
117
240
 
118
- ### Bug Fixes
241
+ - update wrapSides/tween call sites in various pkgs ([ee8200c](https://github.com/thi-ng/umbrella/commit/ee8200c))
119
242
 
120
- - **geom:** update svgDoc() attrib inject (add null check) ([6898975](https://github.com/thi-ng/umbrella/commit/6898975f9d1604486add067904ac284d3837dba6))
243
+ ### [1.7.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.7.5) (2019-08-21)
121
244
 
122
- ### Features
245
+ #### ♻️ Refactoring
123
246
 
124
- - **geom:** add PathBuilderOpts, update Path.toHiccup() ([deb9892](https://github.com/thi-ng/umbrella/commit/deb98927bd08f717abbee4d9a171bd3e3236cb00))
125
- - **geom:** add/update clipVertex() impls ([a87c31c](https://github.com/thi-ng/umbrella/commit/a87c31cbb5be4ddd9c6159362386204f396d1f2e))
247
+ - update PCLike copy() impls, add copyShape() helper ([bc20135](https://github.com/thi-ng/umbrella/commit/bc20135))
248
+ - asCubic() Arc impl (re-use cubicFromArc) ([df5c881](https://github.com/thi-ng/umbrella/commit/df5c881))
249
+ - add pclike(), simplify shape factory fns ([ef0d102](https://github.com/thi-ng/umbrella/commit/ef0d102))
250
+ - add internal helpers for improved re-use ([b3dc83f](https://github.com/thi-ng/umbrella/commit/b3dc83f))
251
+ - add copyAttribs()
252
+ - add pointArraysAsShapes()
253
+ - improve internal re-use PathBuilder ([c8ef0cf](https://github.com/thi-ng/umbrella/commit/c8ef0cf))
254
+ - split api.ts, extract PathBuilder / pathFromSVG ([071c346](https://github.com/thi-ng/umbrella/commit/071c346))
126
255
 
127
- # [1.10.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.9.8...@thi.ng/geom@1.10.0) (2020-06-20)
256
+ ### [1.7.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.7.3) (2019-08-16)
128
257
 
129
- ### Features
258
+ #### ♻️ Refactoring
130
259
 
131
- - **geom:** add offset() & initial impls ([819afd1](https://github.com/thi-ng/umbrella/commit/819afd13896661266653a3b71b96ed0549b406ba))
132
- - **geom:** add rectFromCentroid() ([7837961](https://github.com/thi-ng/umbrella/commit/78379612addef0563d09fccb3ed8bb9addd739fc))
260
+ - update pathFromSVG() arc parsing, add readFlag ([2a36128](https://github.com/thi-ng/umbrella/commit/2a36128))
133
261
 
134
- ## [1.9.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.9.2...@thi.ng/geom@1.9.3) (2020-05-14)
262
+ ### [1.7.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.7.1) (2019-07-31)
135
263
 
136
- ### Bug Fixes
264
+ #### ♻️ Refactoring
137
265
 
138
- - **geom:** Path.copy() deep-clone behavior ([2ade10e](https://github.com/thi-ng/umbrella/commit/2ade10e86e83076fd9499ad7ee863caf7c3b463d))
266
+ - update asCubic for circle ([b890838](https://github.com/thi-ng/umbrella/commit/b890838))
267
+ - use full 0..TAU range
139
268
 
140
- # [1.9.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.8.12...@thi.ng/geom@1.9.0) (2020-04-27)
269
+ ## [1.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.7.0) (2019-07-12)
141
270
 
142
- ### Features
271
+ #### 🚀 Features
143
272
 
144
- - **geom:** add transformVertices() op ([ef68a27](https://github.com/thi-ng/umbrella/commit/ef68a2703aab83cf1b520a832a6b1c8268759a3b))
145
- - **geom:** update asPolyline() impls ([cca8574](https://github.com/thi-ng/umbrella/commit/cca85744377c9957af82695236230bc75a005473))
273
+ - add/update transform impls: arc, circle, ellipse, path, rect ([e77e7c2](https://github.com/thi-ng/umbrella/commit/e77e7c2))
274
+ - arc, circle, ellipse now converted to paths, instead of polygons
275
+ - add ellipse support for asCubic() ([4247801](https://github.com/thi-ng/umbrella/commit/4247801))
276
+ - add asPath(), update pathFromCubics() to accept opt attribs ([980af9f](https://github.com/thi-ng/umbrella/commit/980af9f))
277
+ - add asCubic() impls for circle, group, rect ([5ca4166](https://github.com/thi-ng/umbrella/commit/5ca4166))
278
+ - re-use arc impl from geom-splines
279
+ - add polygon impl for asCubic(), add pathFromCubics() ([2faec7f](https://github.com/thi-ng/umbrella/commit/2faec7f))
146
280
 
147
- # [1.8.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.7.10...@thi.ng/geom@1.8.0) (2020-02-25)
281
+ #### 🩹 Bug fixes
148
282
 
149
- ### Bug Fixes
283
+ - update asCubic() circle impl (only 99.99% closed) ([36cdb4f](https://github.com/thi-ng/umbrella/commit/36cdb4f))
150
284
 
151
- - **geom:** add missing type annotation (asCubic) ([c4f7eae](https://github.com/thi-ng/umbrella/commit/c4f7eae7fe45a7e48e43420afe273a06d56ae936))
285
+ ## [1.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.6.0) (2019-07-07)
152
286
 
153
- ### Features
287
+ #### 🚀 Features
154
288
 
155
- - **geom:** add cubic polyline impls ([263f2f9](https://github.com/thi-ng/umbrella/commit/263f2f9709045c40defcd79804a6b10dd44cb6b4))
156
- - **geom:** add edges() impl for AABB ([b800686](https://github.com/thi-ng/umbrella/commit/b800686d42acf105764dddb6591eabc1ea72bcf8))
157
- - **geom:** add fitIntoBounds3, fix [#202](https://github.com/thi-ng/umbrella/issues/202), [#206](https://github.com/thi-ng/umbrella/issues/206) ([19be3fa](https://github.com/thi-ng/umbrella/commit/19be3fa516147a7612515e80c11dfc9ebcff50b3))
158
- - **geom:** add intersectionAABB/Rect() ([ecc9706](https://github.com/thi-ng/umbrella/commit/ecc9706c13d2bf7929b63fb8bf023d8ce2477268))
159
- - **geom:** add Points3 and supporting ops ([7e1adb7](https://github.com/thi-ng/umbrella/commit/7e1adb7b0d4e78dc6988fe3c32e1fd6170914dc8))
289
+ - TS strictNullChecks, update various classes & ops ([636dea7](https://github.com/thi-ng/umbrella/commit/636dea7))
290
+ - make attribs field optional in all shape types
291
+ - update return types of various fns to potentially return undefined
292
+ - enable TS strict compiler flags (refactor) ([aa10de0](https://github.com/thi-ng/umbrella/commit/aa10de0))
160
293
 
161
- # [1.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.6.1...@thi.ng/geom@1.7.0) (2019-07-12)
294
+ #### 🩹 Bug fixes
162
295
 
163
- ### Bug Fixes
296
+ - update madd/maddN call sites ([#95](https://github.com/thi-ng/umbrella/issues/95)) ([a96e028](https://github.com/thi-ng/umbrella/commit/a96e028))
164
297
 
165
- - **geom:** update asCubic() circle impl (only 99.99% closed) ([36cdb4f](https://github.com/thi-ng/umbrella/commit/36cdb4f))
298
+ ## [1.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.5.0) (2019-05-22)
166
299
 
167
- ### Features
300
+ #### 🚀 Features
168
301
 
169
- - **geom:** add asCubic() impls for circle, group, rect ([5ca4166](https://github.com/thi-ng/umbrella/commit/5ca4166))
170
- - **geom:** add asPath(), update pathFromCubics() to accept opt attribs ([980af9f](https://github.com/thi-ng/umbrella/commit/980af9f))
171
- - **geom:** add ellipse support for asCubic() ([4247801](https://github.com/thi-ng/umbrella/commit/4247801))
172
- - **geom:** add polygon impl for asCubic(), add pathFromCubics() ([2faec7f](https://github.com/thi-ng/umbrella/commit/2faec7f))
173
- - **geom:** add/update transform impls: arc, circle, ellipse, path, rect ([e77e7c2](https://github.com/thi-ng/umbrella/commit/e77e7c2))
302
+ - add Plane, Quad3 factories & ops ([2079bfe](https://github.com/thi-ng/umbrella/commit/2079bfe))
174
303
 
175
- # [1.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.5.0...@thi.ng/geom@1.6.0) (2019-07-07)
304
+ ## [1.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.4.0) (2019-04-15)
176
305
 
177
- ### Bug Fixes
306
+ #### 🚀 Features
178
307
 
179
- - **geom:** update madd/maddN call sites ([#95](https://github.com/thi-ng/umbrella/issues/95)) ([a96e028](https://github.com/thi-ng/umbrella/commit/a96e028))
308
+ - add new shape factories & impls ([1a5ead1](https://github.com/thi-ng/umbrella/commit/1a5ead1))
309
+ - add AABB, Plane, Sphere factories
310
+ - add closestPoint() impls
180
311
 
181
- ### Features
312
+ ## [1.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.3.0) (2019-04-11)
182
313
 
183
- - **geom:** enable TS strict compiler flags (refactor) ([aa10de0](https://github.com/thi-ng/umbrella/commit/aa10de0))
184
- - **geom:** TS strictNullChecks, update various classes & ops ([636dea7](https://github.com/thi-ng/umbrella/commit/636dea7))
314
+ #### 🚀 Features
185
315
 
186
- # [1.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.4.2...@thi.ng/geom@1.5.0) (2019-05-22)
316
+ - add inscribedSquare*() fns ([b1790b3](https://github.com/thi-ng/umbrella/commit/b1790b3))
317
+ - add AABB impls for vertices() & volume() ([a9ba010](https://github.com/thi-ng/umbrella/commit/a9ba010))
187
318
 
188
- ### Features
319
+ ### [1.2.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.2.2) (2019-02-15)
189
320
 
190
- - **geom:** add Plane, Quad3 factories & ops ([2079bfe](https://github.com/thi-ng/umbrella/commit/2079bfe))
321
+ #### ♻️ Refactoring
191
322
 
192
- # [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.3.0...@thi.ng/geom@1.4.0) (2019-04-15)
323
+ - update to use [@thi.ng/arrays](https://github.com/thi-ng/umbrella/tree/main/packages/arrays) ([78095f4](https://github.com/thi-ng/umbrella/commit/78095f4))
193
324
 
194
- ### Features
325
+ ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.2.0) (2019-02-05)
195
326
 
196
- - **geom:** add new shape factories & impls ([1a5ead1](https://github.com/thi-ng/umbrella/commit/1a5ead1))
327
+ #### ♻️ Refactoring
197
328
 
198
- # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.2.21...@thi.ng/geom@1.3.0) (2019-04-11)
329
+ - update imports (zip) ([5204a7f](https://github.com/thi-ng/umbrella/commit/5204a7f))
199
330
 
200
- ### Features
331
+ ### [1.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.1.1) (2019-01-31)
201
332
 
202
- - **geom:** add AABB impls for vertices() & volume() ([a9ba010](https://github.com/thi-ng/umbrella/commit/a9ba010))
203
- - **geom:** add inscribedSquare*() fns ([b1790b3](https://github.com/thi-ng/umbrella/commit/b1790b3))
333
+ #### 🚀 Features
204
334
 
205
- # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.1.1...@thi.ng/geom@1.2.0) (2019-02-05)
335
+ - add ray-rect/aabb impls for intersects() ([5f7dd63](https://github.com/thi-ng/umbrella/commit/5f7dd63))
206
336
 
207
- ### Features
337
+ #### ♻️ Refactoring
208
338
 
209
- - **geom:** add ray-rect/aabb impls for intersects() ([5f7dd63](https://github.com/thi-ng/umbrella/commit/5f7dd63))
339
+ - minor update clippedLine() ([4b85288](https://github.com/thi-ng/umbrella/commit/4b85288))
340
+ - swap Group ctor & factory arg order ([6d14f2b](https://github.com/thi-ng/umbrella/commit/6d14f2b))
341
+ - first attribs, then children...
342
+ - update pointInside & classifyPoint impls (delegate) ([226645f](https://github.com/thi-ng/umbrella/commit/226645f))
343
+ - remove obsolete/migrated fns, update deps, readme ([df8332d](https://github.com/thi-ng/umbrella/commit/df8332d))
344
+ - update to use geom-api types ([b223603](https://github.com/thi-ng/umbrella/commit/b223603))
345
+ - remove obsolete/extracted internal ops, update publics ([fb532b8](https://github.com/thi-ng/umbrella/commit/fb532b8))
210
346
 
211
- # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@1.0.1...@thi.ng/geom@1.1.0) (2019-01-22)
347
+ ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.1.0) (2019-01-22)
212
348
 
213
- ### Bug Fixes
349
+ #### 🚀 Features
214
350
 
215
- - **geom:** update Rect.toHiccup() format (separate widht/height vals) ([8c1df49](https://github.com/thi-ng/umbrella/commit/8c1df49))
351
+ - add asPolyline() multi-fn ([c602379](https://github.com/thi-ng/umbrella/commit/c602379))
352
+ - add attrib support to PathBuilder ([a017b10](https://github.com/thi-ng/umbrella/commit/a017b10))
216
353
 
217
- ### Features
354
+ #### 🩹 Bug fixes
218
355
 
219
- - **geom:** add asPolyline() multi-fn ([c602379](https://github.com/thi-ng/umbrella/commit/c602379))
220
- - **geom:** add attrib support to PathBuilder ([a017b10](https://github.com/thi-ng/umbrella/commit/a017b10))
356
+ - update Rect.toHiccup() format (separate widht/height vals) ([8c1df49](https://github.com/thi-ng/umbrella/commit/8c1df49))
221
357
 
222
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@0.2.11...@thi.ng/geom@1.0.0) (2019-01-21)
358
+ ### [1.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.0.1) (2019-01-21)
223
359
 
224
- ### Build System
360
+ #### ♻️ Refactoring
361
+
362
+ - update tangentAt(), use direction() from vectors pkg ([3d499ad](https://github.com/thi-ng/umbrella/commit/3d499ad))
363
+
364
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@1.0.0) (2019-01-21)
365
+
366
+ #### 🛑 Breaking changes
225
367
 
226
368
  - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
369
+ - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
370
+ - build scripts now first build ES6 modules in package root, then call
371
+ `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
372
+ - all imports MUST be updated to only refer to package level
373
+ (not individual files anymore). tree shaking in user land will get rid of
374
+ all unused imported symbols.
375
+
376
+ #### 🚀 Features
377
+
378
+ - re-add barycentric conversions, collation mappers (still unused) ([db4a201](https://github.com/thi-ng/umbrella/commit/db4a201))
379
+ - update closestPoint(), add support for Arc ([63b3a5d](https://github.com/thi-ng/umbrella/commit/63b3a5d))
380
+ - add arcPointAt() helper, refactor Arc, minor other updates ([0e5e776](https://github.com/thi-ng/umbrella/commit/0e5e776))
381
+ - add splitNearPoint() for line & polyline, update Sampler ([910529d](https://github.com/thi-ng/umbrella/commit/910529d))
382
+ - add splitNearPoint(), Sampler.closestT(), internal restructure ([1d754eb](https://github.com/thi-ng/umbrella/commit/1d754eb))
383
+ - add flip() impls ([56f6037](https://github.com/thi-ng/umbrella/commit/56f6037))
384
+ - add pointAt() impls for Cubic/Quadratic ([ebc9a98](https://github.com/thi-ng/umbrella/commit/ebc9a98))
385
+ - add closestPoint() impls for splines, line, polygons, polyline ([eaf1a1b](https://github.com/thi-ng/umbrella/commit/eaf1a1b))
386
+ - add transform() impls for Cubic/Quadratic ([627e20d](https://github.com/thi-ng/umbrella/commit/627e20d))
387
+ - add clippedLine(), minor update liangBarsky() ([d763621](https://github.com/thi-ng/umbrella/commit/d763621))
388
+ - add/update edges(), pointInside() & classifyPoint() impls ([e834597](https://github.com/thi-ng/umbrella/commit/e834597))
389
+ - re-add vertices() impls for Cubic/Quadratic ([f5a53ca](https://github.com/thi-ng/umbrella/commit/f5a53ca))
390
+ - re-add pathFromSvg() ([3c9a7b0](https://github.com/thi-ng/umbrella/commit/3c9a7b0))
391
+ - add intersection checks & intersects() multi-fn ([66267e2](https://github.com/thi-ng/umbrella/commit/66267e2))
392
+ - re-add tessellators ([f1f428a](https://github.com/thi-ng/umbrella/commit/f1f428a))
393
+ - add clipConvex, scatter, warpPoints ([d09cc79](https://github.com/thi-ng/umbrella/commit/d09cc79))
394
+ - add path builder, path & arc op impls ([61cfb0f](https://github.com/thi-ng/umbrella/commit/61cfb0f))
395
+ - re-add arc, cubic, quadratic ops, splitAt & other ops ([fea8fbe](https://github.com/thi-ng/umbrella/commit/fea8fbe))
396
+ - add temp geom3 package (another refactored version of geom2) ([c0e3a0b](https://github.com/thi-ng/umbrella/commit/c0e3a0b))
397
+
398
+ #### 🩹 Bug fixes
399
+
400
+ - update arcFrom2Points() ([62ec49f](https://github.com/thi-ng/umbrella/commit/62ec49f))
401
+
402
+ #### ⏱ Performance improvements
403
+
404
+ - use squared dist for classifyPoint() (circle) ([cd59f66](https://github.com/thi-ng/umbrella/commit/cd59f66))
405
+
406
+ #### ♻️ Refactoring
407
+
408
+ - update withAttribs() return type ([8e2c8b5](https://github.com/thi-ng/umbrella/commit/8e2c8b5))
409
+ - add tessellate() multi-fn, move/rename tessellators ([499e14b](https://github.com/thi-ng/umbrella/commit/499e14b))
410
+ - update imports, fix tests ([c41b96f](https://github.com/thi-ng/umbrella/commit/c41b96f))
411
+
412
+ ### [0.2.11](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@0.2.11) (2019-01-02)
413
+
414
+ #### 🚀 Features
415
+
416
+ - add/rename type ids, add sphere, isec fns ([161199f](https://github.com/thi-ng/umbrella/commit/161199f))
417
+
418
+ ### [0.2.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@0.2.3) (2018-12-01)
419
+
420
+ #### 🚀 Features
421
+
422
+ - re-add arcLength() impls, update imports ([896855d](https://github.com/thi-ng/umbrella/commit/896855d))
423
+
424
+ #### ♻️ Refactoring
425
+
426
+ - update everything to use new vectors package ([d4172ee](https://github.com/thi-ng/umbrella/commit/d4172ee))
227
427
 
228
- ### BREAKING CHANGES
428
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@0.2.0) (2018-10-21)
229
429
 
230
- - enabled multi-outputs (ES6 modules, CJS, UMD)
231
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
232
- - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
430
+ #### 🚀 Features
233
431
 
234
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@0.1.0...@thi.ng/geom@0.2.0) (2018-10-21)
432
+ - add IToCubic, add/update impls ([ce131d4](https://github.com/thi-ng/umbrella/commit/ce131d4))
433
+ - add/update .toCubic() impls for Arc2, Line2, Polyline2
434
+ - add Path2.normalize() to convert all segments to cubics
435
+ - remove mixCubic/mixQuadratic()
235
436
 
236
- ### Features
437
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@0.1.0) (2018-10-17)
237
438
 
238
- - **geom:** add IToCubic, add/update impls ([ce131d4](https://github.com/thi-ng/umbrella/commit/ce131d4))
439
+ #### 🚀 Features
239
440
 
240
- # 0.1.0 (2018-10-17)
441
+ - add/update tessellate() impls ([fa87f1e](https://github.com/thi-ng/umbrella/commit/fa87f1e))
442
+ - add/update factory fns, arg handling, tessel, poly area ([555fc51](https://github.com/thi-ng/umbrella/commit/555fc51))
443
+ - add/update various shape impls & ops ([3a20ef3](https://github.com/thi-ng/umbrella/commit/3a20ef3))
444
+ - re-import & refactor partial port of [@thi.ng/geom](https://github.com/thi-ng/umbrella/tree/main/packages/geom) (clojure) ([d655ec2](https://github.com/thi-ng/umbrella/commit/d655ec2))
445
+ - add/update interfaces & impls ([2657df6](https://github.com/thi-ng/umbrella/commit/2657df6))
446
+ - add CollateOpts, update collate() in both containers
447
+ - add generics for IVertices
448
+ - add ArcSamplingOpts
449
+ - update edges(), vertices() for Arc2 & Circle2
450
+ - add .toJSON() impls
451
+ - add [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/main/packages/checks) dep
452
+ - re-add Arc2, update Circle2, update helper fns ([aa6b120](https://github.com/thi-ng/umbrella/commit/aa6b120))
453
+ - add ICollate & ICopy impls, re-add/update convexHull2 ([3b1bf64](https://github.com/thi-ng/umbrella/commit/3b1bf64))
454
+ - update all shape types, add interfaces & ops, update tests ([9c27c77](https://github.com/thi-ng/umbrella/commit/9c27c77))
241
455
 
242
- ### Features
456
+ #### ♻️ Refactoring
243
457
 
244
- - **geom:** add ICollate & ICopy impls, re-add/update convexHull2 ([3b1bf64](https://github.com/thi-ng/umbrella/commit/3b1bf64))
245
- - **geom:** add/update factory fns, arg handling, tessel, poly area ([555fc51](https://github.com/thi-ng/umbrella/commit/555fc51))
246
- - **geom:** add/update interfaces & impls ([2657df6](https://github.com/thi-ng/umbrella/commit/2657df6))
247
- - **geom:** add/update tessellate() impls ([fa87f1e](https://github.com/thi-ng/umbrella/commit/fa87f1e))
248
- - **geom:** add/update various shape impls & ops ([3a20ef3](https://github.com/thi-ng/umbrella/commit/3a20ef3))
249
- - **geom:** import (updated) old thi.ng/geom package (minus vectors) ([c03259c](https://github.com/thi-ng/umbrella/commit/c03259c))
250
- - **geom:** re-add Arc2, update Circle2, update helper fns ([aa6b120](https://github.com/thi-ng/umbrella/commit/aa6b120))
251
- - **geom:** re-import & refactor partial port of thi.ng/geom (clojure) ([d655ec2](https://github.com/thi-ng/umbrella/commit/d655ec2))
252
- - **geom:** update all shape types, add interfaces & ops, update tests ([9c27c77](https://github.com/thi-ng/umbrella/commit/9c27c77))
458
+ - update deps & [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/main/packages/math) imports ([ffea836](https://github.com/thi-ng/umbrella/commit/ffea836))
459
+ - update arg handling, update readme ([2e9f048](https://github.com/thi-ng/umbrella/commit/2e9f048))
460
+ - add interfaces, split out common.ts into /func folder ([9fb2091](https://github.com/thi-ng/umbrella/commit/9fb2091))
package/dev/arcs.js ADDED
@@ -0,0 +1,20 @@
1
+ const g = require("@thi.ng/geom");
2
+ const fs = require("fs");
3
+
4
+ let a;
5
+ const doc = g.asSvg(
6
+ g.svgDoc(
7
+ { viewBox: "-100 -100 200 200", fill: "none", stroke: "black" },
8
+ //(a = g.arcFrom2Points([-50, 0], [0, 50], [50, 50], 0, false, false)),
9
+ (a = g.arc([0, 0], 50, 0, 0, Math.PI * 1.5, false, true)),
10
+ (b = g.bounds(a)),
11
+ [
12
+ "text",
13
+ { "font-size": 6, fill: "black", stroke: "none" },
14
+ [-80, -80],
15
+ `${a.pos} ${a.start.toFixed(2)} ${a.end.toFixed(2)}`
16
+ ]
17
+ )
18
+ );
19
+
20
+ fs.writeFileSync("circle01.svg", doc);