@babylonjs/core 8.7.0 → 8.7.1

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 (125) hide show
  1. package/Animations/animatable.core.js +2 -2
  2. package/Animations/animatable.core.js.map +1 -1
  3. package/AudioV2/abstractAudio/abstractSound.d.ts +3 -35
  4. package/AudioV2/abstractAudio/abstractSound.js +2 -58
  5. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  6. package/AudioV2/abstractAudio/abstractSoundSource.d.ts +57 -0
  7. package/AudioV2/abstractAudio/abstractSoundSource.js +72 -0
  8. package/AudioV2/abstractAudio/abstractSoundSource.js.map +1 -0
  9. package/AudioV2/abstractAudio/audioEngineV2.d.ts +33 -0
  10. package/AudioV2/abstractAudio/audioEngineV2.js +23 -0
  11. package/AudioV2/abstractAudio/audioEngineV2.js.map +1 -1
  12. package/AudioV2/webAudio/index.d.ts +1 -0
  13. package/AudioV2/webAudio/index.js +1 -0
  14. package/AudioV2/webAudio/index.js.map +1 -1
  15. package/AudioV2/webAudio/webAudioEngine.d.ts +5 -0
  16. package/AudioV2/webAudio/webAudioEngine.js +18 -0
  17. package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
  18. package/AudioV2/webAudio/webAudioSoundSource.d.ts +41 -0
  19. package/AudioV2/webAudio/webAudioSoundSource.js +115 -0
  20. package/AudioV2/webAudio/webAudioSoundSource.js.map +1 -0
  21. package/AudioV2/webAudio/webAudioStaticSound.js +1 -1
  22. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  23. package/Collisions/collider.d.ts +1 -1
  24. package/Collisions/collider.js +14 -3
  25. package/Collisions/collider.js.map +1 -1
  26. package/Collisions/collisionCoordinator.d.ts +2 -2
  27. package/Collisions/collisionCoordinator.js +9 -5
  28. package/Collisions/collisionCoordinator.js.map +1 -1
  29. package/Culling/ray.core.d.ts +1 -1
  30. package/Culling/ray.core.js +1 -1
  31. package/Culling/ray.core.js.map +1 -1
  32. package/Engines/abstractEngine.d.ts +2 -2
  33. package/Engines/abstractEngine.js +3 -3
  34. package/Engines/abstractEngine.js.map +1 -1
  35. package/Engines/constants.d.ts +1 -1
  36. package/Engines/constants.js +1 -1
  37. package/Engines/constants.js.map +1 -1
  38. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.d.ts +46 -0
  39. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.js +107 -0
  40. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.js.map +1 -0
  41. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  42. package/FrameGraph/Node/Blocks/index.js +1 -0
  43. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  44. package/FrameGraph/Passes/renderPass.d.ts +1 -1
  45. package/FrameGraph/Passes/renderPass.js +3 -0
  46. package/FrameGraph/Passes/renderPass.js.map +1 -1
  47. package/FrameGraph/Tasks/PostProcesses/motionBlurTask.d.ts +27 -0
  48. package/FrameGraph/Tasks/PostProcesses/motionBlurTask.js +41 -0
  49. package/FrameGraph/Tasks/PostProcesses/motionBlurTask.js.map +1 -0
  50. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +12 -0
  51. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +30 -1
  52. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  53. package/FrameGraph/index.d.ts +2 -1
  54. package/FrameGraph/index.js +2 -1
  55. package/FrameGraph/index.js.map +1 -1
  56. package/Gizmos/cameraGizmo.js +2 -2
  57. package/Gizmos/cameraGizmo.js.map +1 -1
  58. package/Maths/ThinMaths/index.d.ts +2 -0
  59. package/Maths/ThinMaths/index.js +3 -0
  60. package/Maths/ThinMaths/index.js.map +1 -0
  61. package/Maths/ThinMaths/thinMath.matrix.d.ts +20 -0
  62. package/Maths/ThinMaths/thinMath.matrix.functions.d.ts +53 -0
  63. package/Maths/ThinMaths/thinMath.matrix.functions.js +190 -0
  64. package/Maths/ThinMaths/thinMath.matrix.functions.js.map +1 -0
  65. package/Maths/ThinMaths/thinMath.matrix.js +23 -0
  66. package/Maths/ThinMaths/thinMath.matrix.js.map +1 -0
  67. package/Maths/index.d.ts +1 -0
  68. package/Maths/index.js +2 -0
  69. package/Maths/index.js.map +1 -1
  70. package/Maths/math.vector.js +7 -89
  71. package/Maths/math.vector.js.map +1 -1
  72. package/Meshes/abstractMesh.d.ts +2 -1
  73. package/Meshes/abstractMesh.js +3 -2
  74. package/Meshes/abstractMesh.js.map +1 -1
  75. package/Misc/screenshotTools.js +2 -0
  76. package/Misc/screenshotTools.js.map +1 -1
  77. package/Particles/flowMap.d.ts +18 -3
  78. package/Particles/flowMap.js +19 -7
  79. package/Particles/flowMap.js.map +1 -1
  80. package/Particles/particleSystem.js +2 -1
  81. package/Particles/particleSystem.js.map +1 -1
  82. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +0 -3
  83. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  84. package/PostProcesses/index.d.ts +1 -0
  85. package/PostProcesses/index.js +1 -0
  86. package/PostProcesses/index.js.map +1 -1
  87. package/PostProcesses/motionBlurPostProcess.d.ts +4 -11
  88. package/PostProcesses/motionBlurPostProcess.js +40 -62
  89. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  90. package/PostProcesses/thinMotionBlurPostProcess.d.ts +67 -0
  91. package/PostProcesses/thinMotionBlurPostProcess.js +127 -0
  92. package/PostProcesses/thinMotionBlurPostProcess.js.map +1 -0
  93. package/PostProcesses/thinSSRPostProcess.js +1 -2
  94. package/PostProcesses/thinSSRPostProcess.js.map +1 -1
  95. package/Rendering/depthRenderer.js +1 -1
  96. package/Rendering/depthRenderer.js.map +1 -1
  97. package/Rendering/geometryBufferRenderer.js +1 -1
  98. package/Rendering/geometryBufferRenderer.js.map +1 -1
  99. package/Rendering/prePassRenderer.js +1 -1
  100. package/Rendering/prePassRenderer.js.map +1 -1
  101. package/Shaders/ShadersInclude/pbrBlockReflection.js +1 -1
  102. package/Shaders/ShadersInclude/pbrBlockReflection.js.map +1 -1
  103. package/Shaders/ShadersInclude/pbrDirectLightingSetupFunctions.js +4 -4
  104. package/Shaders/ShadersInclude/pbrDirectLightingSetupFunctions.js.map +1 -1
  105. package/Shaders/ShadersInclude/screenSpaceRayTrace.js +3 -2
  106. package/Shaders/ShadersInclude/screenSpaceRayTrace.js.map +1 -1
  107. package/Shaders/motionBlur.fragment.js +6 -17
  108. package/Shaders/motionBlur.fragment.js.map +1 -1
  109. package/ShadersWGSL/ShadersInclude/bonesDeclaration.js +4 -4
  110. package/ShadersWGSL/ShadersInclude/bonesDeclaration.js.map +1 -1
  111. package/ShadersWGSL/ShadersInclude/bonesVertex.js +8 -8
  112. package/ShadersWGSL/ShadersInclude/bonesVertex.js.map +1 -1
  113. package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js +1 -1
  114. package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js.map +1 -1
  115. package/ShadersWGSL/ShadersInclude/prePassVertex.js +8 -8
  116. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  117. package/ShadersWGSL/ShadersInclude/screenSpaceRayTrace.js +3 -0
  118. package/ShadersWGSL/ShadersInclude/screenSpaceRayTrace.js.map +1 -1
  119. package/ShadersWGSL/geometry.vertex.js +8 -8
  120. package/ShadersWGSL/geometry.vertex.js.map +1 -1
  121. package/ShadersWGSL/motionBlur.fragment.js +6 -17
  122. package/ShadersWGSL/motionBlur.fragment.js.map +1 -1
  123. package/assetContainer.js +3 -0
  124. package/assetContainer.js.map +1 -1
  125. package/package.json +5 -2
