@lightningjs/renderer 2.7.1 → 2.8.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.
Files changed (200) hide show
  1. package/dist/exports/core-api.d.ts +74 -0
  2. package/dist/exports/core-api.js +96 -0
  3. package/dist/exports/core-api.js.map +1 -0
  4. package/dist/exports/main-api.d.ts +30 -0
  5. package/dist/exports/main-api.js +45 -0
  6. package/dist/exports/main-api.js.map +1 -0
  7. package/dist/src/core/CoreExtension.d.ts +12 -0
  8. package/dist/src/core/CoreExtension.js +29 -0
  9. package/dist/src/core/CoreExtension.js.map +1 -0
  10. package/dist/src/core/CoreNode.d.ts +2 -0
  11. package/dist/src/core/CoreNode.js +27 -8
  12. package/dist/src/core/CoreNode.js.map +1 -1
  13. package/dist/src/core/CoreShaderManager.js.map +1 -1
  14. package/dist/src/core/CoreStuff.d.ts +1 -0
  15. package/dist/src/core/CoreStuff.js +138 -0
  16. package/dist/src/core/CoreStuff.js.map +1 -0
  17. package/dist/src/core/LngNode.d.ts +736 -0
  18. package/dist/src/core/LngNode.js +1174 -0
  19. package/dist/src/core/LngNode.js.map +1 -0
  20. package/dist/src/core/Matrix2DContext.d.ts +15 -0
  21. package/dist/src/core/Matrix2DContext.js +45 -0
  22. package/dist/src/core/Matrix2DContext.js.map +1 -0
  23. package/dist/src/core/ShaderNode.d.ts +10 -0
  24. package/dist/src/core/ShaderNode.js +30 -0
  25. package/dist/src/core/ShaderNode.js.map +1 -0
  26. package/dist/src/core/Stage.d.ts +1 -0
  27. package/dist/src/core/Stage.js +4 -0
  28. package/dist/src/core/Stage.js.map +1 -1
  29. package/dist/src/core/TextNode.d.ts +103 -0
  30. package/dist/src/core/TextNode.js +331 -0
  31. package/dist/src/core/TextNode.js.map +1 -0
  32. package/dist/src/core/lib/Coords.d.ts +14 -0
  33. package/dist/src/core/lib/Coords.js +55 -0
  34. package/dist/src/core/lib/Coords.js.map +1 -0
  35. package/dist/src/core/lib/glm/common.d.ts +162 -0
  36. package/dist/src/core/lib/glm/common.js +81 -0
  37. package/dist/src/core/lib/glm/common.js.map +1 -0
  38. package/dist/src/core/lib/glm/index.d.ts +11 -0
  39. package/dist/src/core/lib/glm/index.js +30 -0
  40. package/dist/src/core/lib/glm/index.js.map +1 -0
  41. package/dist/src/core/lib/glm/mat2.d.ts +219 -0
  42. package/dist/src/core/lib/glm/mat2.js +396 -0
  43. package/dist/src/core/lib/glm/mat2.js.map +1 -0
  44. package/dist/src/core/lib/glm/mat2d.d.ts +237 -0
  45. package/dist/src/core/lib/glm/mat2d.js +442 -0
  46. package/dist/src/core/lib/glm/mat2d.js.map +1 -0
  47. package/dist/src/core/lib/glm/mat3.d.ts +283 -0
  48. package/dist/src/core/lib/glm/mat3.js +680 -0
  49. package/dist/src/core/lib/glm/mat3.js.map +1 -0
  50. package/dist/src/core/lib/glm/mat4.d.ts +550 -0
  51. package/dist/src/core/lib/glm/mat4.js +1802 -0
  52. package/dist/src/core/lib/glm/mat4.js.map +1 -0
  53. package/dist/src/core/lib/glm/quat.d.ts +363 -0
  54. package/dist/src/core/lib/glm/quat.js +693 -0
  55. package/dist/src/core/lib/glm/quat.js.map +1 -0
  56. package/dist/src/core/lib/glm/quat2.d.ts +356 -0
  57. package/dist/src/core/lib/glm/quat2.js +754 -0
  58. package/dist/src/core/lib/glm/quat2.js.map +1 -0
  59. package/dist/src/core/lib/glm/vec2.d.ts +365 -0
  60. package/dist/src/core/lib/glm/vec2.js +569 -0
  61. package/dist/src/core/lib/glm/vec2.js.map +1 -0
  62. package/dist/src/core/lib/glm/vec3.d.ts +406 -0
  63. package/dist/src/core/lib/glm/vec3.js +720 -0
  64. package/dist/src/core/lib/glm/vec3.js.map +1 -0
  65. package/dist/src/core/lib/glm/vec4.d.ts +330 -0
  66. package/dist/src/core/lib/glm/vec4.js +608 -0
  67. package/dist/src/core/lib/glm/vec4.js.map +1 -0
  68. package/dist/src/core/renderers/CoreRenderer.d.ts +1 -0
  69. package/dist/src/core/renderers/CoreRenderer.js.map +1 -1
  70. package/dist/src/core/renderers/CoreShaderManager.d.ts +19 -0
  71. package/dist/src/core/renderers/CoreShaderManager.js +33 -0
  72. package/dist/src/core/renderers/CoreShaderManager.js.map +1 -0
  73. package/dist/src/core/renderers/canvas/CanvasCoreRenderer.d.ts +6 -0
  74. package/dist/src/core/renderers/canvas/CanvasCoreRenderer.js +8 -0
  75. package/dist/src/core/renderers/canvas/CanvasCoreRenderer.js.map +1 -1
  76. package/dist/src/core/renderers/webgl/WebGlCoreRenderer.d.ts +8 -1
  77. package/dist/src/core/renderers/webgl/WebGlCoreRenderer.js +25 -4
  78. package/dist/src/core/renderers/webgl/WebGlCoreRenderer.js.map +1 -1
  79. package/dist/src/core/renderers/webgl/WebGlCoreShaderManager.d.ts +27 -0
  80. package/dist/src/core/renderers/webgl/WebGlCoreShaderManager.js +82 -0
  81. package/dist/src/core/renderers/webgl/WebGlCoreShaderManager.js.map +1 -0
  82. package/dist/src/core/renderers/webgl/WebGlCoreShaderProgram.d.ts +11 -0
  83. package/dist/src/core/renderers/webgl/WebGlCoreShaderProgram.js +34 -0
  84. package/dist/src/core/renderers/webgl/WebGlCoreShaderProgram.js.map +1 -0
  85. package/dist/src/core/renderers/webgl/internal/RendererUtils.d.ts +4 -0
  86. package/dist/src/core/renderers/webgl/shaders/SdfShader.d.ts +1 -0
  87. package/dist/src/core/renderers/webgl/shaders/SdfShader.js +1 -0
  88. package/dist/src/core/renderers/webgl/shaders/SdfShader.js.map +1 -1
  89. package/dist/src/core/scene/Scene.d.ts +59 -0
  90. package/dist/src/core/scene/Scene.js +106 -0
  91. package/dist/src/core/scene/Scene.js.map +1 -0
  92. package/dist/src/core/text-rendering/renderers/SdfTextRenderer/SdfTextRenderer.js +8 -1
  93. package/dist/src/core/text-rendering/renderers/SdfTextRenderer/SdfTextRenderer.js.map +1 -1
  94. package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/makeRenderWindow.d.ts +20 -0
  95. package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/makeRenderWindow.js +55 -0
  96. package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/makeRenderWindow.js.map +1 -0
  97. package/dist/src/main-api/ICoreDriver.d.ts +27 -0
  98. package/dist/src/main-api/ICoreDriver.js +20 -0
  99. package/dist/src/main-api/ICoreDriver.js.map +1 -0
  100. package/dist/src/main-api/IRenderDriver.d.ts +20 -0
  101. package/dist/src/main-api/IRenderDriver.js +20 -0
  102. package/dist/src/main-api/IRenderDriver.js.map +1 -0
  103. package/dist/src/main-api/IShaderController.d.ts +14 -0
  104. package/dist/src/main-api/IShaderController.js +30 -0
  105. package/dist/src/main-api/IShaderController.js.map +1 -0
  106. package/dist/src/main-api/IShaderNode.d.ts +17 -0
  107. package/dist/src/main-api/IShaderNode.js +19 -0
  108. package/dist/src/main-api/IShaderNode.js.map +1 -0
  109. package/dist/src/main-api/Renderer.d.ts +6 -0
  110. package/dist/src/main-api/Renderer.js +8 -0
  111. package/dist/src/main-api/Renderer.js.map +1 -1
  112. package/dist/src/main-api/RendererMain.d.ts +375 -0
  113. package/dist/src/main-api/RendererMain.js +365 -0
  114. package/dist/src/main-api/RendererMain.js.map +1 -0
  115. package/dist/src/main-api/ShaderController.js.map +1 -1
  116. package/dist/src/main-api/texture-usage-trackers/FinalizationRegistryTextureUsageTracker.d.ts +9 -0
  117. package/dist/src/main-api/texture-usage-trackers/FinalizationRegistryTextureUsageTracker.js +38 -0
  118. package/dist/src/main-api/texture-usage-trackers/FinalizationRegistryTextureUsageTracker.js.map +1 -0
  119. package/dist/src/main-api/texture-usage-trackers/ManualCountTextureUsageTracker.d.ts +56 -0
  120. package/dist/src/main-api/texture-usage-trackers/ManualCountTextureUsageTracker.js +101 -0
  121. package/dist/src/main-api/texture-usage-trackers/ManualCountTextureUsageTracker.js.map +1 -0
  122. package/dist/src/main-api/texture-usage-trackers/TextureUsageTracker.d.ts +32 -0
  123. package/dist/src/main-api/texture-usage-trackers/TextureUsageTracker.js +28 -0
  124. package/dist/src/main-api/texture-usage-trackers/TextureUsageTracker.js.map +1 -0
  125. package/dist/src/render-drivers/main/MainCoreDriver.d.ts +24 -0
  126. package/dist/src/render-drivers/main/MainCoreDriver.js +118 -0
  127. package/dist/src/render-drivers/main/MainCoreDriver.js.map +1 -0
  128. package/dist/src/render-drivers/main/MainOnlyNode.d.ts +99 -0
  129. package/dist/src/render-drivers/main/MainOnlyNode.js +396 -0
  130. package/dist/src/render-drivers/main/MainOnlyNode.js.map +1 -0
  131. package/dist/src/render-drivers/main/MainOnlyShaderController.d.ts +6 -0
  132. package/dist/src/render-drivers/main/MainOnlyShaderController.js +15 -0
  133. package/dist/src/render-drivers/main/MainOnlyShaderController.js.map +1 -0
  134. package/dist/src/render-drivers/main/MainOnlyShaderNode.d.ts +7 -0
  135. package/dist/src/render-drivers/main/MainOnlyShaderNode.js +34 -0
  136. package/dist/src/render-drivers/main/MainOnlyShaderNode.js.map +1 -0
  137. package/dist/src/render-drivers/main/MainOnlyTextNode.d.ts +47 -0
  138. package/dist/src/render-drivers/main/MainOnlyTextNode.js +205 -0
  139. package/dist/src/render-drivers/main/MainOnlyTextNode.js.map +1 -0
  140. package/dist/src/render-drivers/main/MainRenderDriver.d.ts +17 -0
  141. package/dist/src/render-drivers/main/MainRenderDriver.js +88 -0
  142. package/dist/src/render-drivers/main/MainRenderDriver.js.map +1 -0
  143. package/dist/src/render-drivers/threadx/NodeStruct.d.ts +90 -0
  144. package/dist/src/render-drivers/threadx/NodeStruct.js +281 -0
  145. package/dist/src/render-drivers/threadx/NodeStruct.js.map +1 -0
  146. package/dist/src/render-drivers/threadx/SharedNode.d.ts +39 -0
  147. package/dist/src/render-drivers/threadx/SharedNode.js +60 -0
  148. package/dist/src/render-drivers/threadx/SharedNode.js.map +1 -0
  149. package/dist/src/render-drivers/threadx/TextNodeStruct.d.ts +44 -0
  150. package/dist/src/render-drivers/threadx/TextNodeStruct.js +201 -0
  151. package/dist/src/render-drivers/threadx/TextNodeStruct.js.map +1 -0
  152. package/dist/src/render-drivers/threadx/ThreadXCoreDriver.d.ts +28 -0
  153. package/dist/src/render-drivers/threadx/ThreadXCoreDriver.js +234 -0
  154. package/dist/src/render-drivers/threadx/ThreadXCoreDriver.js.map +1 -0
  155. package/dist/src/render-drivers/threadx/ThreadXMainAnimationController.d.ts +20 -0
  156. package/dist/src/render-drivers/threadx/ThreadXMainAnimationController.js +84 -0
  157. package/dist/src/render-drivers/threadx/ThreadXMainAnimationController.js.map +1 -0
  158. package/dist/src/render-drivers/threadx/ThreadXMainNode.d.ts +44 -0
  159. package/dist/src/render-drivers/threadx/ThreadXMainNode.js +154 -0
  160. package/dist/src/render-drivers/threadx/ThreadXMainNode.js.map +1 -0
  161. package/dist/src/render-drivers/threadx/ThreadXMainShaderController.d.ts +6 -0
  162. package/dist/src/render-drivers/threadx/ThreadXMainShaderController.js +16 -0
  163. package/dist/src/render-drivers/threadx/ThreadXMainShaderController.js.map +1 -0
  164. package/dist/src/render-drivers/threadx/ThreadXMainShaderNode.d.ts +7 -0
  165. package/dist/src/render-drivers/threadx/ThreadXMainShaderNode.js +15 -0
  166. package/dist/src/render-drivers/threadx/ThreadXMainShaderNode.js.map +1 -0
  167. package/dist/src/render-drivers/threadx/ThreadXMainTextNode.d.ts +28 -0
  168. package/dist/src/render-drivers/threadx/ThreadXMainTextNode.js +55 -0
  169. package/dist/src/render-drivers/threadx/ThreadXMainTextNode.js.map +1 -0
  170. package/dist/src/render-drivers/threadx/ThreadXRenderDriver.d.ts +21 -0
  171. package/dist/src/render-drivers/threadx/ThreadXRenderDriver.js +198 -0
  172. package/dist/src/render-drivers/threadx/ThreadXRenderDriver.js.map +1 -0
  173. package/dist/src/render-drivers/threadx/ThreadXRendererMessage.d.ts +70 -0
  174. package/dist/src/render-drivers/threadx/ThreadXRendererMessage.js +32 -0
  175. package/dist/src/render-drivers/threadx/ThreadXRendererMessage.js.map +1 -0
  176. package/dist/src/render-drivers/threadx/worker/ThreadXRendererNode.d.ts +19 -0
  177. package/dist/src/render-drivers/threadx/worker/ThreadXRendererNode.js +177 -0
  178. package/dist/src/render-drivers/threadx/worker/ThreadXRendererNode.js.map +1 -0
  179. package/dist/src/render-drivers/threadx/worker/ThreadXRendererTextNode.d.ts +27 -0
  180. package/dist/src/render-drivers/threadx/worker/ThreadXRendererTextNode.js +108 -0
  181. package/dist/src/render-drivers/threadx/worker/ThreadXRendererTextNode.js.map +1 -0
  182. package/dist/src/render-drivers/threadx/worker/renderer.d.ts +1 -0
  183. package/dist/src/render-drivers/threadx/worker/renderer.js +145 -0
  184. package/dist/src/render-drivers/threadx/worker/renderer.js.map +1 -0
  185. package/dist/src/render-drivers/utils.d.ts +12 -0
  186. package/dist/src/render-drivers/utils.js +69 -0
  187. package/dist/src/render-drivers/utils.js.map +1 -0
  188. package/dist/tsconfig.dist.tsbuildinfo +1 -1
  189. package/package.json +2 -1
  190. package/src/core/CoreNode.ts +30 -9
  191. package/src/core/CoreShaderManager.ts +1 -1
  192. package/src/core/Stage.ts +5 -0
  193. package/src/core/renderers/CoreRenderer.ts +1 -0
  194. package/src/core/renderers/canvas/CanvasCoreRenderer.ts +9 -0
  195. package/src/core/renderers/webgl/WebGlCoreRenderer.ts +35 -5
  196. package/src/core/renderers/webgl/internal/RendererUtils.ts +5 -0
  197. package/src/core/renderers/webgl/shaders/SdfShader.ts +2 -0
  198. package/src/core/text-rendering/renderers/SdfTextRenderer/SdfTextRenderer.ts +8 -1
  199. package/src/main-api/Renderer.ts +9 -0
  200. package/src/main-api/ShaderController.ts +0 -1
