@thi.ng/geom 3.4.4 → 3.4.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-08-01T14:53:59Z
3
+ - **Last updated**: 2022-08-06T15:22:27Z
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
+ ### [3.4.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@3.4.6) (2022-08-06)
13
+
14
+ #### ⏱ Performance improvements
15
+
16
+ - update vector fns ([d8726c9](https://github.com/thi-ng/umbrella/commit/d8726c9))
17
+
12
18
  ## [3.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@3.4.0) (2022-06-28)
13
19
 
14
20
  #### 🚀 Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom",
3
- "version": "3.4.4",
3
+ "version": "3.4.7",
4
4
  "description": "Functional, polymorphic API for 2D geometry types & SVG generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,36 +36,36 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@thi.ng/api": "^8.3.9",
39
- "@thi.ng/arrays": "^2.3.2",
40
- "@thi.ng/associative": "^6.2.2",
41
- "@thi.ng/checks": "^3.2.3",
42
- "@thi.ng/defmulti": "^2.1.9",
39
+ "@thi.ng/arrays": "^2.3.3",
40
+ "@thi.ng/associative": "^6.2.4",
41
+ "@thi.ng/checks": "^3.2.4",
42
+ "@thi.ng/defmulti": "^2.1.11",
43
43
  "@thi.ng/equiv": "^2.1.9",
44
- "@thi.ng/errors": "^2.1.9",
45
- "@thi.ng/geom-api": "^3.3.4",
46
- "@thi.ng/geom-arc": "^2.1.21",
47
- "@thi.ng/geom-clip-line": "^2.1.21",
48
- "@thi.ng/geom-clip-poly": "^2.1.21",
49
- "@thi.ng/geom-closest-point": "^2.1.18",
50
- "@thi.ng/geom-hull": "^2.1.18",
51
- "@thi.ng/geom-isec": "^2.1.21",
52
- "@thi.ng/geom-poly-utils": "^2.3.5",
53
- "@thi.ng/geom-resample": "^2.1.21",
54
- "@thi.ng/geom-splines": "^2.1.21",
55
- "@thi.ng/geom-subdiv-curve": "^2.1.21",
56
- "@thi.ng/geom-tessellate": "^2.1.21",
57
- "@thi.ng/hiccup": "^4.2.12",
58
- "@thi.ng/hiccup-svg": "^4.3.5",
44
+ "@thi.ng/errors": "^2.1.10",
45
+ "@thi.ng/geom-api": "^3.3.6",
46
+ "@thi.ng/geom-arc": "^2.1.23",
47
+ "@thi.ng/geom-clip-line": "^2.1.23",
48
+ "@thi.ng/geom-clip-poly": "^2.1.23",
49
+ "@thi.ng/geom-closest-point": "^2.1.20",
50
+ "@thi.ng/geom-hull": "^2.1.20",
51
+ "@thi.ng/geom-isec": "^2.1.23",
52
+ "@thi.ng/geom-poly-utils": "^2.3.7",
53
+ "@thi.ng/geom-resample": "^2.1.23",
54
+ "@thi.ng/geom-splines": "^2.1.23",
55
+ "@thi.ng/geom-subdiv-curve": "^2.1.23",
56
+ "@thi.ng/geom-tessellate": "^2.1.23",
57
+ "@thi.ng/hiccup": "^4.2.13",
58
+ "@thi.ng/hiccup-svg": "^4.3.8",
59
59
  "@thi.ng/math": "^5.3.5",
60
- "@thi.ng/matrices": "^2.1.18",
61
- "@thi.ng/random": "^3.3.4",
62
- "@thi.ng/strings": "^3.3.8",
63
- "@thi.ng/transducers": "^8.3.9",
64
- "@thi.ng/vectors": "^7.5.10"
60
+ "@thi.ng/matrices": "^2.1.20",
61
+ "@thi.ng/random": "^3.3.5",
62
+ "@thi.ng/strings": "^3.3.9",
63
+ "@thi.ng/transducers": "^8.3.11",
64
+ "@thi.ng/vectors": "^7.5.12"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@microsoft/api-extractor": "^7.25.0",
68
- "@thi.ng/testament": "^0.2.10",
68
+ "@thi.ng/testament": "^0.2.11",
69
69
  "rimraf": "^3.0.2",
70
70
  "tools": "^0.0.1",
71
71
  "typedoc": "^0.22.17",
@@ -380,5 +380,5 @@
380
380
  "thi.ng": {
381
381
  "year": 2013
382
382
  },
383
- "gitHead": "24ec2749982f4193e6bc50173a238f336854bb1c\n"
383
+ "gitHead": "0eeb5054111cea51f4714b013dda8700ade3cd54\n"
384
384
  }
package/plane.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { dot3 } from "@thi.ng/vectors/dot";
2
- import { normalize } from "@thi.ng/vectors/normalize";
2
+ import { normalize3 } from "@thi.ng/vectors/normalize";
3
3
  import { orthoNormal3 } from "@thi.ng/vectors/ortho-normal";
4
4
  import { Plane } from "./api/plane.js";
5
- export const plane = (normal, w, attribs) => new Plane(normalize(null, normal), w, attribs);
5
+ export const plane = (normal, w, attribs) => new Plane(normalize3(null, normal), w, attribs);
6
6
  export const planeWithPoint = (normal, p, attribs) => {
7
- normal = normalize(null, normal);
7
+ normal = normalize3(null, normal);
8
8
  return new Plane(normal, dot3(normal, p), attribs);
9
9
  };
10
10
  export const planeFrom3Points = (a, b, c, attribs) => planeWithPoint(orthoNormal3([], a, b, c), a, attribs);
package/scale.js CHANGED
@@ -3,7 +3,7 @@ import { defmulti } from "@thi.ng/defmulti/defmulti";
3
3
  import { unsupported } from "@thi.ng/errors/unsupported";
4
4
  import { mul2, mul3 } from "@thi.ng/vectors/mul";
5
5
  import { mulN2, mulN3 } from "@thi.ng/vectors/muln";
6
- import { normalize } from "@thi.ng/vectors/normalize";
6
+ import { normalize2 } from "@thi.ng/vectors/normalize";
7
7
  import { AABB } from "./api/aabb.js";
8
8
  import { Circle } from "./api/circle.js";
9
9
  import { Cubic } from "./api/cubic.js";
@@ -98,7 +98,7 @@ export const scale = defmulti(__dispatch, {}, {
98
98
  quadratic: tx(Quadratic),
99
99
  ray: ($, delta) => {
100
100
  delta = __asVec(delta);
101
- return new Ray(mul2([], $.pos, delta), normalize(null, mul2([], $.dir, delta)), __copyAttribs($));
101
+ return new Ray(mul2([], $.pos, delta), normalize2(null, mul2([], $.dir, delta)), __copyAttribs($));
102
102
  },
103
103
  rect: ($, delta) => {
104
104
  delta = __asVec(delta);
package/tangent-at.js CHANGED
@@ -4,7 +4,7 @@ import { cubicTangentAt } from "@thi.ng/geom-splines/cubic-tangent";
4
4
  import { quadraticTangentAt } from "@thi.ng/geom-splines/quadratic-tangent";
5
5
  import { cossin } from "@thi.ng/math/angle";
6
6
  import { HALF_PI, TAU } from "@thi.ng/math/api";
7
- import { direction } from "@thi.ng/vectors/direction";
7
+ import { direction2 } from "@thi.ng/vectors/direction";
8
8
  import { __dispatch } from "./internal/dispatch.js";
9
9
  import { vertices } from "./vertices.js";
10
10
  /**
@@ -32,7 +32,7 @@ export const tangentAt = defmulti(__dispatch, {
32
32
  }, {
33
33
  circle: (_, t) => cossin(TAU * t + HALF_PI),
34
34
  cubic: ({ points }, t) => cubicTangentAt([], points[0], points[1], points[2], points[3], t),
35
- line: ({ points }) => direction([], points[0], points[1]),
35
+ line: ({ points }) => direction2([], points[0], points[1]),
36
36
  poly: ($, t) => new Sampler($.points, true).tangentAt(t),
37
37
  polyline: ($, t) => new Sampler($.points).tangentAt(t),
38
38
  quadratic: ({ points }, t) => quadraticTangentAt([], points[0], points[1], points[2], t),