@@ -0,0 +1,190 @@
1
+ function SetMatrixData(result, m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15) {
2
+ const mat = result.asArray();
3
+ mat[0] = m0;
4
+ mat[1] = m1;
5
+ mat[2] = m2;
6
+ mat[3] = m3;
7
+ mat[4] = m4;
8
+ mat[5] = m5;
9
+ mat[6] = m6;
10
+ mat[7] = m7;
11
+ mat[8] = m8;
12
+ mat[9] = m9;
13
+ mat[10] = m10;
14
+ mat[11] = m11;
15
+ mat[12] = m12;
16
+ mat[13] = m13;
17
+ mat[14] = m14;
18
+ mat[15] = m15;
19
+ result.updateFlag++;
20
+ }
21
+ /**
22
+ * Sets the given matrix to the identity matrix
23
+ * @param result defines the target matrix
24
+ */
25
+ export function IdentityMatrixToRef(result) {
26
+ SetMatrixData(result, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
27
+ }
28
+ /**
29
+ * Creates a new translation matrix.
30
+ * @param x defines the x coordinate
31
+ * @param y defines the y coordinate
32
+ * @param z defines the z coordinate
33
+ * @param result defines the target matrix
34
+ */
35
+ export function TranslationMatrixToRef(x, y, z, result) {
36
+ SetMatrixData(result, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0);
37
+ }
38
+ /**
39
+ * Creates a new scaling matrix.
40
+ * @param x defines the scale factor on X axis
41
+ * @param y defines the scale factor on Y axis
42
+ * @param z defines the scale factor on Z axis
43
+ * @param result defines the target matrix
44
+ */
45
+ export function ScalingMatrixToRef(x, y, z, result) {
46
+ SetMatrixData(result, x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0);
47
+ }
48
+ /**
49
+ * Multiplies two matrices and stores the result in the target array.
50
+ * @param a defines the first matrix
51
+ * @param b defines the second matrix
52
+ * @param output defines the target array
53
+ * @param offset defines the offset in the target array where to store the result (0 by default)
54
+ */
55
+ export function MultiplyMatricesToArray(a, b, output, offset = 0) {
56
+ const m = a.asArray();
57
+ const otherM = b.asArray();
58
+ const tm0 = m[0], tm1 = m[1], tm2 = m[2], tm3 = m[3];
59
+ const tm4 = m[4], tm5 = m[5], tm6 = m[6], tm7 = m[7];
60
+ const tm8 = m[8], tm9 = m[9], tm10 = m[10], tm11 = m[11];
61
+ const tm12 = m[12], tm13 = m[13], tm14 = m[14], tm15 = m[15];
62
+ const om0 = otherM[0], om1 = otherM[1], om2 = otherM[2], om3 = otherM[3];
63
+ const om4 = otherM[4], om5 = otherM[5], om6 = otherM[6], om7 = otherM[7];
64
+ const om8 = otherM[8], om9 = otherM[9], om10 = otherM[10], om11 = otherM[11];
65
+ const om12 = otherM[12], om13 = otherM[13], om14 = otherM[14], om15 = otherM[15];
66
+ output[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;
67
+ output[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;
68
+ output[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;
69
+ output[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;
70
+ output[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;
71
+ output[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;
72
+ output[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;
73
+ output[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;
74
+ output[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;
75
+ output[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;
76
+ output[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;
77
+ output[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;
78
+ output[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;
79
+ output[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;
80
+ output[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;
81
+ output[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;
82
+ }
83
+ /**
84
+ * Multiplies two matrices and stores the result in a third matrix.
85
+ * @param a defines the first matrix
86
+ * @param b defines the second matrix
87
+ * @param result defines the target matrix
88
+ * @param offset defines the offset in the target matrix where to store the result (0 by default)
89
+ */
90
+ export function MultiplyMatricesToRef(a, b, result, offset = 0) {
91
+ MultiplyMatricesToArray(a, b, result.asArray(), offset);
92
+ result.updateFlag++;
93
+ }
94
+ /**
95
+ * Populates the given array from the starting index with the current matrix values
96
+ * @param matrix defines the source matrix
97
+ * @param array defines the target array
98
+ * @param offset defines the offset in the target array where to start storing values
99
+ */
100
+ export function CopyMatrixToArray(matrix, array, offset = 0) {
101
+ const source = matrix.asArray();
102
+ array[offset] = source[0];
103
+ array[offset + 1] = source[1];
104
+ array[offset + 2] = source[2];
105
+ array[offset + 3] = source[3];
106
+ array[offset + 4] = source[4];
107
+ array[offset + 5] = source[5];
108
+ array[offset + 6] = source[6];
109
+ array[offset + 7] = source[7];
110
+ array[offset + 8] = source[8];
111
+ array[offset + 9] = source[9];
112
+ array[offset + 10] = source[10];
113
+ array[offset + 11] = source[11];
114
+ array[offset + 12] = source[12];
115
+ array[offset + 13] = source[13];
116
+ array[offset + 14] = source[14];
117
+ array[offset + 15] = source[15];
118
+ }
119
+ /**
120
+ * Inverts the given matrix and stores the result in the target array
121
+ * @param source defines the source matrix
122
+ * @param target defines the target array
123
+ * @returns true if the matrix was inverted successfully, false otherwise
124
+ */
125
+ export function InvertMatrixToRef(source, target) {
126
+ // the inverse of a matrix is the transpose of cofactor matrix divided by the determinant
127
+ const m = source.asArray();
128
+ const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];
129
+ const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];
130
+ const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];
131
+ const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];
132
+ const det_22_33 = m22 * m33 - m32 * m23;
133
+ const det_21_33 = m21 * m33 - m31 * m23;
134
+ const det_21_32 = m21 * m32 - m31 * m22;
135
+ const det_20_33 = m20 * m33 - m30 * m23;
136
+ const det_20_32 = m20 * m32 - m22 * m30;
137
+ const det_20_31 = m20 * m31 - m30 * m21;
138
+ const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);
139
+ const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);
140
+ const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);
141
+ const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);
142
+ const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;
143
+ if (det === 0) {
144
+ // Not invertible
145
+ return false;
146
+ }
147
+ const detInv = 1 / det;
148
+ const det_12_33 = m12 * m33 - m32 * m13;
149
+ const det_11_33 = m11 * m33 - m31 * m13;
150
+ const det_11_32 = m11 * m32 - m31 * m12;
151
+ const det_10_33 = m10 * m33 - m30 * m13;
152
+ const det_10_32 = m10 * m32 - m30 * m12;
153
+ const det_10_31 = m10 * m31 - m30 * m11;
154
+ const det_12_23 = m12 * m23 - m22 * m13;
155
+ const det_11_23 = m11 * m23 - m21 * m13;
156
+ const det_11_22 = m11 * m22 - m21 * m12;
157
+ const det_10_23 = m10 * m23 - m20 * m13;
158
+ const det_10_22 = m10 * m22 - m20 * m12;
159
+ const det_10_21 = m10 * m21 - m20 * m11;
160
+ const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);
161
+ const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);
162
+ const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);
163
+ const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);
164
+ const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);
165
+ const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);
166
+ const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);
167
+ const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);
168
+ const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);
169
+ const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);
170
+ const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);
171
+ const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);
172
+ target[0] = cofact_00 * detInv;
173
+ target[1] = cofact_10 * detInv;
174
+ target[2] = cofact_20 * detInv;
175
+ target[3] = cofact_30 * detInv;
176
+ target[4] = cofact_01 * detInv;
177
+ target[5] = cofact_11 * detInv;
178
+ target[6] = cofact_21 * detInv;
179
+ target[7] = cofact_31 * detInv;
180
+ target[8] = cofact_02 * detInv;
181
+ target[9] = cofact_12 * detInv;
182
+ target[10] = cofact_22 * detInv;
183
+ target[11] = cofact_32 * detInv;
184
+ target[12] = cofact_03 * detInv;
185
+ target[13] = cofact_13 * detInv;
186
+ target[14] = cofact_23 * detInv;
187
+ target[15] = cofact_33 * detInv;
188
+ return true;
189
+ }
190
+ //# sourceMappingURL=thinMath.matrix.functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thinMath.matrix.functions.js","sourceRoot":"","sources":["../../../../../dev/core/src/Maths/ThinMaths/thinMath.matrix.functions.ts"],"names":[],"mappings":"AAIA,SAAS,aAAa,CAClB,MAAkB,EAClB,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,GAAW,EACX,GAAW,EACX,GAAW,EACX,GAAW,EACX,GAAW,EACX,GAAW;IAEX,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC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GAAG,SAAS,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAEhC,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IMatrixLike } from \"../math.like\";\r\nimport type { ThinMatrix } from \"./thinMath.matrix\";\r\n\r\nfunction SetMatrixData(\r\n result: ThinMatrix,\r\n m0: number,\r\n m1: number,\r\n m2: number,\r\n m3: number,\r\n m4: number,\r\n m5: number,\r\n m6: number,\r\n m7: number,\r\n m8: number,\r\n m9: number,\r\n m10: number,\r\n m11: number,\r\n m12: number,\r\n m13: number,\r\n m14: number,\r\n m15: number\r\n): void {\r\n const mat = result.asArray();\r\n mat[0] = m0;\r\n mat[1] = m1;\r\n mat[2] = m2;\r\n mat[3] = m3;\r\n mat[4] = m4;\r\n mat[5] = m5;\r\n mat[6] = m6;\r\n mat[7] = m7;\r\n mat[8] = m8;\r\n mat[9] = m9;\r\n mat[10] = m10;\r\n mat[11] = m11;\r\n mat[12] = m12;\r\n mat[13] = m13;\r\n mat[14] = m14;\r\n mat[15] = m15;\r\n\r\n result.updateFlag++;\r\n}\r\n\r\n/**\r\n * Sets the given matrix to the identity matrix\r\n * @param result defines the target matrix\r\n */\r\nexport function IdentityMatrixToRef(result: ThinMatrix): void {\r\n SetMatrixData(result, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);\r\n}\r\n\r\n/**\r\n * Creates a new translation matrix.\r\n * @param x defines the x coordinate\r\n * @param y defines the y coordinate\r\n * @param z defines the z coordinate\r\n * @param result defines the target matrix\r\n */\r\nexport function TranslationMatrixToRef(x: number, y: number, z: number, result: ThinMatrix): void {\r\n SetMatrixData(result, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0);\r\n}\r\n\r\n/**\r\n * Creates a new scaling matrix.\r\n * @param x defines the scale factor on X axis\r\n * @param y defines the scale factor on Y axis\r\n * @param z defines the scale factor on Z axis\r\n * @param result defines the target matrix\r\n */\r\nexport function ScalingMatrixToRef(x: number, y: number, z: number, result: ThinMatrix): void {\r\n SetMatrixData(result, x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0);\r\n}\r\n\r\n/**\r\n * Multiplies two matrices and stores the result in the target array.\r\n * @param a defines the first matrix\r\n * @param b defines the second matrix\r\n * @param output defines the target array\r\n * @param offset defines the offset in the target array where to store the result (0 by default)\r\n */\r\nexport function MultiplyMatricesToArray(a: IMatrixLike, b: IMatrixLike, output: Float32Array | Array<number>, offset = 0): void {\r\n const m = a.asArray();\r\n const otherM = b.asArray();\r\n const tm0 = m[0],\r\n tm1 = m[1],\r\n tm2 = m[2],\r\n tm3 = m[3];\r\n const tm4 = m[4],\r\n tm5 = m[5],\r\n tm6 = m[6],\r\n tm7 = m[7];\r\n const tm8 = m[8],\r\n tm9 = m[9],\r\n tm10 = m[10],\r\n tm11 = m[11];\r\n const tm12 = m[12],\r\n tm13 = m[13],\r\n tm14 = m[14],\r\n tm15 = m[15];\r\n\r\n const om0 = otherM[0],\r\n om1 = otherM[1],\r\n om2 = otherM[2],\r\n om3 = otherM[3];\r\n const om4 = otherM[4],\r\n om5 = otherM[5],\r\n om6 = otherM[6],\r\n om7 = otherM[7];\r\n const om8 = otherM[8],\r\n om9 = otherM[9],\r\n om10 = otherM[10],\r\n om11 = otherM[11];\r\n const om12 = otherM[12],\r\n om13 = otherM[13],\r\n om14 = otherM[14],\r\n om15 = otherM[15];\r\n output[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;\r\n output[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;\r\n output[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;\r\n output[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;\r\n\r\n output[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;\r\n output[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;\r\n output[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;\r\n output[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;\r\n\r\n output[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;\r\n output[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;\r\n output[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;\r\n output[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;\r\n\r\n output[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;\r\n output[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;\r\n output[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;\r\n output[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;\r\n}\r\n\r\n/**\r\n * Multiplies two matrices and stores the result in a third matrix.\r\n * @param a defines the first matrix\r\n * @param b defines the second matrix\r\n * @param result defines the target matrix\r\n * @param offset defines the offset in the target matrix where to store the result (0 by default)\r\n */\r\nexport function MultiplyMatricesToRef(a: IMatrixLike, b: IMatrixLike, result: ThinMatrix, offset = 0): void {\r\n MultiplyMatricesToArray(a, b, result.asArray(), offset);\r\n result.updateFlag++;\r\n}\r\n\r\n/**\r\n * Populates the given array from the starting index with the current matrix values\r\n * @param matrix defines the source matrix\r\n * @param array defines the target array\r\n * @param offset defines the offset in the target array where to start storing values\r\n */\r\nexport function CopyMatrixToArray(matrix: IMatrixLike, array: Float32Array | Array<number>, offset: number = 0) {\r\n const source = matrix.asArray();\r\n array[offset] = source[0];\r\n array[offset + 1] = source[1];\r\n array[offset + 2] = source[2];\r\n array[offset + 3] = source[3];\r\n array[offset + 4] = source[4];\r\n array[offset + 5] = source[5];\r\n array[offset + 6] = source[6];\r\n array[offset + 7] = source[7];\r\n array[offset + 8] = source[8];\r\n array[offset + 9] = source[9];\r\n array[offset + 10] = source[10];\r\n array[offset + 11] = source[11];\r\n array[offset + 12] = source[12];\r\n array[offset + 13] = source[13];\r\n array[offset + 14] = source[14];\r\n array[offset + 15] = source[15];\r\n}\r\n\r\n/**\r\n * Inverts the given matrix and stores the result in the target array\r\n * @param source defines the source matrix\r\n * @param target defines the target array\r\n * @returns true if the matrix was inverted successfully, false otherwise\r\n */\r\nexport function InvertMatrixToRef(source: IMatrixLike, target: Float32Array | Array<number>) {\r\n // the inverse of a matrix is the transpose of cofactor matrix divided by the determinant\r\n const m = source.asArray();\r\n const m00 = m[0],\r\n m01 = m[1],\r\n m02 = m[2],\r\n m03 = m[3];\r\n const m10 = m[4],\r\n m11 = m[5],\r\n m12 = m[6],\r\n m13 = m[7];\r\n const m20 = m[8],\r\n m21 = m[9],\r\n m22 = m[10],\r\n m23 = m[11];\r\n const m30 = m[12],\r\n m31 = m[13],\r\n m32 = m[14],\r\n m33 = m[15];\r\n\r\n const det_22_33 = m22 * m33 - m32 * m23;\r\n const det_21_33 = m21 * m33 - m31 * m23;\r\n const det_21_32 = m21 * m32 - m31 * m22;\r\n const det_20_33 = m20 * m33 - m30 * m23;\r\n const det_20_32 = m20 * m32 - m22 * m30;\r\n const det_20_31 = m20 * m31 - m30 * m21;\r\n\r\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\r\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\r\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\r\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\r\n\r\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\r\n\r\n if (det === 0) {\r\n // Not invertible\r\n return false;\r\n }\r\n\r\n const detInv = 1 / det;\r\n const det_12_33 = m12 * m33 - m32 * m13;\r\n const det_11_33 = m11 * m33 - m31 * m13;\r\n const det_11_32 = m11 * m32 - m31 * m12;\r\n const det_10_33 = m10 * m33 - m30 * m13;\r\n const det_10_32 = m10 * m32 - m30 * m12;\r\n const det_10_31 = m10 * m31 - m30 * m11;\r\n const det_12_23 = m12 * m23 - m22 * m13;\r\n const det_11_23 = m11 * m23 - m21 * m13;\r\n const det_11_22 = m11 * m22 - m21 * m12;\r\n const det_10_23 = m10 * m23 - m20 * m13;\r\n const det_10_22 = m10 * m22 - m20 * m12;\r\n const det_10_21 = m10 * m21 - m20 * m11;\r\n\r\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\r\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\r\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\r\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\r\n\r\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\r\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\r\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\r\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\r\n\r\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\r\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\r\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\r\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\r\n\r\n target[0] = cofact_00 * detInv;\r\n target[1] = cofact_10 * detInv;\r\n target[2] = cofact_20 * detInv;\r\n target[3] = cofact_30 * detInv;\r\n target[4] = cofact_01 * detInv;\r\n target[5] = cofact_11 * detInv;\r\n target[6] = cofact_21 * detInv;\r\n target[7] = cofact_31 * detInv;\r\n target[8] = cofact_02 * detInv;\r\n target[9] = cofact_12 * detInv;\r\n target[10] = cofact_22 * detInv;\r\n target[11] = cofact_32 * detInv;\r\n target[12] = cofact_03 * detInv;\r\n target[13] = cofact_13 * detInv;\r\n target[14] = cofact_23 * detInv;\r\n target[15] = cofact_33 * detInv;\r\n\r\n return true;\r\n}\r\n"]}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A thin matrix class that is used for size reasons.
3
+ * The class is identity by default
4
+ */
5
+ export class ThinMatrix {
6
+ constructor() {
7
+ this._m = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0];
8
+ /**
9
+ * Gets the update flag of the matrix which is an unique number for the matrix.
10
+ * It will be incremented every time the matrix data change.
11
+ * You can use it to speed the comparison between two versions of the same matrix.
12
+ */
13
+ this.updateFlag = 0;
14
+ }
15
+ /**
16
+ * Returns the matrix as a Array<number>
17
+ * @returns the matrix underlying array.
18
+ */
19
+ asArray() {
20
+ return this._m;
21
+ }
22
+ }
23
+ //# sourceMappingURL=thinMath.matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thinMath.matrix.js","sourceRoot":"","sources":["../../../../../dev/core/src/Maths/ThinMaths/thinMath.matrix.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,UAAU;IAAvB;QACqB,OAAE,GAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAU1H;;;;WAIG;QACI,eAAU,GAAW,CAAC,CAAC;IAClC,CAAC;IAdG;;;OAGG;IACI,OAAO;QACV,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;CAQJ","sourcesContent":["import type { Tuple } from \"core/types\";\r\nimport type { IMatrixLike } from \"../math.like\";\r\n\r\n/**\r\n * A thin matrix class that is used for size reasons.\r\n * The class is identity by default\r\n */\r\nexport class ThinMatrix implements IMatrixLike {\r\n private readonly _m: Tuple<number, 16> = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0];\r\n\r\n /**\r\n * Returns the matrix as a Array<number>\r\n * @returns the matrix underlying array.\r\n */\r\n public asArray(): Tuple<number, 16> {\r\n return this._m;\r\n }\r\n\r\n /**\r\n * Gets the update flag of the matrix which is an unique number for the matrix.\r\n * It will be incremented every time the matrix data change.\r\n * You can use it to speed the comparison between two versions of the same matrix.\r\n */\r\n public updateFlag: number = 0;\r\n}\r\n"]}
package/Maths/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from "./math.js";
6
6
  export * from "./sphericalPolynomial.js";
