@thi.ng/geom 3.0.1 → 3.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 +16 -0
- package/README.md +1 -1
- package/api/aabb.js +0 -3
- package/api/apc.js +0 -2
- package/api/arc.js +0 -8
- package/api/circle.js +0 -3
- package/api/ellipse.js +0 -3
- package/api/group.js +0 -2
- package/api/path.js +1 -3
- package/api/plane.js +0 -3
- package/api/ray.js +0 -3
- package/api/rect.js +0 -3
- package/api/sphere.js +0 -3
- package/api/text.js +0 -3
- package/package.json +29 -29
- package/path-builder.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [3.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@3.0.2...@thi.ng/geom@3.0.3) (2021-10-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @thi.ng/geom
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@3.0.1...@thi.ng/geom@3.0.2) (2021-10-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @thi.ng/geom
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [3.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom@3.0.0...@thi.ng/geom@3.0.1) (2021-10-13)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @thi.ng/geom
|
package/README.md
CHANGED
package/api/aabb.js
CHANGED
|
@@ -3,9 +3,6 @@ import { add3 } from "@thi.ng/vectors/add";
|
|
|
3
3
|
import { set } from "@thi.ng/vectors/set";
|
|
4
4
|
import { __copyAttribs } from "../internal/copy.js";
|
|
5
5
|
export class AABB {
|
|
6
|
-
pos;
|
|
7
|
-
attribs;
|
|
8
|
-
size;
|
|
9
6
|
constructor(pos = [0, 0, 0], size = 1, attribs) {
|
|
10
7
|
this.pos = pos;
|
|
11
8
|
this.attribs = attribs;
|
package/api/apc.js
CHANGED
package/api/arc.js
CHANGED
|
@@ -3,14 +3,6 @@ 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;
|
|
14
6
|
constructor(pos, r, axis, start, end, xl = false, cw = false, attribs) {
|
|
15
7
|
this.pos = pos;
|
|
16
8
|
this.r = r;
|
package/api/circle.js
CHANGED
package/api/ellipse.js
CHANGED
|
@@ -2,9 +2,6 @@ import { isNumber } from "@thi.ng/checks/is-number";
|
|
|
2
2
|
import { set } from "@thi.ng/vectors/set";
|
|
3
3
|
import { __copyAttribs } from "../internal/copy.js";
|
|
4
4
|
export class Ellipse {
|
|
5
|
-
pos;
|
|
6
|
-
attribs;
|
|
7
|
-
r;
|
|
8
5
|
constructor(pos = [0, 0], r = [1, 1], attribs) {
|
|
9
6
|
this.pos = pos;
|
|
10
7
|
this.attribs = attribs;
|
package/api/group.js
CHANGED
package/api/path.js
CHANGED
|
@@ -3,12 +3,10 @@ import { illegalState } from "@thi.ng/errors/illegal-state";
|
|
|
3
3
|
import { copy } from "@thi.ng/vectors/copy";
|
|
4
4
|
import { __copyAttribs } from "../internal/copy.js";
|
|
5
5
|
export class Path {
|
|
6
|
-
segments;
|
|
7
|
-
attribs;
|
|
8
|
-
closed = false;
|
|
9
6
|
constructor(segments = [], attribs) {
|
|
10
7
|
this.segments = segments;
|
|
11
8
|
this.attribs = attribs;
|
|
9
|
+
this.closed = false;
|
|
12
10
|
}
|
|
13
11
|
get type() {
|
|
14
12
|
return "path";
|
package/api/plane.js
CHANGED
package/api/ray.js
CHANGED
package/api/rect.js
CHANGED
|
@@ -3,9 +3,6 @@ import { add2 } from "@thi.ng/vectors/add";
|
|
|
3
3
|
import { set2 } from "@thi.ng/vectors/set";
|
|
4
4
|
import { __copyAttribs } from "../internal/copy.js";
|
|
5
5
|
export class Rect {
|
|
6
|
-
pos;
|
|
7
|
-
attribs;
|
|
8
|
-
size;
|
|
9
6
|
constructor(pos = [0, 0], size = 1, attribs) {
|
|
10
7
|
this.pos = pos;
|
|
11
8
|
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": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Functional, polymorphic API for 2D geometry types & SVG generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,35 +34,35 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.0.
|
|
38
|
-
"@thi.ng/arrays": "^2.0.
|
|
39
|
-
"@thi.ng/checks": "^3.0.
|
|
40
|
-
"@thi.ng/defmulti": "^2.0.
|
|
41
|
-
"@thi.ng/equiv": "^2.0.
|
|
42
|
-
"@thi.ng/errors": "^2.0.
|
|
43
|
-
"@thi.ng/geom-api": "^3.0.
|
|
44
|
-
"@thi.ng/geom-arc": "^2.0.
|
|
45
|
-
"@thi.ng/geom-clip-line": "^2.0.
|
|
46
|
-
"@thi.ng/geom-clip-poly": "^2.0.
|
|
47
|
-
"@thi.ng/geom-closest-point": "^2.0.
|
|
48
|
-
"@thi.ng/geom-hull": "^2.0.
|
|
49
|
-
"@thi.ng/geom-isec": "^2.0.
|
|
50
|
-
"@thi.ng/geom-poly-utils": "^2.0.
|
|
51
|
-
"@thi.ng/geom-resample": "^2.0.
|
|
52
|
-
"@thi.ng/geom-splines": "^2.0.
|
|
53
|
-
"@thi.ng/geom-subdiv-curve": "^2.0.
|
|
54
|
-
"@thi.ng/geom-tessellate": "^2.0.
|
|
55
|
-
"@thi.ng/hiccup": "^4.0.
|
|
56
|
-
"@thi.ng/hiccup-svg": "^4.0.
|
|
57
|
-
"@thi.ng/math": "^5.0.
|
|
58
|
-
"@thi.ng/matrices": "^2.0.
|
|
59
|
-
"@thi.ng/random": "^3.0.
|
|
60
|
-
"@thi.ng/strings": "^3.0.
|
|
61
|
-
"@thi.ng/transducers": "^8.0.
|
|
62
|
-
"@thi.ng/vectors": "^7.0.
|
|
37
|
+
"@thi.ng/api": "^8.0.3",
|
|
38
|
+
"@thi.ng/arrays": "^2.0.3",
|
|
39
|
+
"@thi.ng/checks": "^3.0.3",
|
|
40
|
+
"@thi.ng/defmulti": "^2.0.3",
|
|
41
|
+
"@thi.ng/equiv": "^2.0.3",
|
|
42
|
+
"@thi.ng/errors": "^2.0.3",
|
|
43
|
+
"@thi.ng/geom-api": "^3.0.3",
|
|
44
|
+
"@thi.ng/geom-arc": "^2.0.3",
|
|
45
|
+
"@thi.ng/geom-clip-line": "^2.0.3",
|
|
46
|
+
"@thi.ng/geom-clip-poly": "^2.0.3",
|
|
47
|
+
"@thi.ng/geom-closest-point": "^2.0.3",
|
|
48
|
+
"@thi.ng/geom-hull": "^2.0.3",
|
|
49
|
+
"@thi.ng/geom-isec": "^2.0.3",
|
|
50
|
+
"@thi.ng/geom-poly-utils": "^2.0.3",
|
|
51
|
+
"@thi.ng/geom-resample": "^2.0.3",
|
|
52
|
+
"@thi.ng/geom-splines": "^2.0.3",
|
|
53
|
+
"@thi.ng/geom-subdiv-curve": "^2.0.3",
|
|
54
|
+
"@thi.ng/geom-tessellate": "^2.0.3",
|
|
55
|
+
"@thi.ng/hiccup": "^4.0.3",
|
|
56
|
+
"@thi.ng/hiccup-svg": "^4.0.3",
|
|
57
|
+
"@thi.ng/math": "^5.0.3",
|
|
58
|
+
"@thi.ng/matrices": "^2.0.3",
|
|
59
|
+
"@thi.ng/random": "^3.0.3",
|
|
60
|
+
"@thi.ng/strings": "^3.0.3",
|
|
61
|
+
"@thi.ng/transducers": "^8.0.3",
|
|
62
|
+
"@thi.ng/vectors": "^7.0.3"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@thi.ng/testament": "^0.1.
|
|
65
|
+
"@thi.ng/testament": "^0.1.3"
|
|
66
66
|
},
|
|
67
67
|
"keywords": [
|
|
68
68
|
"2d",
|
|
@@ -350,5 +350,5 @@
|
|
|
350
350
|
"thi.ng": {
|
|
351
351
|
"year": 2013
|
|
352
352
|
},
|
|
353
|
-
"gitHead": "
|
|
353
|
+
"gitHead": "1fb38cac74d6c009d96855c28784a267a81badf1"
|
|
354
354
|
}
|
package/path-builder.js
CHANGED
|
@@ -12,13 +12,6 @@ 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;
|
|
22
15
|
constructor(attribs, opts = {}) {
|
|
23
16
|
this.attribs = attribs;
|
|
24
17
|
this.opts = opts;
|