@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.
Files changed (118) hide show
  1. package/CHANGELOG.md +68 -97
  2. package/README.md +26 -16
  3. package/add.d.ts +1 -1
  4. package/add.js +2 -2
  5. package/addn.d.ts +1 -1
  6. package/addn.js +2 -2
  7. package/alignment-quat.d.ts +1 -1
  8. package/alignment-quat.js +5 -2
  9. package/column.d.ts +1 -1
  10. package/column.js +2 -1
  11. package/compile/emit.d.ts +4 -0
  12. package/{internal/codegen.js → compile/emit.js} +2 -1
  13. package/concat.d.ts +1 -1
  14. package/concat.js +1 -1
  15. package/conjugate.d.ts +1 -1
  16. package/conjugate.js +1 -1
  17. package/constants.d.ts +1 -1
  18. package/determinant.d.ts +1 -1
  19. package/determinant.js +1 -1
  20. package/diag.d.ts +5 -5
  21. package/diag.js +2 -1
  22. package/div.d.ts +1 -1
  23. package/div.js +2 -2
  24. package/divn.d.ts +1 -1
  25. package/divn.js +2 -2
  26. package/frustum.d.ts +1 -1
  27. package/frustum.js +2 -2
  28. package/identity.d.ts +5 -5
  29. package/identity.js +3 -3
  30. package/index.d.ts +56 -56
  31. package/index.js +56 -56
  32. package/invert.d.ts +2 -2
  33. package/invert.js +5 -2
  34. package/lookat.d.ts +2 -2
  35. package/lookat.js +5 -1
  36. package/m22-m23.d.ts +1 -1
  37. package/m22-m23.js +1 -1
  38. package/m23-m22.d.ts +1 -1
  39. package/m23-m22.js +1 -1
  40. package/m23-m44.d.ts +1 -1
  41. package/m23-m44.js +1 -1
  42. package/m33-m44.d.ts +1 -1
  43. package/m33-m44.js +1 -1
  44. package/m44-m33.d.ts +1 -1
  45. package/m44-m33.js +1 -1
  46. package/matn.d.ts +1 -1
  47. package/matn.js +1 -1
  48. package/matv.js +1 -1
  49. package/mixq.d.ts +2 -2
  50. package/mixq.js +4 -1
  51. package/mul.d.ts +1 -1
  52. package/mul.js +2 -2
  53. package/mulm.d.ts +5 -5
  54. package/mulm.js +3 -1
  55. package/muln.d.ts +1 -1
  56. package/muln.js +2 -2
  57. package/mulq.d.ts +1 -1
  58. package/mulq.js +1 -1
  59. package/mulv.d.ts +2 -2
  60. package/mulv.js +3 -1
  61. package/mulvm.d.ts +2 -2
  62. package/mulvm.js +3 -1
  63. package/normal-mat.d.ts +1 -1
  64. package/normal-mat.js +3 -3
  65. package/orthagonal.d.ts +1 -1
  66. package/orthagonal.js +2 -1
  67. package/ortho.d.ts +1 -1
  68. package/ortho.js +1 -1
  69. package/outer-product.d.ts +1 -1
  70. package/outer-product.js +2 -1
  71. package/package.json +199 -26
  72. package/perspective.d.ts +1 -1
  73. package/perspective.js +1 -1
  74. package/project.d.ts +2 -2
  75. package/project.js +3 -3
  76. package/quat-axis-angle.d.ts +1 -1
  77. package/quat-axis-angle.js +2 -2
  78. package/quat-euler.d.ts +7 -7
  79. package/quat-euler.js +3 -3
  80. package/quat-m33.d.ts +1 -1
  81. package/quat-m33.js +1 -1
  82. package/quat-m44.d.ts +3 -3
  83. package/quat-m44.js +2 -1
  84. package/rotation-around-axis.d.ts +2 -2
  85. package/rotation-around-axis.js +4 -3
  86. package/rotation.d.ts +1 -1
  87. package/rotation.js +2 -2
  88. package/row.d.ts +5 -5
  89. package/row.js +2 -1
  90. package/scale-center.d.ts +2 -2
  91. package/scale-center.js +4 -4
  92. package/scale.d.ts +1 -1
  93. package/scale.js +2 -2
  94. package/set.d.ts +1 -1
  95. package/set.js +3 -1
  96. package/shear.d.ts +1 -1
  97. package/shear.js +1 -1
  98. package/skew.d.ts +1 -1
  99. package/skew.js +1 -1
  100. package/sub.d.ts +1 -1
  101. package/sub.js +2 -2
  102. package/subn.d.ts +1 -1
  103. package/subn.js +2 -2
  104. package/trace.d.ts +1 -1
  105. package/trace.js +2 -2
  106. package/transform.d.ts +1 -1
  107. package/transform.js +7 -7
  108. package/translation.d.ts +2 -2
  109. package/translation.js +1 -1
  110. package/transpose.d.ts +1 -1
  111. package/transpose.js +1 -1
  112. package/viewport.d.ts +1 -1
  113. package/viewport.js +3 -3
  114. package/internal/codegen.d.ts +0 -4
  115. package/lib/index.js +0 -733
  116. package/lib/index.js.map +0 -1
  117. package/lib/index.umd.js +0 -1
  118. 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