7
7
  export * from "./halton2DSequence.js";
8
8
  export * from "./math.vector.functions.js";
9
+ export * from "./ThinMaths/index.js";
package/Maths/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-internal-modules */
1
2
  export * from "./math.scalar.js";
2
3
  export * from "./math.functions.js";
3
4
  export * from "./math.polar.js";
@@ -6,4 +7,5 @@ export * from "./math.js";
6
7
  export * from "./sphericalPolynomial.js";
7
8
  export * from "./halton2DSequence.js";
8
9
  export * from "./math.vector.functions.js";
10
+ export * from "./ThinMaths/index.js";
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from \"./math.scalar\";\r\nexport * from \"./math.functions\";\r\nexport * from \"./math.polar\";\r\nexport * from \"./math.like\";\r\nexport * from \"./math\";\r\nexport * from \"./sphericalPolynomial\";\r\nexport * from \"./halton2DSequence\";\r\nexport * from \"./math.vector.functions\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./math.scalar\";\r\nexport * from \"./math.functions\";\r\nexport * from \"./math.polar\";\r\nexport * from \"./math.like\";\r\nexport * from \"./math\";\r\nexport * from \"./sphericalPolynomial\";\r\nexport * from \"./halton2DSequence\";\r\nexport * from \"./math.vector.functions\";\r\nexport * from \"./ThinMaths/index\";\r\n"]}
@@ -5,6 +5,7 @@ import { RegisterClass } from "../Misc/typeStore.js";
5
5
  import { PerformanceConfigurator } from "../Engines/performanceConfigurator.js";
