@thi.ng/matrices 1.0.4 → 2.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 +68 -97
- package/README.md +26 -16
- package/add.d.ts +1 -1
- package/add.js +2 -2
- package/addn.d.ts +1 -1
- package/addn.js +2 -2
- package/alignment-quat.d.ts +1 -1
- package/alignment-quat.js +5 -2
- package/column.d.ts +1 -1
- package/column.js +2 -1
- package/compile/emit.d.ts +4 -0
- package/{internal/codegen.js → compile/emit.js} +2 -1
- package/concat.d.ts +1 -1
- package/concat.js +1 -1
- package/conjugate.d.ts +1 -1
- package/conjugate.js +1 -1
- package/constants.d.ts +1 -1
- package/determinant.d.ts +1 -1
- package/determinant.js +1 -1
- package/diag.d.ts +5 -5
- package/diag.js +2 -1
- package/div.d.ts +1 -1
- package/div.js +2 -2
- package/divn.d.ts +1 -1
- package/divn.js +2 -2
- package/frustum.d.ts +1 -1
- package/frustum.js +2 -2
- package/identity.d.ts +5 -5
- package/identity.js +3 -3
- package/index.d.ts +56 -56
- package/index.js +56 -56
- package/invert.d.ts +2 -2
- package/invert.js +5 -2
- package/lookat.d.ts +2 -2
- package/lookat.js +5 -1
- package/m22-m23.d.ts +1 -1
- package/m22-m23.js +1 -1
- package/m23-m22.d.ts +1 -1
- package/m23-m22.js +1 -1
- package/m23-m44.d.ts +1 -1
- package/m23-m44.js +1 -1
- package/m33-m44.d.ts +1 -1
- package/m33-m44.js +1 -1
- package/m44-m33.d.ts +1 -1
- package/m44-m33.js +1 -1
- package/matn.d.ts +1 -1
- package/matn.js +1 -1
- package/matv.js +1 -1
- package/mixq.d.ts +2 -2
- package/mixq.js +4 -1
- package/mul.d.ts +1 -1
- package/mul.js +2 -2
- package/mulm.d.ts +5 -5
- package/mulm.js +3 -1
- package/muln.d.ts +1 -1
- package/muln.js +2 -2
- package/mulq.d.ts +1 -1
- package/mulq.js +1 -1
- package/mulv.d.ts +2 -2
- package/mulv.js +3 -1
- package/mulvm.d.ts +2 -2
- package/mulvm.js +3 -1
- package/normal-mat.d.ts +1 -1
- package/normal-mat.js +3 -3
- package/orthagonal.d.ts +1 -1
- package/orthagonal.js +2 -1
- package/ortho.d.ts +1 -1
- package/ortho.js +1 -1
- package/outer-product.d.ts +1 -1
- package/outer-product.js +2 -1
- package/package.json +199 -26
- package/perspective.d.ts +1 -1
- package/perspective.js +1 -1
- package/project.d.ts +2 -2
- package/project.js +3 -3
- package/quat-axis-angle.d.ts +1 -1
- package/quat-axis-angle.js +2 -2
- package/quat-euler.d.ts +7 -7
- package/quat-euler.js +3 -3
- package/quat-m33.d.ts +1 -1
- package/quat-m33.js +1 -1
- package/quat-m44.d.ts +3 -3
- package/quat-m44.js +2 -1
- package/rotation-around-axis.d.ts +2 -2
- package/rotation-around-axis.js +4 -3
- package/rotation.d.ts +1 -1
- package/rotation.js +2 -2
- package/row.d.ts +5 -5
- package/row.js +2 -1
- package/scale-center.d.ts +2 -2
- package/scale-center.js +4 -4
- package/scale.d.ts +1 -1
- package/scale.js +2 -2
- package/set.d.ts +1 -1
- package/set.js +3 -1
- package/shear.d.ts +1 -1
- package/shear.js +1 -1
- package/skew.d.ts +1 -1
- package/skew.js +1 -1
- package/sub.d.ts +1 -1
- package/sub.js +2 -2
- package/subn.d.ts +1 -1
- package/subn.js +2 -2
- package/trace.d.ts +1 -1
- package/trace.js +2 -2
- package/transform.d.ts +1 -1
- package/transform.js +7 -7
- package/translation.d.ts +2 -2
- package/translation.js +1 -1
- package/transpose.d.ts +1 -1
- package/transpose.js +1 -1
- package/viewport.d.ts +1 -1
- package/viewport.js +3 -3
- package/internal/codegen.d.ts +0 -4
- package/lib/index.js +0 -733
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/matrices",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Matrix & quaternion operations for 2D/3D geometry processing",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"module": "./index.js",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"umd:main": "./lib/index.umd.js",
|
|
8
7
|
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
@@ -24,31 +24,24 @@
|
|
|
24
24
|
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"build:test": "rimraf build && tsc -p test/tsconfig.json",
|
|
31
|
-
"build:check": "tsc --isolatedModules --noEmit",
|
|
32
|
-
"test": "mocha test",
|
|
33
|
-
"cover": "nyc mocha test && nyc report --reporter=lcov",
|
|
34
|
-
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib internal",
|
|
35
|
-
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
|
|
36
|
-
"doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf *.js *.d.ts *.map doc compile",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
37
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
|
|
38
|
-
"
|
|
31
|
+
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
|
|
32
|
+
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
|
|
33
|
+
"pub": "yarn build && yarn publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
39
35
|
},
|
|
40
36
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^
|
|
42
|
-
"@thi.ng/checks": "^
|
|
43
|
-
"@thi.ng/math": "^
|
|
44
|
-
"@thi.ng/vectors": "^
|
|
37
|
+
"@thi.ng/api": "^8.0.3",
|
|
38
|
+
"@thi.ng/checks": "^3.0.3",
|
|
39
|
+
"@thi.ng/math": "^5.0.3",
|
|
40
|
+
"@thi.ng/vectors": "^7.0.3"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@thi.ng/testament": "^0.1.3"
|
|
45
44
|
},
|
|
46
|
-
"files": [
|
|
47
|
-
"*.js",
|
|
48
|
-
"*.d.ts",
|
|
49
|
-
"lib",
|
|
50
|
-
"internal"
|
|
51
|
-
],
|
|
52
45
|
"keywords": [
|
|
53
46
|
"2d",
|
|
54
47
|
"3d",
|
|
@@ -81,7 +74,187 @@
|
|
|
81
74
|
"process": false,
|
|
82
75
|
"setTimeout": false
|
|
83
76
|
},
|
|
84
|
-
"
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=12.7"
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"*.js",
|
|
82
|
+
"*.d.ts",
|
|
83
|
+
"compile"
|
|
84
|
+
],
|
|
85
|
+
"exports": {
|
|
86
|
+
".": {
|
|
87
|
+
"import": "./index.js"
|
|
88
|
+
},
|
|
89
|
+
"./add": {
|
|
90
|
+
"import": "./add.js"
|
|
91
|
+
},
|
|
92
|
+
"./addn": {
|
|
93
|
+
"import": "./addn.js"
|
|
94
|
+
},
|
|
95
|
+
"./alignment-quat": {
|
|
96
|
+
"import": "./alignment-quat.js"
|
|
97
|
+
},
|
|
98
|
+
"./api": {
|
|
99
|
+
"import": "./api.js"
|
|
100
|
+
},
|
|
101
|
+
"./column": {
|
|
102
|
+
"import": "./column.js"
|
|
103
|
+
},
|
|
104
|
+
"./compile/emit": {
|
|
105
|
+
"import": "./compile/emit.js"
|
|
106
|
+
},
|
|
107
|
+
"./concat": {
|
|
108
|
+
"import": "./concat.js"
|
|
109
|
+
},
|
|
110
|
+
"./conjugate": {
|
|
111
|
+
"import": "./conjugate.js"
|
|
112
|
+
},
|
|
113
|
+
"./constants": {
|
|
114
|
+
"import": "./constants.js"
|
|
115
|
+
},
|
|
116
|
+
"./determinant": {
|
|
117
|
+
"import": "./determinant.js"
|
|
118
|
+
},
|
|
119
|
+
"./diag": {
|
|
120
|
+
"import": "./diag.js"
|
|
121
|
+
},
|
|
122
|
+
"./div": {
|
|
123
|
+
"import": "./div.js"
|
|
124
|
+
},
|
|
125
|
+
"./divn": {
|
|
126
|
+
"import": "./divn.js"
|
|
127
|
+
},
|
|
128
|
+
"./frustum": {
|
|
129
|
+
"import": "./frustum.js"
|
|
130
|
+
},
|
|
131
|
+
"./identity": {
|
|
132
|
+
"import": "./identity.js"
|
|
133
|
+
},
|
|
134
|
+
"./invert": {
|
|
135
|
+
"import": "./invert.js"
|
|
136
|
+
},
|
|
137
|
+
"./lookat": {
|
|
138
|
+
"import": "./lookat.js"
|
|
139
|
+
},
|
|
140
|
+
"./m22-m23": {
|
|
141
|
+
"import": "./m22-m23.js"
|
|
142
|
+
},
|
|
143
|
+
"./m23-m22": {
|
|
144
|
+
"import": "./m23-m22.js"
|
|
145
|
+
},
|
|
146
|
+
"./m23-m44": {
|
|
147
|
+
"import": "./m23-m44.js"
|
|
148
|
+
},
|
|
149
|
+
"./m33-m44": {
|
|
150
|
+
"import": "./m33-m44.js"
|
|
151
|
+
},
|
|
152
|
+
"./m44-m33": {
|
|
153
|
+
"import": "./m44-m33.js"
|
|
154
|
+
},
|
|
155
|
+
"./matn": {
|
|
156
|
+
"import": "./matn.js"
|
|
157
|
+
},
|
|
158
|
+
"./matv": {
|
|
159
|
+
"import": "./matv.js"
|
|
160
|
+
},
|
|
161
|
+
"./mixq": {
|
|
162
|
+
"import": "./mixq.js"
|
|
163
|
+
},
|
|
164
|
+
"./mul": {
|
|
165
|
+
"import": "./mul.js"
|
|
166
|
+
},
|
|
167
|
+
"./mulm": {
|
|
168
|
+
"import": "./mulm.js"
|
|
169
|
+
},
|
|
170
|
+
"./muln": {
|
|
171
|
+
"import": "./muln.js"
|
|
172
|
+
},
|
|
173
|
+
"./mulq": {
|
|
174
|
+
"import": "./mulq.js"
|
|
175
|
+
},
|
|
176
|
+
"./mulv": {
|
|
177
|
+
"import": "./mulv.js"
|
|
178
|
+
},
|
|
179
|
+
"./mulvm": {
|
|
180
|
+
"import": "./mulvm.js"
|
|
181
|
+
},
|
|
182
|
+
"./normal-mat": {
|
|
183
|
+
"import": "./normal-mat.js"
|
|
184
|
+
},
|
|
185
|
+
"./orthagonal": {
|
|
186
|
+
"import": "./orthagonal.js"
|
|
187
|
+
},
|
|
188
|
+
"./ortho": {
|
|
189
|
+
"import": "./ortho.js"
|
|
190
|
+
},
|
|
191
|
+
"./outer-product": {
|
|
192
|
+
"import": "./outer-product.js"
|
|
193
|
+
},
|
|
194
|
+
"./perspective": {
|
|
195
|
+
"import": "./perspective.js"
|
|
196
|
+
},
|
|
197
|
+
"./project": {
|
|
198
|
+
"import": "./project.js"
|
|
199
|
+
},
|
|
200
|
+
"./quat-axis-angle": {
|
|
201
|
+
"import": "./quat-axis-angle.js"
|
|
202
|
+
},
|
|
203
|
+
"./quat-euler": {
|
|
204
|
+
"import": "./quat-euler.js"
|
|
205
|
+
},
|
|
206
|
+
"./quat-m33": {
|
|
207
|
+
"import": "./quat-m33.js"
|
|
208
|
+
},
|
|
209
|
+
"./quat-m44": {
|
|
210
|
+
"import": "./quat-m44.js"
|
|
211
|
+
},
|
|
212
|
+
"./rotation-around-axis": {
|
|
213
|
+
"import": "./rotation-around-axis.js"
|
|
214
|
+
},
|
|
215
|
+
"./rotation": {
|
|
216
|
+
"import": "./rotation.js"
|
|
217
|
+
},
|
|
218
|
+
"./row": {
|
|
219
|
+
"import": "./row.js"
|
|
220
|
+
},
|
|
221
|
+
"./scale-center": {
|
|
222
|
+
"import": "./scale-center.js"
|
|
223
|
+
},
|
|
224
|
+
"./scale": {
|
|
225
|
+
"import": "./scale.js"
|
|
226
|
+
},
|
|
227
|
+
"./set": {
|
|
228
|
+
"import": "./set.js"
|
|
229
|
+
},
|
|
230
|
+
"./shear": {
|
|
231
|
+
"import": "./shear.js"
|
|
232
|
+
},
|
|
233
|
+
"./skew": {
|
|
234
|
+
"import": "./skew.js"
|
|
235
|
+
},
|
|
236
|
+
"./sub": {
|
|
237
|
+
"import": "./sub.js"
|
|
238
|
+
},
|
|
239
|
+
"./subn": {
|
|
240
|
+
"import": "./subn.js"
|
|
241
|
+
},
|
|
242
|
+
"./trace": {
|
|
243
|
+
"import": "./trace.js"
|
|
244
|
+
},
|
|
245
|
+
"./transform": {
|
|
246
|
+
"import": "./transform.js"
|
|
247
|
+
},
|
|
248
|
+
"./translation": {
|
|
249
|
+
"import": "./translation.js"
|
|
250
|
+
},
|
|
251
|
+
"./transpose": {
|
|
252
|
+
"import": "./transpose.js"
|
|
253
|
+
},
|
|
254
|
+
"./viewport": {
|
|
255
|
+
"import": "./viewport.js"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
85
258
|
"thi.ng": {
|
|
86
259
|
"related": [
|
|
87
260
|
"color",
|
|
@@ -91,5 +264,5 @@
|
|
|
91
264
|
],
|
|
92
265
|
"year": 2018
|
|
93
266
|
},
|
|
94
|
-
"gitHead": "
|
|
267
|
+
"gitHead": "1fb38cac74d6c009d96855c28784a267a81badf1"
|
|
95
268
|
}
|
package/perspective.d.ts
CHANGED
package/perspective.js
CHANGED
package/project.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
2
|
-
import type { ReadonlyMat } from "./api";
|
|
1
|
+
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
2
|
+
import type { ReadonlyMat } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Transforms given point `p` (4D, homogeneous coordinates) with 4x4
|
|
5
5
|
* matrix `mvp`, applies perspective divide and then transforms XY
|
package/project.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fromHomogeneous4 } from "@thi.ng/vectors";
|
|
2
|
-
import { invert23, invert44 } from "./invert";
|
|
3
|
-
import { mulV23, mulV344, mulV44 } from "./mulv";
|
|
1
|
+
import { fromHomogeneous4 } from "@thi.ng/vectors/homogeneous";
|
|
2
|
+
import { invert23, invert44 } from "./invert.js";
|
|
3
|
+
import { mulV23, mulV344, mulV44 } from "./mulv.js";
|
|
4
4
|
/**
|
|
5
5
|
* Transforms given point `p` (4D, homogeneous coordinates) with 4x4
|
|
6
6
|
* matrix `mvp`, applies perspective divide and then transforms XY
|
package/quat-axis-angle.d.ts
CHANGED
package/quat-axis-angle.js
CHANGED
package/quat-euler.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const axisOrder: {
|
|
2
|
-
xyz: import("@thi.ng/vectors").ReadonlyVec[];
|
|
3
|
-
yxz: import("@thi.ng/vectors").ReadonlyVec[];
|
|
4
|
-
xzy: import("@thi.ng/vectors").ReadonlyVec[];
|
|
5
|
-
zxy: import("@thi.ng/vectors").ReadonlyVec[];
|
|
6
|
-
yzx: import("@thi.ng/vectors").ReadonlyVec[];
|
|
7
|
-
zyx: import("@thi.ng/vectors").ReadonlyVec[];
|
|
2
|
+
xyz: import("@thi.ng/vectors/api").ReadonlyVec[];
|
|
3
|
+
yxz: import("@thi.ng/vectors/api").ReadonlyVec[];
|
|
4
|
+
xzy: import("@thi.ng/vectors/api").ReadonlyVec[];
|
|
5
|
+
zxy: import("@thi.ng/vectors/api").ReadonlyVec[];
|
|
6
|
+
yzx: import("@thi.ng/vectors/api").ReadonlyVec[];
|
|
7
|
+
zyx: import("@thi.ng/vectors/api").ReadonlyVec[];
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Constructs a quaternion from given rotation angles in specified
|
|
@@ -15,6 +15,6 @@ declare const axisOrder: {
|
|
|
15
15
|
* @param b -
|
|
16
16
|
* @param c -
|
|
17
17
|
*/
|
|
18
|
-
export declare const quatFromEuler: (order: keyof typeof axisOrder, a: number, b: number, c: number) => import("@thi.ng/vectors").Vec;
|
|
18
|
+
export declare const quatFromEuler: (order: keyof typeof axisOrder, a: number, b: number, c: number) => import("@thi.ng/vectors/api").Vec;
|
|
19
19
|
export {};
|
|
20
20
|
//# sourceMappingURL=quat-euler.d.ts.map
|
package/quat-euler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { X3, Y3, Z3 } from "@thi.ng/vectors";
|
|
2
|
-
import { mulQ } from "./mulq";
|
|
3
|
-
import { quatFromAxisAngle } from "./quat-axis-angle";
|
|
1
|
+
import { X3, Y3, Z3 } from "@thi.ng/vectors/api";
|
|
2
|
+
import { mulQ } from "./mulq.js";
|
|
3
|
+
import { quatFromAxisAngle } from "./quat-axis-angle.js";
|
|
4
4
|
const axisOrder = {
|
|
5
5
|
xyz: [X3, Y3, Z3],
|
|
6
6
|
yxz: [Y3, X3, Z3],
|
package/quat-m33.d.ts
CHANGED
package/quat-m33.js
CHANGED
package/quat-m44.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
|
-
import type { Mat } from "./api";
|
|
1
|
+
import { ReadonlyVec } from "@thi.ng/vectors/api";
|
|
2
|
+
import type { Mat } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Converts quaternion into 4x4 matrix with optional 3D translation offset `t`,
|
|
5
5
|
* then writes result to `out`.
|
|
@@ -7,5 +7,5 @@ import type { Mat } from "./api";
|
|
|
7
7
|
* @param out -
|
|
8
8
|
* @param q -
|
|
9
9
|
*/
|
|
10
|
-
export declare const quatToMat44: (out: Mat | null, a: ReadonlyVec, t?: ReadonlyVec) => import("@thi.ng/vectors").Vec;
|
|
10
|
+
export declare const quatToMat44: (out: Mat | null, a: ReadonlyVec, t?: ReadonlyVec) => import("@thi.ng/vectors/api").Vec;
|
|
11
11
|
//# sourceMappingURL=quat-m44.d.ts.map
|
package/quat-m44.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
|
-
import type { Mat } from "./api";
|
|
1
|
+
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
|
+
import type { Mat } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Constructs a 3x3 matrix representing a rotation of `theta` around
|
|
5
5
|
* `axis` and writes result to `out`. If `normalize` is true (default
|
package/rotation-around-axis.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { sincos } from "@thi.ng/math";
|
|
2
|
-
import { normalize as _normalize
|
|
3
|
-
import {
|
|
1
|
+
import { sincos } from "@thi.ng/math/angle";
|
|
2
|
+
import { normalize as _normalize } from "@thi.ng/vectors/normalize";
|
|
3
|
+
import { setC } from "@thi.ng/vectors/setc";
|
|
4
|
+
import { mat33to44 } from "./m33-m44.js";
|
|
4
5
|
/**
|
|
5
6
|
* Constructs a 3x3 matrix representing a rotation of `theta` around
|
|
6
7
|
* `axis` and writes result to `out`. If `normalize` is true (default
|
package/rotation.d.ts
CHANGED
package/rotation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sincos } from "@thi.ng/math";
|
|
2
|
-
import { setC, setC4, setC6 } from "@thi.ng/vectors";
|
|
1
|
+
import { sincos } from "@thi.ng/math/angle";
|
|
2
|
+
import { setC, setC4, setC6 } from "@thi.ng/vectors/setc";
|
|
3
3
|
/**
|
|
4
4
|
* Constructs a 2x2 matrix rotation matrix for given `theta`.
|
|
5
5
|
*
|
package/row.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MultiVecOpMN } from "./api";
|
|
1
|
+
import type { MultiVecOpMN } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Extracts row vector from given matrix and writes result to `out`. If
|
|
4
4
|
* `out` is null, creates new vector.
|
|
@@ -8,8 +8,8 @@ import type { MultiVecOpMN } from "./api";
|
|
|
8
8
|
* @param column -
|
|
9
9
|
*/
|
|
10
10
|
export declare const row: MultiVecOpMN;
|
|
11
|
-
export declare const row22: import("./api").VecOpMN;
|
|
12
|
-
export declare const row23: import("./api").VecOpMN;
|
|
13
|
-
export declare const row33: import("./api").VecOpMN;
|
|
14
|
-
export declare const row44: import("./api").VecOpMN;
|
|
11
|
+
export declare const row22: import("./api.js").VecOpMN;
|
|
12
|
+
export declare const row23: import("./api.js").VecOpMN;
|
|
13
|
+
export declare const row33: import("./api.js").VecOpMN;
|
|
14
|
+
export declare const row44: import("./api.js").VecOpMN;
|
|
15
15
|
//# sourceMappingURL=row.d.ts.map
|
package/row.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { setS2, setS3, setS4
|
|
1
|
+
import { setS2, setS3, setS4 } from "@thi.ng/vectors/sets";
|
|
2
|
+
import { vop } from "@thi.ng/vectors/vop";
|
|
2
3
|
/**
|
|
3
4
|
* Extracts row vector from given matrix and writes result to `out`. If
|
|
4
5
|
* `out` is null, creates new vector.
|
package/scale-center.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
|
-
import type { Mat } from "./api";
|
|
1
|
+
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
|
+
import type { Mat } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Computes a 2x3 matrix representing a scale operation with origin `p`
|
|
5
5
|
* and writes result to `out`.
|
package/scale-center.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { neg } from "@thi.ng/vectors";
|
|
2
|
-
import { concat } from "./concat";
|
|
3
|
-
import { scale23, scale44 } from "./scale";
|
|
4
|
-
import { translation23, translation44 } from "./translation";
|
|
1
|
+
import { neg } from "@thi.ng/vectors/neg";
|
|
2
|
+
import { concat } from "./concat.js";
|
|
3
|
+
import { scale23, scale44 } from "./scale.js";
|
|
4
|
+
import { translation23, translation44 } from "./translation.js";
|
|
5
5
|
/**
|
|
6
6
|
* Computes a 2x3 matrix representing a scale operation with origin `p`
|
|
7
7
|
* and writes result to `out`.
|
package/scale.d.ts
CHANGED
package/scale.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isNumber } from "@thi.ng/checks";
|
|
2
|
-
import { setC, setC4, setC6 } from "@thi.ng/vectors";
|
|
1
|
+
import { isNumber } from "@thi.ng/checks/is-number";
|
|
2
|
+
import { setC, setC4, setC6 } from "@thi.ng/vectors/setc";
|
|
3
3
|
/**
|
|
4
4
|
* Computes 2x2 matrix scale matrix and writes result to `out`. If `s`
|
|
5
5
|
* is a number, scaling will be uniform.
|
package/set.d.ts
CHANGED
package/set.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { compile
|
|
1
|
+
import { compile } from "@thi.ng/vectors/compile/emit";
|
|
2
|
+
import { SET } from "@thi.ng/vectors/compile/templates";
|
|
3
|
+
import { set as _set, set4 } from "@thi.ng/vectors/set";
|
|
2
4
|
const $ = (dim) => _set.add(dim, compile(dim, SET, "o,a"));
|
|
3
5
|
export const set = _set;
|
|
4
6
|
export const set22 = set4;
|
package/shear.d.ts
CHANGED
package/shear.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { identity22, identity23, identity33, identity44 } from "./identity";
|
|
1
|
+
import { identity22, identity23, identity33, identity44 } from "./identity.js";
|
|
2
2
|
const $ = (f) => (i) => (m, x) => (!m && (m = []), f(m), (m[i] = x), m);
|
|
3
3
|
const $22 = $(identity22);
|
|
4
4
|
const $23 = $(identity23);
|
package/skew.d.ts
CHANGED
package/skew.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shearX22, shearX23, shearXY33, shearXY44, shearXZ33, shearXZ44, shearY22, shearY23, shearYX33, shearYX44, shearYZ33, shearYZ44, shearZX33, shearZX44, shearZY33, shearZY44, } from "./shear";
|
|
1
|
+
import { shearX22, shearX23, shearXY33, shearXY44, shearXZ33, shearXZ44, shearY22, shearY23, shearYX33, shearYX44, shearYZ33, shearYZ44, shearZX33, shearZX44, shearZY33, shearZY44, } from "./shear.js";
|
|
2
2
|
const $ = (f) => (m, theta) => f(m, Math.tan(theta));
|
|
3
3
|
export const skewX22 = $(shearX22);
|
|
4
4
|
export const skewY22 = $(shearY22);
|
package/sub.d.ts
CHANGED
package/sub.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sub as _sub, sub4 } from "@thi.ng/vectors";
|
|
2
|
-
import { defMath } from "./
|
|
1
|
+
import { sub as _sub, sub4 } from "@thi.ng/vectors/sub";
|
|
2
|
+
import { defMath } from "./compile/emit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Componentwise matrix subtraction. If `out` is not given, writes
|
|
5
5
|
* result in `a`. Both input matrices MUST be of same size.
|
package/subn.d.ts
CHANGED
package/subn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { subN as _subN, subN4 } from "@thi.ng/vectors";
|
|
2
|
-
import { defMathN } from "./
|
|
1
|
+
import { subN as _subN, subN4 } from "@thi.ng/vectors/subn";
|
|
2
|
+
import { defMathN } from "./compile/emit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Componentwise scalar subtraction. If `out` is not given, writes
|
|
5
5
|
* result in `mat`.
|
package/trace.d.ts
CHANGED
package/trace.js
CHANGED
package/transform.d.ts
CHANGED
package/transform.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { concat } from "./concat";
|
|
2
|
-
import { mulM44 } from "./mulm";
|
|
3
|
-
import { quatFromEuler } from "./quat-euler";
|
|
4
|
-
import { quatToMat44 } from "./quat-m44";
|
|
5
|
-
import { rotation23 } from "./rotation";
|
|
6
|
-
import { scale23, scale44 } from "./scale";
|
|
7
|
-
import { translation23 } from "./translation";
|
|
1
|
+
import { concat } from "./concat.js";
|
|
2
|
+
import { mulM44 } from "./mulm.js";
|
|
3
|
+
import { quatFromEuler } from "./quat-euler.js";
|
|
4
|
+
import { quatToMat44 } from "./quat-m44.js";
|
|
5
|
+
import { rotation23 } from "./rotation.js";
|
|
6
|
+
import { scale23, scale44 } from "./scale.js";
|
|
7
|
+
import { translation23 } from "./translation.js";
|
|
8
8
|
/**
|
|
9
9
|
* Creates 2x3 TRS transformation matrix from given translation vector,
|
|
10
10
|
* rotation angle and scale factor/vector.
|
package/translation.d.ts
CHANGED
package/translation.js
CHANGED
package/transpose.d.ts
CHANGED
package/transpose.js
CHANGED