@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/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
## [
|
|
6
|
+
## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@2.0.2...@thi.ng/matrices@2.0.3) (2021-10-15)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @thi.ng/matrices
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [
|
|
14
|
+
## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@2.0.1...@thi.ng/matrices@2.0.2) (2021-10-15)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @thi.ng/matrices
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
## [
|
|
22
|
+
## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@2.0.0...@thi.ng/matrices@2.0.1) (2021-10-13)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @thi.ng/matrices
|
|
25
25
|
|
|
@@ -27,144 +27,115 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @thi.ng/matrices
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## [0.6.64](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.63...@thi.ng/matrices@0.6.64) (2021-08-08)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @thi.ng/matrices
|
|
41
|
-
|
|
30
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@1.0.5...@thi.ng/matrices@2.0.0) (2021-10-12)
|
|
42
31
|
|
|
43
32
|
|
|
33
|
+
### Build System
|
|
44
34
|
|
|
45
|
-
|
|
46
|
-
## [0.6.63](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.62...@thi.ng/matrices@0.6.63) (2021-08-04)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @thi.ng/matrices
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## [0.6.62](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.61...@thi.ng/matrices@0.6.62) (2021-08-04)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @thi.ng/matrices
|
|
35
|
+
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
57
36
|
|
|
58
37
|
|
|
38
|
+
### BREAKING CHANGES
|
|
59
39
|
|
|
40
|
+
* discontinue CommonJS & UMD versions
|
|
60
41
|
|
|
42
|
+
- only ESM modules will be published from now on
|
|
43
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
44
|
+
- i.e. launch NodeJS via:
|
|
45
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
46
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
47
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
61
48
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## [0.6.60](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.59...@thi.ng/matrices@0.6.60) (2021-07-01)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @thi.ng/matrices
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## [0.6.59](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.58...@thi.ng/matrices@0.6.59) (2021-06-08)
|
|
79
|
-
|
|
80
|
-
**Note:** Version bump only for package @thi.ng/matrices
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
49
|
+
Also:
|
|
50
|
+
- normalize/restructure/reorg all package.json files
|
|
51
|
+
- cleanup all build scripts, remove obsolete
|
|
52
|
+
- switch from mocha to @thi.ng/testament for all tests
|
|
84
53
|
|
|
85
54
|
|
|
86
|
-
# [0.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.5.12...@thi.ng/matrices@0.6.0) (2020-02-25)
|
|
87
55
|
|
|
88
56
|
|
|
89
|
-
### Bug Fixes
|
|
90
57
|
|
|
91
|
-
* **matrices:** ([#205](https://github.com/thi-ng/umbrella/issues/205)) fix `w` calc in mulV344() ([46c1061](https://github.com/thi-ng/umbrella/commit/46c1061078d394d5b6ec2885f1025741893fe452))
|
|
92
58
|
|
|
59
|
+
## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@1.0.4...@thi.ng/matrices@1.0.5) (2021-09-03)
|
|
93
60
|
|
|
94
|
-
|
|
61
|
+
**Note:** Version bump only for package @thi.ng/matrices
|
|
95
62
|
|
|
96
|
-
|
|
63
|
+
# [0.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.5.12...@thi.ng/matrices@0.6.0) (2020-02-25)
|
|
97
64
|
|
|
65
|
+
### Bug Fixes
|
|
98
66
|
|
|
67
|
+
- **matrices:** ([#205](https://github.com/thi-ng/umbrella/issues/205)) fix `w` calc in mulV344() ([46c1061](https://github.com/thi-ng/umbrella/commit/46c1061078d394d5b6ec2885f1025741893fe452))
|
|
99
68
|
|
|
69
|
+
### Features
|
|
100
70
|
|
|
71
|
+
- **matrices:** add project3(), refactor unproject(), mulV344() ([61c36fc](https://github.com/thi-ng/umbrella/commit/61c36fcc532d78b21d78dddeee5523155b0798b2))
|
|
101
72
|
|
|
102
|
-
##
|
|
73
|
+
## [0.5.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.5.0...@thi.ng/matrices@0.5.1) (2019-07-08)
|
|
103
74
|
|
|
104
|
-
###
|
|
75
|
+
### Bug Fixes
|
|
105
76
|
|
|
106
|
-
|
|
77
|
+
- **matrices:** mixQ result handling ([cc9ab35](https://github.com/thi-ng/umbrella/commit/cc9ab35))
|
|
107
78
|
|
|
108
|
-
#
|
|
79
|
+
# [0.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.4.0...@thi.ng/matrices@0.5.0) (2019-07-07)
|
|
109
80
|
|
|
110
|
-
###
|
|
81
|
+
### Bug Fixes
|
|
111
82
|
|
|
112
|
-
|
|
83
|
+
- **matrices:** update maddN call sites ([#95](https://github.com/thi-ng/umbrella/issues/95)) ([4a985c5](https://github.com/thi-ng/umbrella/commit/4a985c5))
|
|
113
84
|
|
|
114
|
-
###
|
|
85
|
+
### Features
|
|
115
86
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
87
|
+
- **matrices:** add isOrthagonal() ([d75305b](https://github.com/thi-ng/umbrella/commit/d75305b))
|
|
88
|
+
- **matrices:** add matXXn & matXXv fns ([7a2ef82](https://github.com/thi-ng/umbrella/commit/7a2ef82))
|
|
89
|
+
- **matrices:** add matXXn, matXXv, mulXXvm fns ([9359bbc](https://github.com/thi-ng/umbrella/commit/9359bbc))
|
|
90
|
+
- **matrices:** enable TS strict compiler flags (refactor) ([7b1c81a](https://github.com/thi-ng/umbrella/commit/7b1c81a))
|
|
91
|
+
- **matrices:** rename normal44 => normal33, add new normal44 (w/ M44 result) ([d54f746](https://github.com/thi-ng/umbrella/commit/d54f746))
|
|
121
92
|
|
|
122
|
-
#
|
|
93
|
+
# [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.3.4...@thi.ng/matrices@0.4.0) (2019-05-22)
|
|
123
94
|
|
|
124
|
-
###
|
|
95
|
+
### Features
|
|
125
96
|
|
|
126
|
-
|
|
97
|
+
- **matrices:** add outerProduct for vec 2/3/4 ([2a9d076](https://github.com/thi-ng/umbrella/commit/2a9d076))
|
|
127
98
|
|
|
128
|
-
#
|
|
99
|
+
# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.2.2...@thi.ng/matrices@0.3.0) (2019-04-07)
|
|
129
100
|
|
|
130
|
-
###
|
|
101
|
+
### Features
|
|
131
102
|
|
|
132
|
-
|
|
103
|
+
- **matrices:** add transform23/44 fns ([dab6839](https://github.com/thi-ng/umbrella/commit/dab6839))
|
|
133
104
|
|
|
134
|
-
#
|
|
105
|
+
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.1.14...@thi.ng/matrices@0.2.0) (2019-04-02)
|
|
135
106
|
|
|
136
|
-
###
|
|
107
|
+
### Features
|
|
137
108
|
|
|
138
|
-
|
|
109
|
+
- **matrices:** add MatXXLike type aliases ([a2ace9f](https://github.com/thi-ng/umbrella/commit/a2ace9f))
|
|
139
110
|
|
|
140
|
-
##
|
|
111
|
+
## [0.1.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.1.5...@thi.ng/matrices@0.1.6) (2019-02-19)
|
|
141
112
|
|
|
142
|
-
###
|
|
113
|
+
### Bug Fixes
|
|
143
114
|
|
|
144
|
-
|
|
115
|
+
- **matrices:** Fix identity44 dispatch ([6812b2b](https://github.com/thi-ng/umbrella/commit/6812b2b))
|
|
145
116
|
|
|
146
|
-
#
|
|
117
|
+
# 0.1.0 (2019-01-21)
|
|
147
118
|
|
|
148
|
-
###
|
|
119
|
+
### Bug Fixes
|
|
149
120
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
121
|
+
- **matrices:** inject default output handling code ([0b07ac8](https://github.com/thi-ng/umbrella/commit/0b07ac8))
|
|
122
|
+
- **matrices:** re-add persp divide in mulV344() ([4c6fe06](https://github.com/thi-ng/umbrella/commit/4c6fe06))
|
|
123
|
+
- **matrices:** scaleWithCenter* (add missing concat() arg) ([4f02491](https://github.com/thi-ng/umbrella/commit/4f02491))
|
|
153
124
|
|
|
154
|
-
###
|
|
125
|
+
### Features
|
|
155
126
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
127
|
+
- **matrices:** add cwise matrix multiply, rename mul* => mulM*, move mulQ ([ae7a039](https://github.com/thi-ng/umbrella/commit/ae7a039))
|
|
128
|
+
- **matrices:** add m22 & m23 matrix converters ([2aceab9](https://github.com/thi-ng/umbrella/commit/2aceab9))
|
|
129
|
+
- **matrices:** add M44 factories ([f1a5cf1](https://github.com/thi-ng/umbrella/commit/f1a5cf1))
|
|
130
|
+
- **matrices:** add more matrix ops ([35babfc](https://github.com/thi-ng/umbrella/commit/35babfc))
|
|
131
|
+
- **matrices:** add more matrix ops, optimize & simplify ([f04e79e](https://github.com/thi-ng/umbrella/commit/f04e79e))
|
|
132
|
+
- **matrices:** add quaternion fns ([b03b919](https://github.com/thi-ng/umbrella/commit/b03b919))
|
|
133
|
+
- **matrices:** add quatToMat33, update readme ([52fb939](https://github.com/thi-ng/umbrella/commit/52fb939))
|
|
134
|
+
- **matrices:** add rotationAroundAxis33/44() ([27f65f9](https://github.com/thi-ng/umbrella/commit/27f65f9))
|
|
135
|
+
- **matrices:** add trace() ([16d56a3](https://github.com/thi-ng/umbrella/commit/16d56a3))
|
|
136
|
+
- **matrices:** add viewport(), project/unproject(), update invert() ([d9e1b2e](https://github.com/thi-ng/umbrella/commit/d9e1b2e))
|
|
137
|
+
- **matrices:** extract matrix ops to own package ([f940672](https://github.com/thi-ng/umbrella/commit/f940672))
|
|
167
138
|
|
|
168
|
-
###
|
|
139
|
+
### Performance Improvements
|
|
169
140
|
|
|
170
|
-
|
|
141
|
+
- **matrices:** use setC6() for M23 ops ([d462ae0](https://github.com/thi-ng/umbrella/commit/d462ae0))
|
package/README.md
CHANGED
|
@@ -67,15 +67,24 @@ sensible).
|
|
|
67
67
|
yarn add @thi.ng/matrices
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
ES module import:
|
|
71
|
+
|
|
70
72
|
```html
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
<script type="module" src="https://cdn.skypack.dev/@thi.ng/matrices"></script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
[Skypack documentation](https://docs.skypack.dev/)
|
|
77
|
+
|
|
78
|
+
For Node.js REPL:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
# with flag only for < v16
|
|
82
|
+
node --experimental-repl-await
|
|
73
83
|
|
|
74
|
-
|
|
75
|
-
<script src="https://unpkg.com/@thi.ng/matrices/lib/index.umd.js" crossorigin></script>
|
|
84
|
+
> const matrices = await import("@thi.ng/matrices");
|
|
76
85
|
```
|
|
77
86
|
|
|
78
|
-
Package sizes (gzipped, pre-treeshake): ESM: 4.
|
|
87
|
+
Package sizes (gzipped, pre-treeshake): ESM: 4.92 KB
|
|
79
88
|
|
|
80
89
|
## Dependencies
|
|
81
90
|
|
|
@@ -92,17 +101,18 @@ directory are using this package.
|
|
|
92
101
|
|
|
93
102
|
A selection:
|
|
94
103
|
|
|
95
|
-
| Screenshot
|
|
96
|
-
|
|
97
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/
|
|
98
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/scenegraph
|
|
99
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/
|
|
100
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/
|
|
101
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/
|
|
102
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/
|
|
103
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-
|
|
104
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-
|
|
105
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-
|
|
104
|
+
| Screenshot | Description | Live demo | Source |
|
|
105
|
+
|:-------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------|
|
|
106
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/hdom-canvas/hdom-canvas-shapes-results.png" width="240"/> | Various hdom-canvas shape drawing examples & SVG conversion / export | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-shapes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-shapes) |
|
|
107
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/scenegraph.png" width="240"/> | 2D scenegraph & shape picking | [Demo](https://demo.thi.ng/umbrella/scenegraph/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/scenegraph) |
|
|
108
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/scenegraph-image.png" width="240"/> | 2D scenegraph & image map based geometry manipulation | [Demo](https://demo.thi.ng/umbrella/scenegraph-image/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/scenegraph-image) |
|
|
109
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-graph.jpg" width="240"/> | Minimal shader graph developed during livestream #2 | [Demo](https://demo.thi.ng/umbrella/shader-graph/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-graph) |
|
|
110
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/soa-ecs-100k.png" width="240"/> | Entity Component System w/ 100k 3D particles | [Demo](https://demo.thi.ng/umbrella/soa-ecs/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/soa-ecs) |
|
|
111
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/text-canvas.png" width="240"/> | 3D wireframe textmode demo | [Demo](https://demo.thi.ng/umbrella/text-canvas/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/text-canvas) |
|
|
112
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-cube.png" width="240"/> | WebGL multi-colored cube mesh | [Demo](https://demo.thi.ng/umbrella/webgl-cube/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-cube) |
|
|
113
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-cubemap.jpg" width="240"/> | WebGL cube maps with async texture loading | [Demo](https://demo.thi.ng/umbrella/webgl-cubemap/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-cubemap) |
|
|
114
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-grid.jpg" width="240"/> | WebGL instancing, animated grid | [Demo](https://demo.thi.ng/umbrella/webgl-grid/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-grid) |
|
|
115
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-msdf.jpg" width="240"/> | WebGL MSDF text rendering & particle system | [Demo](https://demo.thi.ng/umbrella/webgl-msdf/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-msdf) |
|
|
106
116
|
|
|
107
117
|
## API
|
|
108
118
|
|
package/add.d.ts
CHANGED
package/add.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { add as _add, add4 } from "@thi.ng/vectors";
|
|
2
|
-
import { defMath } from "./
|
|
1
|
+
import { add as _add, add4 } from "@thi.ng/vectors/add";
|
|
2
|
+
import { defMath } from "./compile/emit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Componentwise matrix addition. If `out` is not given, writes result
|
|
5
5
|
* in `a`. Both input matrices MUST be of same size.
|
package/addn.d.ts
CHANGED
package/addn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { addN as _addN, addN4 } from "@thi.ng/vectors";
|
|
2
|
-
import { defMathN } from "./
|
|
1
|
+
import { addN as _addN, addN4 } from "@thi.ng/vectors/addn";
|
|
2
|
+
import { defMathN } from "./compile/emit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds single scalar componentwise to matrix. If `out` is not given,
|
|
5
5
|
* writes result in `mat`.
|
package/alignment-quat.d.ts
CHANGED
package/alignment-quat.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { cross3
|
|
2
|
-
import {
|
|
1
|
+
import { cross3 } from "@thi.ng/vectors/cross";
|
|
2
|
+
import { dot3 } from "@thi.ng/vectors/dot";
|
|
3
|
+
import { mag } from "@thi.ng/vectors/mag";
|
|
4
|
+
import { normalize as _normalize } from "@thi.ng/vectors/normalize";
|
|
5
|
+
import { quatFromAxisAngle } from "./quat-axis-angle.js";
|
|
3
6
|
/**
|
|
4
7
|
* Returns quaternion describing the rotation from direction vector
|
|
5
8
|
* `from` -> `to`. If `normalize` is true (default), first normalizes
|
package/column.d.ts
CHANGED
package/column.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 column vector from given matrix and writes result to `out`.
|
|
4
5
|
* If `out` is null, creates new vector.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MultiMatOpMM, MultiMatOpMN } from "../api.js";
|
|
2
|
+
export declare const defMath: (fn: MultiMatOpMM, op: string, sizes?: number[]) => import("../api.js").MatOpMM[];
|
|
3
|
+
export declare const defMathN: (fn: MultiMatOpMN, op: string, sizes?: number[]) => import("../api.js").MatOpMN[];
|
|
4
|
+
//# sourceMappingURL=emit.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compile } from "@thi.ng/vectors/compile/emit";
|
|
2
|
+
import { ARGS_VN, ARGS_VV, DEFAULT_OUT, MATH, MATH_N, } from "@thi.ng/vectors/compile/templates";
|
|
2
3
|
const DEFAULT_SIZES = [6, 9, 16];
|
|
3
4
|
export const defMath = (fn, op, sizes = DEFAULT_SIZES) => sizes.map((n) => fn.add(n, compile(n, MATH(op), ARGS_VV, undefined, "o", "", DEFAULT_OUT)));
|
|
4
5
|
export const defMathN = (fn, op, sizes = DEFAULT_SIZES) => sizes.map((n) => fn.add(n, compile(n, MATH_N(op), ARGS_VN, "o,a", "o", "", DEFAULT_OUT)));
|
package/concat.d.ts
CHANGED
package/concat.js
CHANGED
package/conjugate.d.ts
CHANGED
package/conjugate.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { setC4 } from "@thi.ng/vectors";
|
|
1
|
+
import { setC4 } from "@thi.ng/vectors/setc";
|
|
2
2
|
export const conjugateQ = (out, a) => setC4(out || a, -a[0], -a[1], -a[2], a[3]);
|
package/constants.d.ts
CHANGED
package/determinant.d.ts
CHANGED
package/determinant.js
CHANGED
package/diag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MultiVecOpM } from "./api";
|
|
1
|
+
import type { MultiVecOpM } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Extracts matrix diagonal into `out`.
|
|
4
4
|
*
|
|
@@ -6,8 +6,8 @@ import type { MultiVecOpM } from "./api";
|
|
|
6
6
|
* @param mat -
|
|
7
7
|
*/
|
|
8
8
|
export declare const diag: MultiVecOpM;
|
|
9
|
-
export declare const diag22: import("./api").VecOpM;
|
|
10
|
-
export declare const diag23: import("./api").VecOpM;
|
|
11
|
-
export declare const diag33: import("./api").VecOpM;
|
|
12
|
-
export declare const diag44: import("./api").VecOpM;
|
|
9
|
+
export declare const diag22: import("./api.js").VecOpM;
|
|
10
|
+
export declare const diag23: import("./api.js").VecOpM;
|
|
11
|
+
export declare const diag33: import("./api.js").VecOpM;
|
|
12
|
+
export declare const diag44: import("./api.js").VecOpM;
|
|
13
13
|
//# sourceMappingURL=diag.d.ts.map
|
package/diag.js
CHANGED
package/div.d.ts
CHANGED
package/div.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { div as _div, div4 } from "@thi.ng/vectors";
|
|
2
|
-
import { defMath } from "./
|
|
1
|
+
import { div as _div, div4 } from "@thi.ng/vectors/div";
|
|
2
|
+
import { defMath } from "./compile/emit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Componentwise matrix division. If `out` is not given, writes result
|
|
5
5
|
* in `a`. Both input matrices MUST be of same size.
|
package/divn.d.ts
CHANGED
package/divn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { divN as _divN, divN4 } from "@thi.ng/vectors";
|
|
2
|
-
import { defMathN } from "./
|
|
1
|
+
import { divN as _divN, divN4 } from "@thi.ng/vectors/divn";
|
|
2
|
+
import { defMathN } from "./compile/emit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Componentwise matrix division by single scalar. If `out` is not
|
|
5
5
|
* given, writes result in `mat`.
|
package/frustum.d.ts
CHANGED
package/frustum.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEG2RAD } from "@thi.ng/math";
|
|
2
|
-
import { setC } from "@thi.ng/vectors";
|
|
1
|
+
import { DEG2RAD } from "@thi.ng/math/api";
|
|
2
|
+
import { setC } from "@thi.ng/vectors/setc";
|
|
3
3
|
/**
|
|
4
4
|
* Constructs a 4x4 matrix representing the given view frustum. Creates
|
|
5
5
|
* new matrix if `out` is `null`.
|
package/identity.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { MultiMatOp1 } from "./api";
|
|
1
|
+
import type { MultiMatOp1 } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Writes identity matrix into given matrix.
|
|
4
4
|
*/
|
|
5
5
|
export declare const identity: MultiMatOp1;
|
|
6
|
-
export declare const identity22: import("./api").MatOp1;
|
|
7
|
-
export declare const identity23: import("./api").MatOp1;
|
|
8
|
-
export declare const identity33: import("./api").MatOp1;
|
|
9
|
-
export declare const identity44: import("./api").MatOp1;
|
|
6
|
+
export declare const identity22: import("./api.js").MatOp1;
|
|
7
|
+
export declare const identity23: import("./api.js").MatOp1;
|
|
8
|
+
export declare const identity33: import("./api.js").MatOp1;
|
|
9
|
+
export declare const identity44: import("./api.js").MatOp1;
|
|
10
10
|
//# sourceMappingURL=identity.d.ts.map
|
package/identity.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { vop } from "@thi.ng/vectors";
|
|
2
|
-
import { IDENT22, IDENT23, IDENT33, IDENT44 } from "./constants";
|
|
3
|
-
import { set } from "./set";
|
|
1
|
+
import { vop } from "@thi.ng/vectors/vop";
|
|
2
|
+
import { IDENT22, IDENT23, IDENT33, IDENT44 } from "./constants.js";
|
|
3
|
+
import { set } from "./set.js";
|
|
4
4
|
/**
|
|
5
5
|
* Writes identity matrix into given matrix.
|
|
6
6
|
*/
|