@thi.ng/geom 6.0.0 → 6.0.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.
- package/CHANGELOG.md +7 -1
- package/README.md +1 -1
- package/api/aabb.js +3 -0
- package/api/apc.js +2 -0
- package/api/arc.js +8 -0
- package/api/circle.js +3 -0
- package/api/ellipse.js +3 -0
- package/api/group.js +2 -0
- package/api/path.js +3 -1
- package/api/plane.js +3 -0
- package/api/ray.js +3 -0
- package/api/rect.js +3 -0
- package/api/sphere.js +3 -0
- package/api/text.js +3 -0
- package/package.json +34 -35
- package/path-builder.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-11-
|
|
3
|
+
- **Last updated**: 2023-11-09T10:28:19Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [6.0.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@6.0.2) (2023-11-09)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
|
|
17
|
+
|
|
12
18
|
# [6.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@6.0.0) (2023-11-01)
|
|
13
19
|
|
|
14
20
|
#### 🛑 Breaking changes
|
package/README.md
CHANGED
package/api/aabb.js
CHANGED
|
@@ -7,6 +7,9 @@ import { subN3 } from "@thi.ng/vectors/subn";
|
|
|
7
7
|
import { __asVec } from "../internal/args.js";
|
|
8
8
|
import { __copyAttribs } from "../internal/copy.js";
|
|
9
9
|
export class AABB {
|
|
10
|
+
pos;
|
|
11
|
+
attribs;
|
|
12
|
+
size;
|
|
10
13
|
constructor(pos = [0, 0, 0], size = 1, attribs) {
|
|
11
14
|
this.pos = pos;
|
|
12
15
|
this.attribs = attribs;
|
package/api/apc.js
CHANGED
package/api/arc.js
CHANGED
|
@@ -3,6 +3,14 @@ import { pointAt as arcPointAt, pointAtTheta as arcPointAtTheta, } from "@thi.ng
|
|
|
3
3
|
import { set } from "@thi.ng/vectors/set";
|
|
4
4
|
import { __copyAttribs } from "../internal/copy.js";
|
|
5
5
|
export class Arc {
|
|
6
|
+
pos;
|
|
7
|
+
r;
|
|
8
|
+
axis;
|
|
9
|
+
start;
|
|
10
|
+
end;
|
|
11
|
+
xl;
|
|
12
|
+
cw;
|
|
13
|
+
attribs;
|
|
6
14
|
constructor(pos, r, axis, start, end, xl = false, cw = false, attribs) {
|
|
7
15
|
this.pos = pos;
|
|
8
16
|
this.r = r;
|
package/api/circle.js
CHANGED
package/api/ellipse.js
CHANGED
|
@@ -2,6 +2,9 @@ import { set } from "@thi.ng/vectors/set";
|
|
|
2
2
|
import { __asVec } from "../internal/args.js";
|
|
3
3
|
import { __copyAttribs } from "../internal/copy.js";
|
|
4
4
|
export class Ellipse {
|
|
5
|
+
pos;
|
|
6
|
+
attribs;
|
|
7
|
+
r;
|
|
5
8
|
constructor(pos = [0, 0], r = [1, 1], attribs) {
|
|
6
9
|
this.pos = pos;
|
|
7
10
|
this.attribs = attribs;
|
package/api/group.js
CHANGED
package/api/path.js
CHANGED
|
@@ -4,9 +4,11 @@ import { illegalState } from "@thi.ng/errors/illegal-state";
|
|
|
4
4
|
import { copy } from "@thi.ng/vectors/copy";
|
|
5
5
|
import { __copyAttribs } from "../internal/copy.js";
|
|
6
6
|
export class Path {
|
|
7
|
+
attribs;
|
|
8
|
+
segments;
|
|
9
|
+
closed = false;
|
|
7
10
|
constructor(segments, attribs) {
|
|
8
11
|
this.attribs = attribs;
|
|
9
|
-
this.closed = false;
|
|
10
12
|
this.segments = segments ? ensureArray(segments) : [];
|
|
11
13
|
}
|
|
12
14
|
get type() {
|
package/api/plane.js
CHANGED
package/api/ray.js
CHANGED
package/api/rect.js
CHANGED
|
@@ -7,6 +7,9 @@ import { subN2 } from "@thi.ng/vectors/subn";
|
|
|
7
7
|
import { __asVec } from "../internal/args.js";
|
|
8
8
|
import { __copyAttribs } from "../internal/copy.js";
|
|
9
9
|
export class Rect {
|
|
10
|
+
pos;
|
|
11
|
+
attribs;
|
|
12
|
+
size;
|
|
10
13
|
constructor(pos = [0, 0], size = 1, attribs) {
|
|
11
14
|
this.pos = pos;
|
|
12
15
|
this.attribs = attribs;
|
package/api/sphere.js
CHANGED
package/api/text.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Functional, polymorphic API for 2D geometry types & SVG generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -28,47 +28,46 @@
|
|
|
28
28
|
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc api ctors internal",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
|
-
"doc:readme": "
|
|
32
|
-
"doc:stats": "tools:module-stats",
|
|
31
|
+
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
33
32
|
"pub": "yarn npm publish --access public",
|
|
34
|
-
"test": "
|
|
33
|
+
"test": "bun test",
|
|
35
34
|
"tool:bpatch": "tools:node-esm tools/bpatch.ts"
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/arrays": "^2.7.
|
|
40
|
-
"@thi.ng/associative": "^6.3.
|
|
41
|
-
"@thi.ng/checks": "^3.4.
|
|
42
|
-
"@thi.ng/defmulti": "^3.0.
|
|
43
|
-
"@thi.ng/equiv": "^2.1.
|
|
44
|
-
"@thi.ng/errors": "^2.4.
|
|
45
|
-
"@thi.ng/geom-api": "^3.4.
|
|
46
|
-
"@thi.ng/geom-arc": "^2.1.
|
|
47
|
-
"@thi.ng/geom-clip-line": "^2.3.
|
|
48
|
-
"@thi.ng/geom-clip-poly": "^2.1.
|
|
49
|
-
"@thi.ng/geom-closest-point": "^2.1.
|
|
50
|
-
"@thi.ng/geom-hull": "^2.1.
|
|
51
|
-
"@thi.ng/geom-isec": "^2.1.
|
|
52
|
-
"@thi.ng/geom-poly-utils": "^2.3.
|
|
53
|
-
"@thi.ng/geom-resample": "^2.3.
|
|
54
|
-
"@thi.ng/geom-splines": "^2.2.
|
|
55
|
-
"@thi.ng/geom-subdiv-curve": "^2.1.
|
|
56
|
-
"@thi.ng/geom-tessellate": "^2.1.
|
|
57
|
-
"@thi.ng/hiccup": "^5.0.
|
|
58
|
-
"@thi.ng/hiccup-svg": "^5.0.
|
|
59
|
-
"@thi.ng/math": "^5.7.
|
|
60
|
-
"@thi.ng/matrices": "^2.2.
|
|
61
|
-
"@thi.ng/random": "^3.6.
|
|
62
|
-
"@thi.ng/strings": "^3.6.
|
|
63
|
-
"@thi.ng/transducers": "^8.8.
|
|
64
|
-
"@thi.ng/vectors": "^7.8.
|
|
37
|
+
"@thi.ng/api": "^8.9.8",
|
|
38
|
+
"@thi.ng/arrays": "^2.7.4",
|
|
39
|
+
"@thi.ng/associative": "^6.3.19",
|
|
40
|
+
"@thi.ng/checks": "^3.4.8",
|
|
41
|
+
"@thi.ng/defmulti": "^3.0.6",
|
|
42
|
+
"@thi.ng/equiv": "^2.1.33",
|
|
43
|
+
"@thi.ng/errors": "^2.4.2",
|
|
44
|
+
"@thi.ng/geom-api": "^3.4.45",
|
|
45
|
+
"@thi.ng/geom-arc": "^2.1.88",
|
|
46
|
+
"@thi.ng/geom-clip-line": "^2.3.45",
|
|
47
|
+
"@thi.ng/geom-clip-poly": "^2.1.87",
|
|
48
|
+
"@thi.ng/geom-closest-point": "^2.1.83",
|
|
49
|
+
"@thi.ng/geom-hull": "^2.1.83",
|
|
50
|
+
"@thi.ng/geom-isec": "^2.1.87",
|
|
51
|
+
"@thi.ng/geom-poly-utils": "^2.3.71",
|
|
52
|
+
"@thi.ng/geom-resample": "^2.3.9",
|
|
53
|
+
"@thi.ng/geom-splines": "^2.2.62",
|
|
54
|
+
"@thi.ng/geom-subdiv-curve": "^2.1.87",
|
|
55
|
+
"@thi.ng/geom-tessellate": "^2.1.88",
|
|
56
|
+
"@thi.ng/hiccup": "^5.0.7",
|
|
57
|
+
"@thi.ng/hiccup-svg": "^5.0.33",
|
|
58
|
+
"@thi.ng/math": "^5.7.3",
|
|
59
|
+
"@thi.ng/matrices": "^2.2.8",
|
|
60
|
+
"@thi.ng/random": "^3.6.14",
|
|
61
|
+
"@thi.ng/strings": "^3.6.6",
|
|
62
|
+
"@thi.ng/transducers": "^8.8.10",
|
|
63
|
+
"@thi.ng/vectors": "^7.8.4"
|
|
65
64
|
},
|
|
66
65
|
"devDependencies": {
|
|
67
|
-
"@microsoft/api-extractor": "^7.38.
|
|
68
|
-
"@thi.ng/testament": "^0.
|
|
66
|
+
"@microsoft/api-extractor": "^7.38.2",
|
|
67
|
+
"@thi.ng/testament": "^0.4.1",
|
|
69
68
|
"rimraf": "^5.0.5",
|
|
70
69
|
"tools": "^0.0.1",
|
|
71
|
-
"typedoc": "^0.25.
|
|
70
|
+
"typedoc": "^0.25.3",
|
|
72
71
|
"typescript": "^5.2.2"
|
|
73
72
|
},
|
|
74
73
|
"keywords": [
|
|
@@ -398,5 +397,5 @@
|
|
|
398
397
|
],
|
|
399
398
|
"year": 2013
|
|
400
399
|
},
|
|
401
|
-
"gitHead": "
|
|
400
|
+
"gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
|
|
402
401
|
}
|
package/path-builder.js
CHANGED
|
@@ -12,6 +12,13 @@ import { Path } from "./api/path.js";
|
|
|
12
12
|
import { Quadratic } from "./api/quadratic.js";
|
|
13
13
|
import { arcFrom2Points } from "./arc.js";
|
|
14
14
|
export class PathBuilder {
|
|
15
|
+
attribs;
|
|
16
|
+
opts;
|
|
17
|
+
paths;
|
|
18
|
+
curr;
|
|
19
|
+
currP;
|
|
20
|
+
bezierP;
|
|
21
|
+
startP;
|
|
15
22
|
constructor(attribs, opts = {}) {
|
|
16
23
|
this.attribs = attribs;
|
|
17
24
|
this.opts = opts;
|