6
6
  import { EngineStore } from "../Engines/engineStore.js";
7
7
  import { Clamp, Lerp, NormalizeRadians, RandomRange, WithinEpsilon } from "./math.scalar.functions.js";
8
+ import { CopyMatrixToArray, InvertMatrixToRef, MultiplyMatricesToArray } from "./ThinMaths/thinMath.matrix.functions.js";
8
9
  // eslint-disable-next-line @typescript-eslint/naming-convention
9
10
  const ExtractAsInt = (value) => {
10
11
  return parseInt(value.toString().replace(/\W/g, ""));
@@ -5577,54 +5578,12 @@ export class Matrix {
5577
5578
  Matrix.IdentityToRef(other);
5578
5579
  return other;
5579
5580
  }
5580
- // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant
5581
- const m = this._m;
5582
- const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];
5583
- const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];
5584
- const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];
5585
- const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];
5586
- const det_22_33 = m22 * m33 - m32 * m23;
5587
- const det_21_33 = m21 * m33 - m31 * m23;
5588
- const det_21_32 = m21 * m32 - m31 * m22;
5589
- const det_20_33 = m20 * m33 - m30 * m23;
5590
- const det_20_32 = m20 * m32 - m22 * m30;
5591
- const det_20_31 = m20 * m31 - m30 * m21;
5592
- const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);
5593
- const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);
5594
- const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);
5595
- const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);
5596
- const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;
5597
- if (det === 0) {
5598
- // not invertible
5581
+ if (InvertMatrixToRef(this, other.asArray())) {
5582
+ other.markAsUpdated();
5583
+ }
5584
+ else {
5599
5585
  other.copyFrom(this);
5600
- return other;
5601
5586
  }
5602
- const detInv = 1 / det;
5603
- const det_12_33 = m12 * m33 - m32 * m13;
5604
- const det_11_33 = m11 * m33 - m31 * m13;
5605
- const det_11_32 = m11 * m32 - m31 * m12;
5606
- const det_10_33 = m10 * m33 - m30 * m13;
5607
- const det_10_32 = m10 * m32 - m30 * m12;
5608
- const det_10_31 = m10 * m31 - m30 * m11;
5609
- const det_12_23 = m12 * m23 - m22 * m13;
5610
- const det_11_23 = m11 * m23 - m21 * m13;
5611
- const det_11_22 = m11 * m22 - m21 * m12;
5612
- const det_10_23 = m10 * m23 - m20 * m13;
5613
- const det_10_22 = m10 * m22 - m20 * m12;
5614
- const det_10_21 = m10 * m21 - m20 * m11;
5615
- const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);
5616
- const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);
5617
- const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);
5618
- const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);
5619
- const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);
5620
- const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);
5621
- const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);
5622
- const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);
5623
- const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);
5624
- const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);
5625
- const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);
5626
- const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);
5627
- Matrix.FromValuesToRef(cofact_00 * detInv, cofact_10 * detInv, cofact_20 * detInv, cofact_30 * detInv, cofact_01 * detInv, cofact_11 * detInv, cofact_21 * detInv, cofact_31 * detInv, cofact_02 * detInv, cofact_12 * detInv, cofact_22 * detInv, cofact_32 * detInv, cofact_03 * detInv, cofact_13 * detInv, cofact_23 * detInv, cofact_33 * detInv, other);
5628
5587
  return other;