@@ -0,0 +1,30 @@
1
+ /*
2
+ * If not stated otherwise in this file or this component's LICENSE file the
3
+ * following copyright and licenses apply:
4
+ *
5
+ * Copyright 2023 Comcast Cable Communications Management, LLC.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the License);
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ import * as glMatrix from './common.js';
20
+ import * as mat2 from './mat2.js';
21
+ import * as mat2d from './mat2d.js';
22
+ import * as mat3 from './mat3.js';
23
+ import * as mat4 from './mat4.js';
24
+ import * as quat from './quat.js';
25
+ import * as quat2 from './quat2.js';
26
+ import * as vec2 from './vec2.js';
27
+ import * as vec3 from './vec3.js';
28
+ import * as vec4 from './vec4.js';
29
+ export { glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 };
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/lib/glm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,219 @@
1
+ import { type Float32ArrayLen4, type NumberArrayLen4 } from './common.js';
2
+ import type { Vec2 } from './vec2.js';
3
+ export type Mat2 = Float32ArrayLen4 | NumberArrayLen4;
4
+ /**
5
+ * Creates a new identity Mat2
6
+ *
7
+ * @returns {Mat2} a new 2x2 matrix
8
+ */
9
+ export declare function create(): Mat2;
10
+ /**
11
+ * Creates a new Mat2 initialized with values from an existing matrix
12
+ *
13
+ * @param {Mat2} a matrix to clone
14
+ * @returns {Mat2} a new 2x2 matrix
15
+ */
16
+ export declare function clone(a: Mat2): Mat2;
17
+ /**
18
+ * Copy the values from one Mat2 to another
19
+ *
20
+ * @param {Mat2} out the receiving matrix
21
+ * @param {Mat2} a the source matrix
22
+ * @returns {Mat2} out
23
+ */
24
+ export declare function copy(out: Mat2, a: Mat2): Mat2;
25
+ /**
26
+ * Set a Mat2 to the identity matrix
27
+ *
28
+ * @param {Mat2} out the receiving matrix
29
+ * @returns {Mat2} out
30
+ */
31
+ export declare function identity(out: Mat2): Mat2;
32
+ /**
33
+ * Create a new Mat2 with the given values
34
+ *
35
+ * @param {number} m00 Component in column 0, row 0 position (index 0)
36
+ * @param {number} m01 Component in column 0, row 1 position (index 1)
37
+ * @param {number} m10 Component in column 1, row 0 position (index 2)
38
+ * @param {number} m11 Component in column 1, row 1 position (index 3)
39
+ * @returns {Mat2} out A new 2x2 matrix
40
+ */
41
+ export declare function fromValues(m00: number, m01: number, m10: number, m11: number): Mat2;
42
+ /**
43
+ * Set the components of a Mat2 to the given values
44
+ *
45
+ * @param {Mat2} out the receiving matrix
46
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
47
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
48
+ * @param {Number} m10 Component in column 1, row 0 position (index 2)
49
+ * @param {Number} m11 Component in column 1, row 1 position (index 3)
50
+ * @returns {Mat2} out
51
+ */
52
+ export declare function set(out: Mat2, m00: number, m01: number, m10: number, m11: number): Mat2;
53
+ /**
54
+ * Transpose the values of a Mat2
55
+ *
56
+ * @param {Mat2} out the receiving matrix
57
+ * @param {Mat2} a the source matrix
58
+ * @returns {Mat2} out
59
+ */
60
+ export declare function transpose(out: Mat2, a: Mat2): Mat2;
61
+ /**
62
+ * Inverts a Mat2
63
+ *
64
+ * @param {Mat2} out the receiving matrix
65
+ * @param {Mat2} a the source matrix
66
+ * @returns {Mat2} out
67
+ */
68
+ export declare function invert(out: Mat2, a: Mat2): Mat2 | null;
69
+ /**
70
+ * Calculates the adjugate of a Mat2
71
+ *
72
+ * @param {Mat2} out the receiving matrix
73
+ * @param {Mat2} a the source matrix
74
+ * @returns {Mat2} out
75
+ */
76
+ export declare function adjoint(out: Mat2, a: Mat2): Mat2;
77
+ /**
78
+ * Calculates the determinant of a Mat2
79
+ *
80
+ * @param {Mat2} a the source matrix
81
+ * @returns {number} determinant of a
82
+ */
83
+ export declare function determinant(a: Mat2): number;
84
+ /**
85
+ * Multiplies two Mat2's
86
+ *
87
+ * @param {Mat2} out the receiving matrix
88
+ * @param {Mat2} a the first operand
89
+ * @param {Mat2} b the second operand
90
+ * @returns {Mat2} out
91
+ */
92
+ export declare function multiply(out: Mat2, a: Mat2, b: Mat2): Mat2;
93
+ /**
94
+ * Rotates a Mat2 by the given angle
95
+ *
96
+ * @param {Mat2} out the receiving matrix
97
+ * @param {Mat2} a the matrix to rotate
98
+ * @param {Number} rad the angle to rotate the matrix by
99
+ * @returns {Mat2} out
100
+ */
101
+ export declare function rotate(out: Mat2, a: Mat2, rad: number): Mat2;
102
+ /**
103
+ * Scales the Mat2 by the dimensions in the given vec2
104
+ *
105
+ * @param {Mat2} out the receiving matrix
106
+ * @param {Mat2} a the matrix to rotate
107
+ * @param {Vec2} v the vec2 to scale the matrix by
108
+ * @returns {Mat2} out
109
+ **/
110
+ export declare function scale(out: Mat2, a: Mat2, v: Vec2): Mat2;
111
+ /**
112
+ * Creates a matrix from a given angle
113
+ * This is equivalent to (but much faster than):
114
+ *
115
+ * Mat2.identity(dest);
116
+ * Mat2.rotate(dest, dest, rad);
117
+ *
118
+ * @param {Mat2} out Mat2 receiving operation result
119
+ * @param {number} rad the angle to rotate the matrix by
120
+ * @returns {Mat2} out
121
+ */
122
+ export declare function fromRotation(out: Mat2, rad: number): Mat2;
123
+ /**
124
+ * Creates a matrix from a vector scaling
125
+ * This is equivalent to (but much faster than):
126
+ *
127
+ * Mat2.identity(dest);
128
+ * Mat2.scale(dest, dest, vec);
129
+ *
130
+ * @param {Mat2} out Mat2 receiving operation result
131
+ * @param {Vec2} v Scaling vector
132
+ * @returns {Mat2} out
133
+ */
134
+ export declare function fromScaling(out: Mat2, v: Vec2): Mat2;
135
+ /**
136
+ * Returns a string representation of a Mat2
137
+ *
138
+ * @param {Mat2} a matrix to represent as a string
139
+ * @returns {String} string representation of the matrix
140
+ */
141
+ export declare function str(a: Mat2): string;
142
+ /**
143
+ * Returns Frobenius norm of a Mat2
144
+ *
145
+ * @param {Mat2} a the matrix to calculate Frobenius norm of
146
+ * @returns {Number} Frobenius norm
147
+ */
148
+ export declare function frob(a: Mat2): number;
149
+ /**
150
+ * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
151
+ * @param {Mat2} L the lower triangular matrix
152
+ * @param {Mat2} D the diagonal matrix
153
+ * @param {Mat2} U the upper triangular matrix
154
+ * @param {Mat2} a the input matrix to factorize
155
+ */
156
+ export declare function LDU(L: Mat2, D: Mat2, U: Mat2, a: Mat2): Mat2[];
157
+ /**
158
+ * Adds two Mat2's
159
+ *
160
+ * @param {Mat2} out the receiving matrix
161
+ * @param {Mat2} a the first operand
162
+ * @param {Mat2} b the second operand
163
+ * @returns {Mat2} out
164
+ */
165
+ export declare function add(out: Mat2, a: Mat2, b: Mat2): Mat2;
166
+ /**
167
+ * Subtracts matrix b from matrix a
168
+ *
169
+ * @param {Mat2} out the receiving matrix
170
+ * @param {Mat2} a the first operand
171
+ * @param {Mat2} b the second operand
172
+ * @returns {Mat2} out
173
+ */
174
+ export declare function subtract(out: Mat2, a: Mat2, b: Mat2): Mat2;
175
+ /**
176
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
177
+ *
178
+ * @param {Mat2} a The first matrix.
179
+ * @param {Mat2} b The second matrix.
180
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
181
+ */
182
+ export declare function exactEquals(a: Mat2, b: Mat2): boolean;
183
+ /**
184
+ * Returns whether or not the matrices have approximately the same elements in the same position.
185
+ *
186
+ * @param {Mat2} a The first matrix.
187
+ * @param {Mat2} b The second matrix.
188
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
189
+ */
190
+ export declare function equals(a: Mat2, b: Mat2): boolean;
191
+ /**
192
+ * Multiply each element of the matrix by a scalar.
193
+ *
194
+ * @param {Mat2} out the receiving matrix
195
+ * @param {Mat2} a the matrix to scale
196
+ * @param {Number} b amount to scale the matrix's elements by
197
+ * @returns {Mat2} out
198
+ */
199
+ export declare function multiplyScalar(out: Mat2, a: Mat2, b: number): Mat2;
200
+ /**
201
+ * Adds two Mat2's after multiplying each element of the second operand by a scalar value.
202
+ *
203
+ * @param {Mat2} out the receiving vector
204
+ * @param {Mat2} a the first operand
205
+ * @param {Mat2} b the second operand
206
+ * @param {Number} scale the amount to scale b's elements by before adding
207
+ * @returns {Mat2} out
208
+ */
209
+ export declare function multiplyScalarAndAdd(out: Mat2, a: Mat2, b: Mat2, scale: number): Mat2;
210
+ /**
211
+ * Alias for {@link multiply}
212
+ * @function
213
+ */
214
+ export declare const mul: typeof multiply;
215
+ /**
216
+ * Alias for {@link subtract}
217
+ * @function
218
+ */
219
+ export declare const sub: typeof subtract;
@@ -0,0 +1,396 @@
1
+ /*
2
+ * If not stated otherwise in this file or this component's LICENSE file the
3
+ * following copyright and licenses apply:
4
+ *
5
+ * Copyright 2023 Comcast Cable Communications Management, LLC.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the License);
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ import { EPSILON, getMatrixArrayType, } from './common.js';
20
+ /**
21
+ * Creates a new identity Mat2
22
+ *
23
+ * @returns {Mat2} a new 2x2 matrix
24
+ */
25
+ export function create() {
26
+ const out = getMatrixArrayType(4);
27
+ if (!(out instanceof Float32Array)) {
28
+ out[1] = 0;
29
+ out[2] = 0;
30
+ }
31
+ out[0] = 1;
32
+ out[3] = 1;
33
+ return out;
34
+ }
35
+ /**
36
+ * Creates a new Mat2 initialized with values from an existing matrix
37
+ *
38
+ * @param {Mat2} a matrix to clone
39
+ * @returns {Mat2} a new 2x2 matrix
40
+ */
41
+ export function clone(a) {
42
+ const out = getMatrixArrayType(4);
43
+ out[0] = a[0];
44
+ out[1] = a[1];
45
+ out[2] = a[2];
46
+ out[3] = a[3];
47
+ return out;
48
+ }
49
+ /**
50
+ * Copy the values from one Mat2 to another
51
+ *
52
+ * @param {Mat2} out the receiving matrix
53
+ * @param {Mat2} a the source matrix
54
+ * @returns {Mat2} out
55
+ */
56
+ export function copy(out, a) {
57
+ out[0] = a[0];
58
+ out[1] = a[1];
59
+ out[2] = a[2];
60
+ out[3] = a[3];
61
+ return out;
62
+ }
63
+ /**
64
+ * Set a Mat2 to the identity matrix
65
+ *
66
+ * @param {Mat2} out the receiving matrix
67
+ * @returns {Mat2} out
68
+ */
69
+ export function identity(out) {
70
+ out[0] = 1;
71
+ out[1] = 0;
72
+ out[2] = 0;
73
+ out[3] = 1;
74
+ return out;
75
+ }
76
+ /**
77
+ * Create a new Mat2 with the given values
78
+ *
79
+ * @param {number} m00 Component in column 0, row 0 position (index 0)
80
+ * @param {number} m01 Component in column 0, row 1 position (index 1)
81
+ * @param {number} m10 Component in column 1, row 0 position (index 2)
82
+ * @param {number} m11 Component in column 1, row 1 position (index 3)
83
+ * @returns {Mat2} out A new 2x2 matrix
84
+ */
85
+ export function fromValues(m00, m01, m10, m11) {
86
+ const out = getMatrixArrayType(4);
87
+ out[0] = m00;
88
+ out[1] = m01;
89
+ out[2] = m10;
90
+ out[3] = m11;
91
+ return out;
92
+ }
93
+ /**
94
+ * Set the components of a Mat2 to the given values
95
+ *
96
+ * @param {Mat2} out the receiving matrix
97
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
98
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
99
+ * @param {Number} m10 Component in column 1, row 0 position (index 2)
100
+ * @param {Number} m11 Component in column 1, row 1 position (index 3)
101
+ * @returns {Mat2} out
102
+ */
103
+ export function set(out, m00, m01, m10, m11) {
104
+ out[0] = m00;
105
+ out[1] = m01;
106
+ out[2] = m10;
107
+ out[3] = m11;
108
+ return out;
109
+ }
110
+ /**
111
+ * Transpose the values of a Mat2
112
+ *
113
+ * @param {Mat2} out the receiving matrix
114
+ * @param {Mat2} a the source matrix
115
+ * @returns {Mat2} out
116
+ */
117
+ export function transpose(out, a) {
118
+ // If we are transposing ourselves we can skip a few steps but have to cache
119
+ // some values
120
+ if (out === a) {
121
+ const a1 = a[1];
122
+ out[1] = a[2];
123
+ out[2] = a1;
124
+ }
125
+ else {
126
+ out[0] = a[0];
127
+ out[1] = a[2];
128
+ out[2] = a[1];
129
+ out[3] = a[3];
130
+ }
131
+ return out;
132
+ }
133
+ /**
134
+ * Inverts a Mat2
135
+ *
136
+ * @param {Mat2} out the receiving matrix
137
+ * @param {Mat2} a the source matrix
138
+ * @returns {Mat2} out
139
+ */
140
+ export function invert(out, a) {
141
+ const a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; // Calculate the determinant
142
+ let det = a0 * a3 - a2 * a1;
143
+ if (!det) {
144
+ return null;
145
+ }
146
+ det = 1.0 / det;
147
+ out[0] = a3 * det;
148
+ out[1] = -a1 * det;
149
+ out[2] = -a2 * det;
150
+ out[3] = a0 * det;
151
+ return out;
152
+ }
153
+ /**
154
+ * Calculates the adjugate of a Mat2
155
+ *
156
+ * @param {Mat2} out the receiving matrix
157
+ * @param {Mat2} a the source matrix
158
+ * @returns {Mat2} out
159
+ */
160
+ export function adjoint(out, a) {
161
+ // Caching this value is necessary if out == a
162
+ const a0 = a[0];
163
+ out[0] = a[3];
164
+ out[1] = -a[1];
165
+ out[2] = -a[2];
166
+ out[3] = a0;
167
+ return out;
168
+ }
169
+ /**
170
+ * Calculates the determinant of a Mat2
171
+ *
172
+ * @param {Mat2} a the source matrix
173
+ * @returns {number} determinant of a
174
+ */
175
+ export function determinant(a) {
176
+ return a[0] * a[3] - a[2] * a[1];
177
+ }
178
+ /**
179
+ * Multiplies two Mat2's
180
+ *
181
+ * @param {Mat2} out the receiving matrix
182
+ * @param {Mat2} a the first operand
183
+ * @param {Mat2} b the second operand
184
+ * @returns {Mat2} out
185
+ */
186
+ export function multiply(out, a, b) {
187
+ const a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
188
+ const b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
189
+ out[0] = a0 * b0 + a2 * b1;
190
+ out[1] = a1 * b0 + a3 * b1;
191
+ out[2] = a0 * b2 + a2 * b3;
192
+ out[3] = a1 * b2 + a3 * b3;
193
+ return out;
194
+ }
195
+ /**
196
+ * Rotates a Mat2 by the given angle
197
+ *
198
+ * @param {Mat2} out the receiving matrix
199
+ * @param {Mat2} a the matrix to rotate
200
+ * @param {Number} rad the angle to rotate the matrix by
201
+ * @returns {Mat2} out
202
+ */
203
+ export function rotate(out, a, rad) {
204
+ const a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
205
+ const s = Math.sin(rad);
206
+ const c = Math.cos(rad);
207
+ out[0] = a0 * c + a2 * s;
208
+ out[1] = a1 * c + a3 * s;
209
+ out[2] = a0 * -s + a2 * c;
210
+ out[3] = a1 * -s + a3 * c;
211
+ return out;
212
+ }
213
+ /**
214
+ * Scales the Mat2 by the dimensions in the given vec2
215
+ *
216
+ * @param {Mat2} out the receiving matrix
217
+ * @param {Mat2} a the matrix to rotate
218
+ * @param {Vec2} v the vec2 to scale the matrix by
219
+ * @returns {Mat2} out
220
+ **/
221
+ export function scale(out, a, v) {
222
+ const a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
223
+ const v0 = v[0], v1 = v[1];
224
+ out[0] = a0 * v0;
225
+ out[1] = a1 * v0;
226
+ out[2] = a2 * v1;
227
+ out[3] = a3 * v1;
228
+ return out;
229
+ }
230
+ /**
231
+ * Creates a matrix from a given angle
232
+ * This is equivalent to (but much faster than):
233
+ *
234
+ * Mat2.identity(dest);
235
+ * Mat2.rotate(dest, dest, rad);
236
+ *
237
+ * @param {Mat2} out Mat2 receiving operation result
238
+ * @param {number} rad the angle to rotate the matrix by
239
+ * @returns {Mat2} out
240
+ */
241
+ export function fromRotation(out, rad) {
242
+ const s = Math.sin(rad);
243
+ const c = Math.cos(rad);
244
+ out[0] = c;
245
+ out[1] = s;
246
+ out[2] = -s;
247
+ out[3] = c;
248
+ return out;
249
+ }
250
+ /**
251
+ * Creates a matrix from a vector scaling
252
+ * This is equivalent to (but much faster than):
253
+ *
254
+ * Mat2.identity(dest);
255
+ * Mat2.scale(dest, dest, vec);
256
+ *
257
+ * @param {Mat2} out Mat2 receiving operation result
258
+ * @param {Vec2} v Scaling vector
259
+ * @returns {Mat2} out
260
+ */
261
+ export function fromScaling(out, v) {
262
+ out[0] = v[0];
263
+ out[1] = 0;
264
+ out[2] = 0;
265
+ out[3] = v[1];
266
+ return out;
267
+ }
268
+ /**
269
+ * Returns a string representation of a Mat2
270
+ *
271
+ * @param {Mat2} a matrix to represent as a string
272
+ * @returns {String} string representation of the matrix
273
+ */
274
+ export function str(a) {
275
+ return `Mat2(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]})`;
276
+ }
277
+ /**
278
+ * Returns Frobenius norm of a Mat2
279
+ *
280
+ * @param {Mat2} a the matrix to calculate Frobenius norm of
281
+ * @returns {Number} Frobenius norm
282
+ */
283
+ export function frob(a) {
284
+ return Math.hypot(a[0], a[1], a[2], a[3]);
285
+ }
286
+ /**
287
+ * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
288
+ * @param {Mat2} L the lower triangular matrix
289
+ * @param {Mat2} D the diagonal matrix
290
+ * @param {Mat2} U the upper triangular matrix
291
+ * @param {Mat2} a the input matrix to factorize
292
+ */
293
+ export function LDU(L, D, U, a) {
294
+ L[2] = a[2] / a[0];
295
+ U[0] = a[0];
296
+ U[1] = a[1];
297
+ U[3] = a[3] - L[2] * U[1];
298
+ return [L, D, U];
299
+ }
300
+ /**
301
+ * Adds two Mat2's
302
+ *
303
+ * @param {Mat2} out the receiving matrix
304
+ * @param {Mat2} a the first operand
305
+ * @param {Mat2} b the second operand
306
+ * @returns {Mat2} out
307
+ */
308
+ export function add(out, a, b) {
309
+ out[0] = a[0] + b[0];
310
+ out[1] = a[1] + b[1];
311
+ out[2] = a[2] + b[2];
312
+ out[3] = a[3] + b[3];
313
+ return out;
314
+ }
315
+ /**
316
+ * Subtracts matrix b from matrix a
317
+ *
318
+ * @param {Mat2} out the receiving matrix
319
+ * @param {Mat2} a the first operand
320
+ * @param {Mat2} b the second operand
321
+ * @returns {Mat2} out
322
+ */
323
+ export function subtract(out, a, b) {
324
+ out[0] = a[0] - b[0];
325
+ out[1] = a[1] - b[1];
326
+ out[2] = a[2] - b[2];
327
+ out[3] = a[3] - b[3];
328
+ return out;
329
+ }
330
+ /**
331
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
332
+ *
333
+ * @param {Mat2} a The first matrix.
334
+ * @param {Mat2} b The second matrix.
335
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
336
+ */
337
+ export function exactEquals(a, b) {
338
+ return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
339
+ }
340
+ /**
341
+ * Returns whether or not the matrices have approximately the same elements in the same position.
342
+ *
343
+ * @param {Mat2} a The first matrix.
344
+ * @param {Mat2} b The second matrix.
345
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
346
+ */
347
+ export function equals(a, b) {
348
+ const a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
349
+ const b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
350
+ return (Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&
351
+ Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&
352
+ Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&
353
+ Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)));
354
+ }
355
+ /**
356
+ * Multiply each element of the matrix by a scalar.
357
+ *
358
+ * @param {Mat2} out the receiving matrix
359
+ * @param {Mat2} a the matrix to scale
360
+ * @param {Number} b amount to scale the matrix's elements by
361
+ * @returns {Mat2} out
362
+ */
363
+ export function multiplyScalar(out, a, b) {
364
+ out[0] = a[0] * b;
365
+ out[1] = a[1] * b;
366
+ out[2] = a[2] * b;
367
+ out[3] = a[3] * b;
368
+ return out;
369
+ }
370
+ /**
371
+ * Adds two Mat2's after multiplying each element of the second operand by a scalar value.
372
+ *
373
+ * @param {Mat2} out the receiving vector
374
+ * @param {Mat2} a the first operand
375
+ * @param {Mat2} b the second operand
376
+ * @param {Number} scale the amount to scale b's elements by before adding
377
+ * @returns {Mat2} out
378
+ */
379
+ export function multiplyScalarAndAdd(out, a, b, scale) {
380
+ out[0] = a[0] + b[0] * scale;
381
+ out[1] = a[1] + b[1] * scale;
382
+ out[2] = a[2] + b[2] * scale;
383
+ out[3] = a[3] + b[3] * scale;
384
+ return out;
385
+ }
386
+ /**
387
+ * Alias for {@link multiply}
388
+ * @function
389
+ */
390
+ export const mul = multiply;
391
+ /**
392
+ * Alias for {@link subtract}
393
+ * @function
394
+ */
395
+ export const sub = subtract;
396
+ //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