@thi.ng/matrices 2.2.14 → 2.3.0

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**: 2023-12-11T10:07:09Z
3
+ - **Last updated**: 2023-12-18T22:05:31Z
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
+ ## [2.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/matrices@2.3.0) (2023-12-18)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add rotationAroundPoint23() ([7b3ed38](https://github.com/thi-ng/umbrella/commit/7b3ed38))
17
+
12
18
  ### [2.2.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/matrices@2.2.7) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -82,7 +82,7 @@ For Node.js REPL:
82
82
  const matrices = await import("@thi.ng/matrices");
83
83
  ```
84
84
 
85
- Package sizes (brotli'd, pre-treeshake): ESM: 5.07 KB
85
+ Package sizes (brotli'd, pre-treeshake): ESM: 5.08 KB
86
86
 
87
87
  ## Dependencies
88
88
 
@@ -128,6 +128,7 @@ directory are using this package:
128
128
  - `fit23` / `fit44`
129
129
  - `rotation22` / `rotation23`
130
130
  - `rotationAroundAxis33` / `rotationAroundAxis44`
131
+ - `rotationAroundPoint23`
131
132
  - `rotationX33` / `rotationX44`
132
133
  - `rotationY33` / `rotationY44`
133
134
  - `rotationZ33` / `rotationZ44`
package/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export * from "./quat-euler.js";
41
41
  export * from "./quat-m33.js";
42
42
  export * from "./quat-m44.js";
43
43
  export * from "./rotation-around-axis.js";
44
+ export * from "./rotation-around-point.js";
44
45
  export * from "./rotation.js";
45
46
  export * from "./row.js";
46
47
  export * from "./scale.js";
package/index.js CHANGED
@@ -41,6 +41,7 @@ export * from "./quat-euler.js";
41
41
  export * from "./quat-m33.js";
42
42
  export * from "./quat-m44.js";
43
43
  export * from "./rotation-around-axis.js";
44
+ export * from "./rotation-around-point.js";
44
45
  export * from "./rotation.js";
45
46
  export * from "./row.js";
46
47
  export * from "./scale.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/matrices",
3
- "version": "2.2.14",
3
+ "version": "2.3.0",
4
4
  "description": "Matrix & quaternion operations for 2D/3D geometry processing",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,10 +35,10 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.12",
39
- "@thi.ng/checks": "^3.4.12",
40
- "@thi.ng/math": "^5.7.7",
41
- "@thi.ng/vectors": "^7.8.10"
38
+ "@thi.ng/api": "^8.9.13",
39
+ "@thi.ng/checks": "^3.4.13",
40
+ "@thi.ng/math": "^5.7.8",
41
+ "@thi.ng/vectors": "^7.8.11"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "^7.38.3",
@@ -81,7 +81,7 @@
81
81
  "setTimeout": false
82
82
  },
83
83
  "engines": {
84
- "node": ">=12.7"
84
+ "node": ">=18"
85
85
  },
86
86
  "files": [
87
87
  "./*.js",
@@ -221,6 +221,9 @@
221
221
  "./rotation-around-axis": {
222
222
  "default": "./rotation-around-axis.js"
223
223
  },
224
+ "./rotation-around-point": {
225
+ "default": "./rotation-around-point.js"
226
+ },
224
227
  "./rotation": {
225
228
  "default": "./rotation.js"
226
229
  },
@@ -273,5 +276,5 @@
273
276
  ],
274
277
  "year": 2018
275
278
  },
276
- "gitHead": "22e36fa838e5431d40165384918b395603bbd92f\n"
279
+ "gitHead": "d1c8bca89fa5c57ca0c690933edb03129b085687\n"
277
280
  }
@@ -0,0 +1,4 @@
1
+ import type { ReadonlyVec } from "@thi.ng/vectors";
2
+ import type { Mat } from "./api.js";
3
+ export declare const rotationAroundPoint23: (out: Mat | null, pos: ReadonlyVec, theta: number) => Mat;
4
+ //# sourceMappingURL=rotation-around-point.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { concat } from "./concat.js";
2
+ import { rotation23 } from "./rotation.js";
3
+ import { translation23 } from "./translation.js";
4
+ const rotationAroundPoint23 = (out, pos, theta) => concat(
5
+ out,
6
+ translation23([], pos),
7
+ rotation23([], theta),
8
+ translation23([], [-pos[0], -pos[1]])
9
+ );
10
+ export {
11
+ rotationAroundPoint23
12
+ };