5629
5588
  }
5630
5589
  /**
@@ -5740,23 +5699,7 @@ export class Matrix {
5740
5699
  * @returns the current matrix
5741
5700
  */
5742
5701
  copyToArray(array, offset = 0) {
5743
- const source = this._m;
5744
- array[offset] = source[0];
5745
- array[offset + 1] = source[1];
5746
- array[offset + 2] = source[2];
5747
- array[offset + 3] = source[3];
5748
- array[offset + 4] = source[4];
5749
- array[offset + 5] = source[5];
5750
- array[offset + 6] = source[6];
5751
- array[offset + 7] = source[7];
5752
- array[offset + 8] = source[8];
5753
- array[offset + 9] = source[9];
5754
- array[offset + 10] = source[10];
5755
- array[offset + 11] = source[11];
5756
- array[offset + 12] = source[12];
5757
- array[offset + 13] = source[13];
5758
- array[offset + 14] = source[14];
5759
- array[offset + 15] = source[15];
5702
+ CopyMatrixToArray(this, array, offset);
5760
5703
  return this;
5761
5704
  }
5762
5705
  /**
@@ -5841,32 +5784,7 @@ export class Matrix {
5841
5784
  * @returns the current matrix
5842
5785
  */
5843
5786
  multiplyToArray(other, result, offset) {
5844
- const m = this._m;
5845
- const otherM = other.m;
5846
- const tm0 = m[0], tm1 = m[1], tm2 = m[2], tm3 = m[3];
5847
- const tm4 = m[4], tm5 = m[5], tm6 = m[6], tm7 = m[7];
5848
- const tm8 = m[8], tm9 = m[9], tm10 = m[10], tm11 = m[11];
5849
- const tm12 = m[12], tm13 = m[13], tm14 = m[14], tm15 = m[15];
5850
- const om0 = otherM[0], om1 = otherM[1], om2 = otherM[2], om3 = otherM[3];
5851
- const om4 = otherM[4], om5 = otherM[5], om6 = otherM[6], om7 = otherM[7];
5852
- const om8 = otherM[8], om9 = otherM[9], om10 = otherM[10], om11 = otherM[11];
5853
- const om12 = otherM[12], om13 = otherM[13], om14 = otherM[14], om15 = otherM[15];
5854
- result[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;
5855
- result[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;
5856
- result[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;
5857
- result[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;
5858
- result[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;
5859
- result[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;
5860
- result[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;
5861
- result[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;
5862
- result[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;
5863
- result[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;
5864
- result[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;
5865
- result[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;
5866
- result[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;
5867
- result[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;
5868
- result[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;
5869
- result[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;
5787
+ MultiplyMatricesToArray(this, other, result, offset);
5870
5788
  return this;
5871
5789
  }
5872
5790
  divide(other) {