- ## [1.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@1.0.3...@thi.ng/matrices@1.0.4) (2021-08-19)
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
- ## [1.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@1.0.2...@thi.ng/matrices@1.0.3) (2021-08-19)
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
- ## [1.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@1.0.1...@thi.ng/matrices@1.0.2) (2021-08-17)
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
- ## [1.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.64...@thi.ng/matrices@1.0.1) (2021-08-08)
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
- ## [0.6.61](https://github.com/thi-ng/umbrella/compare/@thi.ng/matrices@0.6.60...@thi.ng/matrices@0.6.61) (2021-07-27)
63
-
64
- **Note:** Version bump only for package @thi.ng/matrices
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
- ### Features
61
+ **Note:** Version bump only for package @thi.ng/matrices
95
62
 
96
- * **matrices:** add project3(), refactor unproject(), mulV344() ([61c36fc](https://github.com/thi-ng/umbrella/commit/61c36fcc532d78b21d78dddeee5523155b0798b2))
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
- ## [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)
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
- ### Bug Fixes
75
+ ### Bug Fixes
105
76
 
106
- * **matrices:** mixQ result handling ([cc9ab35](https://github.com/thi-ng/umbrella/commit/cc9ab35))
77
+ - **matrices:** mixQ result handling ([cc9ab35](https://github.com/thi-ng/umbrella/commit/cc9ab35))
107
78
 
108
- # [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)
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
- ### Bug Fixes
81
+ ### Bug Fixes
111
82
 
112
- * **matrices:** update maddN call sites ([#95](https://github.com/thi-ng/umbrella/issues/95)) ([4a985c5](https://github.com/thi-ng/umbrella/commit/4a985c5))
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
- ### Features
85
+ ### Features
115
86
 
116
- * **matrices:** add isOrthagonal() ([d75305b](https://github.com/thi-ng/umbrella/commit/d75305b))
117
- * **matrices:** add matXXn & matXXv fns ([7a2ef82](https://github.com/thi-ng/umbrella/commit/7a2ef82))
118
- * **matrices:** add matXXn, matXXv, mulXXvm fns ([9359bbc](https://github.com/thi-ng/umbrella/commit/9359bbc))
119
- * **matrices:** enable TS strict compiler flags (refactor) ([7b1c81a](https://github.com/thi-ng/umbrella/commit/7b1c81a))
120
- * **matrices:** rename normal44 => normal33, add new normal44 (w/ M44 result) ([d54f746](https://github.com/thi-ng/umbrella/commit/d54f746))
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
- # [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)
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
- ### Features
95
+ ### Features
125
96
 
126
- * **matrices:** add outerProduct for vec 2/3/4 ([2a9d076](https://github.com/thi-ng/umbrella/commit/2a9d076))
97
+ - **matrices:** add outerProduct for vec 2/3/4 ([2a9d076](https://github.com/thi-ng/umbrella/commit/2a9d076))
127
98
 
128
- # [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)
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
- ### Features
101
+ ### Features
131
102
 
132
- * **matrices:** add transform23/44 fns ([dab6839](https://github.com/thi-ng/umbrella/commit/dab6839))
103
+ - **matrices:** add transform23/44 fns ([dab6839](https://github.com/thi-ng/umbrella/commit/dab6839))
133
104
 
134
- # [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)
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
- ### Features
107
+ ### Features
137
108
 
138
- * **matrices:** add MatXXLike type aliases ([a2ace9f](https://github.com/thi-ng/umbrella/commit/a2ace9f))
109
+ - **matrices:** add MatXXLike type aliases ([a2ace9f](https://github.com/thi-ng/umbrella/commit/a2ace9f))
139
110
 
140
- ## [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)
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
- ### Bug Fixes
113
+ ### Bug Fixes
143
114
 
144
- * **matrices:** Fix identity44 dispatch ([6812b2b](https://github.com/thi-ng/umbrella/commit/6812b2b))
115
+ - **matrices:** Fix identity44 dispatch ([6812b2b](https://github.com/thi-ng/umbrella/commit/6812b2b))
145
116
 
146
- # 0.1.0 (2019-01-21)
117
+ # 0.1.0 (2019-01-21)
147
118
 
148
- ### Bug Fixes
119
+ ### Bug Fixes
149
120
 
150
- * **matrices:** inject default output handling code ([0b07ac8](https://github.com/thi-ng/umbrella/commit/0b07ac8))
151
- * **matrices:** re-add persp divide in mulV344() ([4c6fe06](https://github.com/thi-ng/umbrella/commit/4c6fe06))
152
- * **matrices:** scaleWithCenter* (add missing concat() arg) ([4f02491](https://github.com/thi-ng/umbrella/commit/4f02491))
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
- ### Features
125
+ ### Features
155
126
 
156
- * **matrices:** add cwise matrix multiply, rename mul* => mulM*, move mulQ ([ae7a039](https://github.com/thi-ng/umbrella/commit/ae7a039))
157
- * **matrices:** add m22 & m23 matrix converters ([2aceab9](https://github.com/thi-ng/umbrella/commit/2aceab9))
158
- * **matrices:** add M44 factories ([f1a5cf1](https://github.com/thi-ng/umbrella/commit/f1a5cf1))
159
- * **matrices:** add more matrix ops ([35babfc](https://github.com/thi-ng/umbrella/commit/35babfc))
160
- * **matrices:** add more matrix ops, optimize & simplify ([f04e79e](https://github.com/thi-ng/umbrella/commit/f04e79e))
161
- * **matrices:** add quaternion fns ([b03b919](https://github.com/thi-ng/umbrella/commit/b03b919))
162
- * **matrices:** add quatToMat33, update readme ([52fb939](https://github.com/thi-ng/umbrella/commit/52fb939))
163
- * **matrices:** add rotationAroundAxis33/44() ([27f65f9](https://github.com/thi-ng/umbrella/commit/27f65f9))
164
- * **matrices:** add trace() ([16d56a3](https://github.com/thi-ng/umbrella/commit/16d56a3))
165
- * **matrices:** add viewport(), project/unproject(), update invert() ([d9e1b2e](https://github.com/thi-ng/umbrella/commit/d9e1b2e))
166
- * **matrices:** extract matrix ops to own package ([f940672](https://github.com/thi-ng/umbrella/commit/f940672))
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
- ### Performance Improvements
139
+ ### Performance Improvements
169
140
 
170
- * **matrices:** use setC6() for M23 ops ([d462ae0](https://github.com/thi-ng/umbrella/commit/d462ae0))
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
- // ES module
72
- <script type="module" src="https://unpkg.com/@thi.ng/matrices?module" crossorigin></script>
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
- // UMD
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.76 KB / CJS: 5.31 KB / UMD: 4.86 KB
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 | Description | Live demo | Source |
96
- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------- |
97
- | <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) |
98
- | <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) |
99
- | <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) |
100
- | <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) |
101
- | <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) |
102
- | <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) |
103
- | <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) |
104
- | <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) |
105
- | <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) |
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
@@ -1,4 +1,4 @@
1
- import type { MatOpMM, MultiMatOpMM } from "./api";
1
+ import type { MatOpMM, MultiMatOpMM } from "./api.js";
2
2
  /**
3
3
  * Componentwise matrix addition. If `out` is not given, writes result
4
4
  * in `a`. Both input matrices MUST be of same size.
package/add.js CHANGED
@@ -1,5 +1,5 @@
1
- import { add as _add, add4 } from "@thi.ng/vectors";
2
- import { defMath } from "./internal/codegen";
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
@@ -1,4 +1,4 @@
1
- import type { MatOpMN, MultiMatOpMN } from "./api";
1
+ import type { MatOpMN, MultiMatOpMN } from "./api.js";
2
2
  /**
3
3
  * Adds single scalar componentwise to matrix. If `out` is not given,
4
4
  * writes result in `mat`.
package/addn.js CHANGED
@@ -1,5 +1,5 @@
1
- import { addN as _addN, addN4 } from "@thi.ng/vectors";
2
- import { defMathN } from "./internal/codegen";
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`.
@@ -1,4 +1,4 @@
1
- import { ReadonlyVec } from "@thi.ng/vectors";
1
+ import type { ReadonlyVec } from "@thi.ng/vectors";
2
2
  /**
3
3
  * Returns quaternion describing the rotation from direction vector
4
4
  * `from` -> `to`. If `normalize` is true (default), first normalizes
package/alignment-quat.js CHANGED
@@ -1,5 +1,8 @@
1
- import { cross3, dot3, mag, normalize as _normalize, } from "@thi.ng/vectors";
2
- import { quatFromAxisAngle } from "./quat-axis-angle";
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
@@ -1,4 +1,4 @@
1
- import type { MultiVecOpMN, VecOpMN } from "./api";
1
+ import type { MultiVecOpMN, VecOpMN } from "./api.js";
2
2
  /**
3
3
  * Extracts column vector from given matrix and writes result to `out`.
4
4
  * If `out` is null, creates new vector.
package/column.js CHANGED
@@ -1,4 +1,5 @@
1
- import { setS2, setS3, setS4, vop } from "@thi.ng/vectors";
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 { ARGS_VN, ARGS_VV, compile, DEFAULT_OUT, MATH, MATH_N, } from "@thi.ng/vectors";
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
@@ -1,4 +1,4 @@
1
- import type { Mat, ReadonlyMat } from "./api";
1
+ import type { Mat, ReadonlyMat } from "./api.js";
2
2
  /**
3
3
  * Concatenates / multiplies given matrices in left-to-right order. A
4
4
  * minimum of 2 input matrices must be given. If `out` is null, writes
package/concat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { mulM } from "./mulm";
1
+ import { mulM } from "./mulm.js";
2
2
  /**
3
3
  * Concatenates / multiplies given matrices in left-to-right order. A
4
4
  * minimum of 2 input matrices must be given. If `out` is null, writes
package/conjugate.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { ReadonlyVec, Vec } from "@thi.ng/vectors";
1
+ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
2
2
  export declare const conjugateQ: (out: Vec | null, a: ReadonlyVec) => Vec;
3
3
  //# sourceMappingURL=conjugate.d.ts.map
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
@@ -1,4 +1,4 @@
1
- import type { ReadonlyMat } from "./api";
1
+ import type { ReadonlyMat } from "./api.js";
2
2
  export declare const IDENT22: ReadonlyMat;
3
3
  export declare const IDENT23: ReadonlyMat;
4
4
  export declare const IDENT33: ReadonlyMat;
package/determinant.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ReadonlyMat } from "./api";
1
+ import type { ReadonlyMat } from "./api.js";
2
2
  export declare const det22: (m: ReadonlyMat) => number;
3
3
  export declare const det23: (m: ReadonlyMat) => number;
4
4
  export declare const det33: (m: ReadonlyMat) => number;
package/determinant.js CHANGED
@@ -1,4 +1,4 @@
1
- import { dotC4, dotC6 } from "@thi.ng/vectors";
1
+ import { dotC4, dotC6 } from "@thi.ng/vectors/dotc";
2
2
  const dp4 = dotC4;
3
3
  const dp6 = dotC6;
4
4
  export const det22 = (m) => dp4(m[0], m[3], -m[1], m[2]);
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
@@ -1,4 +1,5 @@
1
- import { setS2, setS3, setS4, vop } from "@thi.ng/vectors";
1
+ import { setS2, setS3, setS4 } from "@thi.ng/vectors/sets";
2
+ import { vop } from "@thi.ng/vectors/vop";
2
3
  /**
3
4
  * Extracts matrix diagonal into `out`.
4
5
  *
package/div.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpMM, MultiMatOpMM } from "./api";
1
+ import type { MatOpMM, MultiMatOpMM } from "./api.js";
2
2
  /**
3
3
  * Componentwise matrix division. If `out` is not given, writes result
4
4
  * in `a`. Both input matrices MUST be of same size.
package/div.js CHANGED
@@ -1,5 +1,5 @@
1
- import { div as _div, div4 } from "@thi.ng/vectors";
2
- import { defMath } from "./internal/codegen";
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
@@ -1,4 +1,4 @@
1
- import type { MatOpMN, MultiMatOpMN } from "./api";
1
+ import type { MatOpMN, MultiMatOpMN } from "./api.js";
2
2
  /**
3
3
  * Componentwise matrix division by single scalar. If `out` is not
4
4
  * given, writes result in `mat`.
package/divn.js CHANGED
@@ -1,5 +1,5 @@
1
- import { divN as _divN, divN4 } from "@thi.ng/vectors";
2
- import { defMathN } from "./internal/codegen";
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
@@ -1,4 +1,4 @@
1
- import type { Mat } from "./api";
1
+ import type { Mat } from "./api.js";
2
2
  /**
3
3
  * Constructs a 4x4 matrix representing the given view frustum. Creates
4
4
  * new matrix if `out` is `null`.
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
  */