rhodonite 0.19.9 → 0.20.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 (199) hide show
  1. package/README.md +32 -2
  2. package/VERSION-FILE +1 -1
  3. package/dist/esm/effekseer/main.d.ts +3 -1
  4. package/dist/esm/foundation/components/Animation/AnimationComponent.d.ts +15 -1
  5. package/dist/esm/foundation/components/Animation/AnimationStateRepository.d.ts +26 -10
  6. package/dist/esm/foundation/components/AnimationState/AnimationStateComponent.d.ts +14 -0
  7. package/dist/esm/foundation/components/CharacterController/CharacterAnimationController.d.ts +63 -0
  8. package/dist/esm/foundation/components/CharacterController/CharacterControllerComponent.d.ts +67 -0
  9. package/dist/esm/foundation/components/CharacterController/ICharacterControllerEntity.d.ts +4 -0
  10. package/dist/esm/foundation/components/CharacterController/createCharacterControllerEntity.d.ts +4 -0
  11. package/dist/esm/foundation/components/CharacterController/index.d.ts +4 -0
  12. package/dist/esm/foundation/components/ComponentTypes.d.ts +6 -0
  13. package/dist/esm/foundation/components/Physics/PhysicsComponent.d.ts +27 -0
  14. package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.d.ts +30 -0
  15. package/dist/esm/foundation/components/Shape/IShapeEntity.d.ts +4 -0
  16. package/dist/esm/foundation/components/Shape/ShapeComponent.d.ts +43 -0
  17. package/dist/esm/foundation/components/Shape/createShapeEntity.d.ts +3 -0
  18. package/dist/esm/foundation/components/Shape/index.d.ts +3 -0
  19. package/dist/esm/foundation/components/Skeletal/SkeletalComponent.d.ts +138 -45
  20. package/dist/esm/foundation/components/Transform/TransformComponent.d.ts +2 -3
  21. package/dist/esm/foundation/components/Trigger/ITriggerEntity.d.ts +4 -0
  22. package/dist/esm/foundation/components/Trigger/TriggerComponent.d.ts +58 -0
  23. package/dist/esm/foundation/components/Trigger/index.d.ts +2 -0
  24. package/dist/esm/foundation/components/Vrm/VrmComponent.d.ts +16 -1
  25. package/dist/esm/foundation/components/WellKnownComponentTIDs.d.ts +4 -1
  26. package/dist/esm/foundation/components/index.d.ts +3 -0
  27. package/dist/esm/foundation/core/Component.d.ts +63 -3
  28. package/dist/esm/foundation/core/ComponentMemoryRegistry.d.ts +59 -1
  29. package/dist/esm/foundation/core/Config.d.ts +8 -7
  30. package/dist/esm/foundation/core/Entity.d.ts +15 -0
  31. package/dist/esm/foundation/definitions/BoneDataType.d.ts +12 -1
  32. package/dist/esm/foundation/definitions/PhysicsShapeType.d.ts +1 -0
  33. package/dist/esm/foundation/definitions/ProcessApproach.d.ts +8 -4
  34. package/dist/esm/foundation/exporter/Gltf2ExporterOps.d.ts +2 -0
  35. package/dist/esm/foundation/geometry/Shape.d.ts +35 -0
  36. package/dist/esm/foundation/geometry/index.d.ts +1 -0
  37. package/dist/esm/foundation/geometry/shapes/Cylinder.d.ts +16 -0
  38. package/dist/esm/foundation/geometry/shapes/index.d.ts +1 -0
  39. package/dist/esm/foundation/gizmos/ShapeGizmo.d.ts +22 -0
  40. package/dist/esm/foundation/gizmos/index.d.ts +1 -0
  41. package/dist/esm/foundation/helpers/EntityHelper.d.ts +6 -0
  42. package/dist/esm/foundation/helpers/MeshHelper.d.ts +275 -15
  43. package/dist/esm/foundation/importer/AnimationAssigner.d.ts +62 -3
  44. package/dist/esm/foundation/importer/BoneDataTypeDetector.d.ts +31 -0
  45. package/dist/esm/foundation/importer/Gltf2Importer.d.ts +6 -0
  46. package/dist/esm/foundation/importer/KhrPhysicsImporter.d.ts +58 -0
  47. package/dist/esm/foundation/importer/VrmaImporter.d.ts +11 -3
  48. package/dist/esm/foundation/importer/index.d.ts +2 -0
  49. package/dist/esm/foundation/math/AbstractMatrix.d.ts +3 -2
  50. package/dist/esm/foundation/math/AbstractQuaternion.d.ts +2 -1
  51. package/dist/esm/foundation/math/AnimatedQuaternion.d.ts +4 -0
  52. package/dist/esm/foundation/math/AnimatedScalar.d.ts +4 -0
  53. package/dist/esm/foundation/math/AnimatedVector2.d.ts +4 -0
  54. package/dist/esm/foundation/math/AnimatedVector3.d.ts +4 -0
  55. package/dist/esm/foundation/math/AnimatedVector4.d.ts +4 -0
  56. package/dist/esm/foundation/math/AnimatedVectorN.d.ts +4 -0
  57. package/dist/esm/foundation/math/IAnimatedValue.d.ts +12 -0
  58. package/dist/esm/foundation/math/IMatrix.d.ts +2 -2
  59. package/dist/esm/foundation/math/IQuaternion.d.ts +4 -4
  60. package/dist/esm/foundation/math/LogQuaternion.d.ts +110 -38
  61. package/dist/esm/foundation/math/MathUtil.d.ts +63 -1
  62. package/dist/esm/foundation/math/Matrix22.d.ts +176 -30
  63. package/dist/esm/foundation/math/Matrix33.d.ts +206 -38
  64. package/dist/esm/foundation/math/Matrix44.d.ts +222 -39
  65. package/dist/esm/foundation/math/MutableMatrix22.d.ts +125 -130
  66. package/dist/esm/foundation/math/MutableMatrix33.d.ts +148 -162
  67. package/dist/esm/foundation/math/MutableMatrix44.d.ts +159 -183
  68. package/dist/esm/foundation/math/MutableQuaternion.d.ts +241 -132
  69. package/dist/esm/foundation/math/MutableScalar.d.ts +11 -12
  70. package/dist/esm/foundation/math/MutableVector2.d.ts +30 -31
  71. package/dist/esm/foundation/math/MutableVector3.d.ts +28 -26
  72. package/dist/esm/foundation/math/MutableVector4.d.ts +37 -37
  73. package/dist/esm/foundation/math/Quaternion.d.ts +529 -36
  74. package/dist/esm/foundation/math/Scalar.d.ts +13 -14
  75. package/dist/esm/foundation/math/Vector2.d.ts +38 -38
  76. package/dist/esm/foundation/math/Vector3.d.ts +55 -54
  77. package/dist/esm/foundation/math/Vector4.d.ts +54 -55
  78. package/dist/esm/foundation/misc/MiscUtil.d.ts +79 -16
  79. package/dist/esm/foundation/misc/Time.d.ts +10 -1
  80. package/dist/esm/foundation/physics/CharacterControllerStrategy.d.ts +65 -0
  81. package/dist/esm/foundation/physics/Oimo/OimoPhysicsStrategy.d.ts +17 -1
  82. package/dist/esm/foundation/physics/PhysicsProperty.d.ts +43 -0
  83. package/dist/esm/foundation/physics/PhysicsStrategy.d.ts +15 -0
  84. package/dist/esm/foundation/physics/PhysicsWorldQuery.d.ts +65 -0
  85. package/dist/esm/foundation/physics/Rapier/RapierCharacterControllerStrategy.d.ts +58 -0
  86. package/dist/esm/foundation/physics/Rapier/RapierPhysicsStrategy.d.ts +157 -19
  87. package/dist/esm/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.d.ts +11 -0
  88. package/dist/esm/foundation/physics/Rapier/index.d.ts +2 -0
  89. package/dist/esm/foundation/physics/ShapeTransformResolver.d.ts +19 -0
  90. package/dist/esm/foundation/physics/index.d.ts +2 -0
  91. package/dist/esm/index.js +728 -723
  92. package/dist/esm/types/AnimationTypes.d.ts +1 -1
  93. package/dist/esm/types/KHR_implicit_shapes.d.ts +47 -0
  94. package/dist/esm/types/KHR_physics_rigid_bodies.d.ts +54 -0
  95. package/dist/esm/types/VRMC.d.ts +12 -12
  96. package/dist/esm/types/VRMC_vrm_animation.d.ts +5 -0
  97. package/dist/esm/types/glTF2.d.ts +8 -0
  98. package/dist/esm/types/index.d.ts +2 -0
  99. package/dist/esm/webgl/main.d.ts +2 -1
  100. package/dist/esm/webgl/textureLoader/KTX2TextureLoader.d.ts +12 -0
  101. package/dist/esmdev/effekseer/main.d.ts +3 -1
  102. package/dist/esmdev/foundation/components/Animation/AnimationComponent.d.ts +15 -1
  103. package/dist/esmdev/foundation/components/Animation/AnimationStateRepository.d.ts +26 -10
  104. package/dist/esmdev/foundation/components/AnimationState/AnimationStateComponent.d.ts +14 -0
  105. package/dist/esmdev/foundation/components/CharacterController/CharacterAnimationController.d.ts +63 -0
  106. package/dist/esmdev/foundation/components/CharacterController/CharacterControllerComponent.d.ts +67 -0
  107. package/dist/esmdev/foundation/components/CharacterController/ICharacterControllerEntity.d.ts +4 -0
  108. package/dist/esmdev/foundation/components/CharacterController/createCharacterControllerEntity.d.ts +4 -0
  109. package/dist/esmdev/foundation/components/CharacterController/index.d.ts +4 -0
  110. package/dist/esmdev/foundation/components/ComponentTypes.d.ts +6 -0
  111. package/dist/esmdev/foundation/components/Physics/PhysicsComponent.d.ts +27 -0
  112. package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.d.ts +30 -0
  113. package/dist/esmdev/foundation/components/Shape/IShapeEntity.d.ts +4 -0
  114. package/dist/esmdev/foundation/components/Shape/ShapeComponent.d.ts +43 -0
  115. package/dist/esmdev/foundation/components/Shape/createShapeEntity.d.ts +3 -0
  116. package/dist/esmdev/foundation/components/Shape/index.d.ts +3 -0
  117. package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.d.ts +138 -45
  118. package/dist/esmdev/foundation/components/Transform/TransformComponent.d.ts +2 -3
  119. package/dist/esmdev/foundation/components/Trigger/ITriggerEntity.d.ts +4 -0
  120. package/dist/esmdev/foundation/components/Trigger/TriggerComponent.d.ts +58 -0
  121. package/dist/esmdev/foundation/components/Trigger/index.d.ts +2 -0
  122. package/dist/esmdev/foundation/components/Vrm/VrmComponent.d.ts +16 -1
  123. package/dist/esmdev/foundation/components/WellKnownComponentTIDs.d.ts +4 -1
  124. package/dist/esmdev/foundation/components/index.d.ts +3 -0
  125. package/dist/esmdev/foundation/core/Component.d.ts +63 -3
  126. package/dist/esmdev/foundation/core/ComponentMemoryRegistry.d.ts +59 -1
  127. package/dist/esmdev/foundation/core/Config.d.ts +8 -7
  128. package/dist/esmdev/foundation/core/Entity.d.ts +15 -0
  129. package/dist/esmdev/foundation/definitions/BoneDataType.d.ts +12 -1
  130. package/dist/esmdev/foundation/definitions/PhysicsShapeType.d.ts +1 -0
  131. package/dist/esmdev/foundation/definitions/ProcessApproach.d.ts +8 -4
  132. package/dist/esmdev/foundation/exporter/Gltf2ExporterOps.d.ts +2 -0
  133. package/dist/esmdev/foundation/geometry/Shape.d.ts +35 -0
  134. package/dist/esmdev/foundation/geometry/index.d.ts +1 -0
  135. package/dist/esmdev/foundation/geometry/shapes/Cylinder.d.ts +16 -0
  136. package/dist/esmdev/foundation/geometry/shapes/index.d.ts +1 -0
  137. package/dist/esmdev/foundation/gizmos/ShapeGizmo.d.ts +22 -0
  138. package/dist/esmdev/foundation/gizmos/index.d.ts +1 -0
  139. package/dist/esmdev/foundation/helpers/EntityHelper.d.ts +6 -0
  140. package/dist/esmdev/foundation/helpers/MeshHelper.d.ts +275 -15
  141. package/dist/esmdev/foundation/importer/AnimationAssigner.d.ts +62 -3
  142. package/dist/esmdev/foundation/importer/BoneDataTypeDetector.d.ts +31 -0
  143. package/dist/esmdev/foundation/importer/Gltf2Importer.d.ts +6 -0
  144. package/dist/esmdev/foundation/importer/KhrPhysicsImporter.d.ts +58 -0
  145. package/dist/esmdev/foundation/importer/VrmaImporter.d.ts +11 -3
  146. package/dist/esmdev/foundation/importer/index.d.ts +2 -0
  147. package/dist/esmdev/foundation/math/AbstractMatrix.d.ts +3 -2
  148. package/dist/esmdev/foundation/math/AbstractQuaternion.d.ts +2 -1
  149. package/dist/esmdev/foundation/math/AnimatedQuaternion.d.ts +4 -0
  150. package/dist/esmdev/foundation/math/AnimatedScalar.d.ts +4 -0
  151. package/dist/esmdev/foundation/math/AnimatedVector2.d.ts +4 -0
  152. package/dist/esmdev/foundation/math/AnimatedVector3.d.ts +4 -0
  153. package/dist/esmdev/foundation/math/AnimatedVector4.d.ts +4 -0
  154. package/dist/esmdev/foundation/math/AnimatedVectorN.d.ts +4 -0
  155. package/dist/esmdev/foundation/math/IAnimatedValue.d.ts +12 -0
  156. package/dist/esmdev/foundation/math/IMatrix.d.ts +2 -2
  157. package/dist/esmdev/foundation/math/IQuaternion.d.ts +4 -4
  158. package/dist/esmdev/foundation/math/LogQuaternion.d.ts +110 -38
  159. package/dist/esmdev/foundation/math/MathUtil.d.ts +63 -1
  160. package/dist/esmdev/foundation/math/Matrix22.d.ts +176 -30
  161. package/dist/esmdev/foundation/math/Matrix33.d.ts +206 -38
  162. package/dist/esmdev/foundation/math/Matrix44.d.ts +222 -39
  163. package/dist/esmdev/foundation/math/MutableMatrix22.d.ts +125 -130
  164. package/dist/esmdev/foundation/math/MutableMatrix33.d.ts +148 -162
  165. package/dist/esmdev/foundation/math/MutableMatrix44.d.ts +159 -183
  166. package/dist/esmdev/foundation/math/MutableQuaternion.d.ts +241 -132
  167. package/dist/esmdev/foundation/math/MutableScalar.d.ts +11 -12
  168. package/dist/esmdev/foundation/math/MutableVector2.d.ts +30 -31
  169. package/dist/esmdev/foundation/math/MutableVector3.d.ts +28 -26
  170. package/dist/esmdev/foundation/math/MutableVector4.d.ts +37 -37
  171. package/dist/esmdev/foundation/math/Quaternion.d.ts +529 -36
  172. package/dist/esmdev/foundation/math/Scalar.d.ts +13 -14
  173. package/dist/esmdev/foundation/math/Vector2.d.ts +38 -38
  174. package/dist/esmdev/foundation/math/Vector3.d.ts +55 -54
  175. package/dist/esmdev/foundation/math/Vector4.d.ts +54 -55
  176. package/dist/esmdev/foundation/misc/MiscUtil.d.ts +79 -16
  177. package/dist/esmdev/foundation/misc/Time.d.ts +10 -1
  178. package/dist/esmdev/foundation/physics/CharacterControllerStrategy.d.ts +65 -0
  179. package/dist/esmdev/foundation/physics/Oimo/OimoPhysicsStrategy.d.ts +17 -1
  180. package/dist/esmdev/foundation/physics/PhysicsProperty.d.ts +43 -0
  181. package/dist/esmdev/foundation/physics/PhysicsStrategy.d.ts +15 -0
  182. package/dist/esmdev/foundation/physics/PhysicsWorldQuery.d.ts +65 -0
  183. package/dist/esmdev/foundation/physics/Rapier/RapierCharacterControllerStrategy.d.ts +58 -0
  184. package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.d.ts +157 -19
  185. package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.d.ts +11 -0
  186. package/dist/esmdev/foundation/physics/Rapier/index.d.ts +2 -0
  187. package/dist/esmdev/foundation/physics/ShapeTransformResolver.d.ts +19 -0
  188. package/dist/esmdev/foundation/physics/index.d.ts +2 -0
  189. package/dist/esmdev/index.js +35168 -27712
  190. package/dist/esmdev/types/AnimationTypes.d.ts +1 -1
  191. package/dist/esmdev/types/KHR_implicit_shapes.d.ts +47 -0
  192. package/dist/esmdev/types/KHR_physics_rigid_bodies.d.ts +54 -0
  193. package/dist/esmdev/types/VRMC.d.ts +12 -12
  194. package/dist/esmdev/types/VRMC_vrm_animation.d.ts +5 -0
  195. package/dist/esmdev/types/glTF2.d.ts +8 -0
  196. package/dist/esmdev/types/index.d.ts +2 -0
  197. package/dist/esmdev/webgl/main.d.ts +2 -1
  198. package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.d.ts +12 -0
  199. package/package.json +25 -23
@@ -1,7 +1,7 @@
1
- import type { Array4, Index } from '../../types/CommonTypes';
1
+ import type { Array4, FloatTypedArrayConstructor, Index, TypedArray } from '../../types/CommonTypes';
2
2
  import type { IMatrix22, IMatrix33, IMatrix44, IMutableMatrix, IMutableMatrix22 } from './IMatrix';
3
3
  import type { IVector2 } from './IVector';
4
- import { Matrix22 } from './Matrix22';
4
+ import { Matrix22_ } from './Matrix22';
5
5
  /**
6
6
  * A mutable 2x2 matrix class that extends Matrix22 and provides modification capabilities.
7
7
  * This class allows in-place operations for matrix transformations, making it suitable
@@ -21,7 +21,15 @@ import { Matrix22 } from './Matrix22';
21
21
  * matrix.scale(Vector2.fromCopyArray([2, 3])); // Scale by 2x and 3y
22
22
  * ```
23
23
  */
24
- export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix, IMutableMatrix22 {
24
+ export declare class MutableMatrix22_<T extends FloatTypedArrayConstructor> extends Matrix22_<T> implements IMutableMatrix, IMutableMatrix22 {
25
+ /**
26
+ * Creates a new MutableMatrix22_ instance.
27
+ * @param m - The typed array containing the matrix components
28
+ * @param options - Configuration object containing the typed array constructor
29
+ */
30
+ constructor(m: TypedArray, options: {
31
+ type: T;
32
+ });
25
33
  /**
26
34
  * Sets the value at position (0,0) of the matrix.
27
35
  *
@@ -76,61 +84,6 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
76
84
  * @returns The class name "MutableMatrix22"
77
85
  */
78
86
  get className(): string;
79
- /**
80
- * Creates a new zero matrix where all elements are 0.
81
- *
82
- * @returns A new MutableMatrix22 instance with all zero values
83
- */
84
- static zero(): MutableMatrix22;
85
- /**
86
- * Creates a new 2x2 identity matrix.
87
- *
88
- * @returns A new MutableMatrix22 identity matrix
89
- */
90
- static identity(): MutableMatrix22;
91
- /**
92
- * Creates a dummy matrix for placeholder purposes.
93
- *
94
- * @returns A new MutableMatrix22 dummy instance
95
- */
96
- static dummy(): MutableMatrix22;
97
- /**
98
- * Creates a new matrix that is the transpose of the input matrix.
99
- *
100
- * @param mat - The matrix to transpose
101
- * @returns A new MutableMatrix22 containing the transposed matrix
102
- */
103
- static transpose(mat: IMatrix22): MutableMatrix22;
104
- /**
105
- * Creates a new matrix that is the inverse of the input matrix.
106
- *
107
- * @param mat - The matrix to invert
108
- * @returns A new MutableMatrix22 containing the inverted matrix
109
- * @throws Error if the matrix is not invertible (determinant is 0)
110
- */
111
- static invert(mat: IMatrix22): MutableMatrix22;
112
- /**
113
- * Creates a new rotation matrix for the given angle.
114
- *
115
- * @param radian - The rotation angle in radians
116
- * @returns A new MutableMatrix22 representing the rotation transformation
117
- */
118
- static rotate(radian: number): MutableMatrix22;
119
- /**
120
- * Creates a new scale matrix from a 2D vector.
121
- *
122
- * @param vec - Vector2 containing the scale factors for x and y axes
123
- * @returns A new MutableMatrix22 representing the scale transformation
124
- */
125
- static scale(vec: IVector2): MutableMatrix22;
126
- /**
127
- * Multiplies two matrices and returns a new matrix with the result.
128
- *
129
- * @param l_mat - The left matrix operand
130
- * @param r_mat - The right matrix operand
131
- * @returns A new MutableMatrix22 containing the multiplication result
132
- */
133
- static multiply(l_mat: IMatrix22, r_mat: IMatrix22): MutableMatrix22;
134
87
  /**
135
88
  * Creates a deep copy of this matrix.
136
89
  *
@@ -142,7 +95,7 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
142
95
  *
143
96
  * @returns The internal Float32Array in column-major order
144
97
  */
145
- raw(): Float32Array;
98
+ raw(): TypedArray;
146
99
  /**
147
100
  * Sets the value at the specified row and column position.
148
101
  *
@@ -195,11 +148,23 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
195
148
  * @returns This matrix instance for method chaining
196
149
  */
197
150
  transpose(): MutableMatrix22;
151
+ /**
152
+ * Attempts to invert this matrix in place.
153
+ *
154
+ * The matrix is left unchanged when it is numerically singular, which
155
+ * lets callers keep the previous valid value.
156
+ *
157
+ * @returns True if the inversion succeeded, false if the matrix is singular
158
+ */
159
+ tryInvert(): boolean;
198
160
  /**
199
161
  * Inverts this matrix in place.
200
162
  *
163
+ * If the matrix is numerically singular, it is set to the identity matrix
164
+ * instead of being filled with `Infinity`/`NaN`.
165
+ * Use {@link MutableMatrix22.tryInvert} when the caller needs to detect the failure.
166
+ *
201
167
  * @returns This matrix instance for method chaining
202
- * @throws Error if the matrix is not invertible (determinant is 0)
203
168
  */
204
169
  invert(): MutableMatrix22;
205
170
  /**
@@ -237,84 +202,114 @@ export declare class MutableMatrix22 extends Matrix22 implements IMutableMatrix,
237
202
  * @returns This matrix instance for method chaining
238
203
  */
239
204
  multiplyByLeft(mat: IMatrix22): MutableMatrix22;
205
+ }
206
+ export declare class MutableMatrix22 extends MutableMatrix22_<Float32ArrayConstructor> {
240
207
  /**
241
- * Creates a new matrix from values provided in row-major order.
242
- * This is more intuitive for manual input as values are specified
243
- * in the same order they appear visually in the matrix.
244
- *
245
- * @param m00 - Value for position (0,0)
246
- * @param m01 - Value for position (0,1)
247
- * @param m10 - Value for position (1,0)
248
- * @param m11 - Value for position (1,1)
249
- * @returns A new MutableMatrix22 instance
208
+ * Creates a new MutableMatrix22 instance.
209
+ * @param m - The typed array containing the matrix components
250
210
  */
211
+ constructor(m: TypedArray);
212
+ /** Creates a zero matrix. */
213
+ static zero(): MutableMatrix22;
214
+ /** Creates an identity matrix. */
215
+ static identity(): MutableMatrix22;
216
+ /** Creates a dummy matrix with an empty array. */
217
+ static dummy(): MutableMatrix22;
218
+ /** Creates the transpose of the given matrix. */
219
+ static transpose(mat: IMatrix22): MutableMatrix22;
220
+ /** Attempts to invert the given matrix, returning null when it is singular. */
221
+ static tryInvert(mat: IMatrix22): MutableMatrix22 | null;
222
+ /** Creates the inverse of the given matrix (identity when singular). */
223
+ static invert(mat: IMatrix22): MutableMatrix22;
224
+ /** Attempts to invert the given matrix into outMat. */
225
+ static tryInvertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): boolean;
226
+ /** Inverts the given matrix into outMat (identity when singular). */
227
+ static invertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): T;
228
+ /** Creates a 2D rotation matrix. */
229
+ static rotate(radian: number): MutableMatrix22;
230
+ /** Creates a 2D scaling matrix. */
231
+ static scale(vec: IVector2): MutableMatrix22;
232
+ /** Multiplies two 2x2 matrices. */
233
+ static multiply(l_mat: IMatrix22, r_mat: IMatrix22): MutableMatrix22;
234
+ /** Multiplies two matrices and stores the result in outMat. */
235
+ static multiplyTo<T extends IMutableMatrix22>(l_mat: IMatrix22, r_mat: IMatrix22, outMat: T): T;
236
+ /** Creates a matrix from row-major components. */
251
237
  static fromCopy4RowMajor(m00: number, m01: number, m10: number, m11: number): MutableMatrix22;
252
- /**
253
- * Creates a new matrix from values provided in column-major order.
254
- * This matches the internal storage format used by WebGL.
255
- *
256
- * @param m00 - Value for position (0,0)
257
- * @param m10 - Value for position (1,0)
258
- * @param m01 - Value for position (0,1)
259
- * @param m11 - Value for position (1,1)
260
- * @returns A new MutableMatrix22 instance
261
- */
238
+ /** Creates a matrix from column-major components. */
262
239
  static fromCopy4ColumnMajor(m00: number, m10: number, m01: number, m11: number): MutableMatrix22;
263
- /**
264
- * Creates a new matrix using the provided Float32Array directly (no copy).
265
- * The array is expected to be in column-major order.
266
- *
267
- * @param float32Array - Float32Array containing matrix data in column-major order
268
- * @returns A new MutableMatrix22 instance sharing the provided array
269
- */
270
- static fromFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix22;
271
- /**
272
- * Creates a new matrix by copying from a Float32Array in column-major order.
273
- *
274
- * @param float32Array - Float32Array containing matrix data in column-major order
275
- * @returns A new MutableMatrix22 instance with copied data
276
- */
277
- static fromCopyFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix22;
278
- /**
279
- * Creates a new matrix by copying from a Float32Array in row-major order.
280
- *
281
- * @param array - Float32Array containing matrix data in row-major order
282
- * @returns A new MutableMatrix22 instance with converted data
283
- */
240
+ /** Creates a matrix that directly uses the given Float32Array. */
241
+ static fromFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix22;
242
+ /** Creates a matrix by copying a Float32Array in column-major order. */
243
+ static fromCopyFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix22;
244
+ /** Creates a matrix by copying a Float32Array in row-major order. */
284
245
  static fromCopyFloat32ArrayRowMajor(array: Float32Array): MutableMatrix22;
285
- /**
286
- * Creates a new matrix by copying from another Matrix22 instance.
287
- *
288
- * @param mat - The source Matrix22 to copy from
289
- * @returns A new MutableMatrix22 instance with copied data
290
- */
246
+ /** Creates a matrix by copying another matrix. */
291
247
  static fromCopyMatrix22(mat: IMatrix22): MutableMatrix22;
292
- /**
293
- * Creates a new matrix from a 4-element array in column-major order.
294
- *
295
- * @param array - Array4 containing matrix data in column-major order
296
- * @returns A new MutableMatrix22 instance with copied data
297
- */
248
+ /** Creates a matrix from a 4-element array in column-major order. */
298
249
  static fromCopyArray9ColumnMajor(array: Array4<number>): MutableMatrix22;
299
- /**
300
- * Creates a new matrix from an array in column-major order.
301
- *
302
- * @param array - Array containing matrix data in column-major order
303
- * @returns A new MutableMatrix22 instance with copied data
304
- */
250
+ /** Creates a matrix from an array in column-major order. */
305
251
  static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix22;
306
- /**
307
- * Creates a new matrix from a 4-element array in row-major order.
308
- *
309
- * @param array - Array4 containing matrix data in row-major order
310
- * @returns A new MutableMatrix22 instance with converted data
311
- */
252
+ /** Creates a matrix from a 4-element array in row-major order. */
312
253
  static fromCopyArray9RowMajor(array: Array4<number>): MutableMatrix22;
313
- /**
314
- * Creates a new matrix from an array in row-major order.
315
- *
316
- * @param array - Array containing matrix data in row-major order
317
- * @returns A new MutableMatrix22 instance with converted data
318
- */
254
+ /** Creates a matrix from an array in row-major order. */
319
255
  static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix22;
320
256
  }
257
+ /**
258
+ * Immutable 2x2 matrix with 64-bit float components.
259
+ * Use this implementation when higher numerical precision is required.
260
+ */
261
+ export declare class MutableMatrix22D extends MutableMatrix22_<Float64ArrayConstructor> {
262
+ /**
263
+ * Creates a new MutableMatrix22D instance.
264
+ * @param m - The typed array containing the matrix components
265
+ */
266
+ private constructor();
267
+ /** Creates a zero matrix. */
268
+ static zero(): MutableMatrix22D;
269
+ /** Creates an identity matrix. */
270
+ static identity(): MutableMatrix22D;
271
+ /** Creates a dummy matrix with an empty array. */
272
+ static dummy(): MutableMatrix22D;
273
+ /** Creates the transpose of the given matrix. */
274
+ static transpose(mat: IMatrix22): MutableMatrix22D;
275
+ /** Attempts to invert the given matrix, returning null when it is singular. */
276
+ static tryInvert(mat: IMatrix22): MutableMatrix22D | null;
277
+ /** Creates the inverse of the given matrix (identity when singular). */
278
+ static invert(mat: IMatrix22): MutableMatrix22D;
279
+ /** Attempts to invert the given matrix into outMat. */
280
+ static tryInvertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): boolean;
281
+ /** Inverts the given matrix into outMat (identity when singular). */
282
+ static invertTo<T extends IMutableMatrix22>(mat: IMatrix22, outMat: T): T;
283
+ /** Creates a 2D rotation matrix. */
284
+ static rotate(radian: number): MutableMatrix22D;
285
+ /** Creates a 2D scaling matrix. */
286
+ static scale(vec: IVector2): MutableMatrix22D;
287
+ /** Multiplies two 2x2 matrices. */
288
+ static multiply(l_mat: IMatrix22, r_mat: IMatrix22): MutableMatrix22D;
289
+ /** Multiplies two matrices and stores the result in outMat. */
290
+ static multiplyTo<T extends IMutableMatrix22>(l_mat: IMatrix22, r_mat: IMatrix22, outMat: T): T;
291
+ /** Creates a matrix from row-major components. */
292
+ static fromCopy4RowMajor(m00: number, m01: number, m10: number, m11: number): MutableMatrix22D;
293
+ /** Creates a matrix from column-major components. */
294
+ static fromCopy4ColumnMajor(m00: number, m10: number, m01: number, m11: number): MutableMatrix22D;
295
+ /** Creates a matrix that directly uses the given Float64Array. */
296
+ static fromFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix22D;
297
+ /** Creates a matrix by copying a Float64Array in column-major order. */
298
+ static fromCopyFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix22D;
299
+ /** Creates a matrix by copying a Float64Array in row-major order. */
300
+ static fromCopyFloat64ArrayRowMajor(array: Float64Array): MutableMatrix22D;
301
+ /** Creates a matrix by copying another matrix. */
302
+ static fromCopyMatrix22(mat: IMatrix22): MutableMatrix22D;
303
+ /** Creates a matrix from a 4-element array in column-major order. */
304
+ static fromCopyArray9ColumnMajor(array: Array4<number>): MutableMatrix22D;
305
+ /** Creates a matrix from an array in column-major order. */
306
+ static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix22D;
307
+ /** Creates a matrix from a 4-element array in row-major order. */
308
+ static fromCopyArray9RowMajor(array: Array4<number>): MutableMatrix22D;
309
+ /** Creates a matrix from an array in row-major order. */
310
+ static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix22D;
311
+ }
312
+ /**
313
+ * Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
314
+ */
315
+ export { MutableMatrix22 as MutableMatrix22F };
@@ -1,8 +1,8 @@
1
- import type { Array9, Index } from '../../types/CommonTypes';
1
+ import type { Array9, FloatTypedArrayConstructor, Index, TypedArray } from '../../types/CommonTypes';
2
2
  import type { IMatrix33, IMatrix44, IMutableMatrix, IMutableMatrix33 } from './IMatrix';
3
3
  import type { IQuaternion } from './IQuaternion';
4
4
  import type { IVector3 } from './IVector';
5
- import { Matrix33 } from './Matrix33';
5
+ import { Matrix33_ } from './Matrix33';
6
6
  /**
7
7
  * A mutable 3x3 matrix class that extends Matrix33 and provides mutating operations.
8
8
  * This class stores matrix data in column-major order as a Float32Array.
@@ -21,7 +21,15 @@ import { Matrix33 } from './Matrix33';
21
21
  * | m20 m21 m22 |
22
22
  * ```
23
23
  */
24
- export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix, IMutableMatrix33 {
24
+ export declare class MutableMatrix33_<T extends FloatTypedArrayConstructor> extends Matrix33_<T> implements IMutableMatrix, IMutableMatrix33 {
25
+ /**
26
+ * Creates a new MutableMatrix33_ instance.
27
+ * @param m - The typed array containing the matrix components
28
+ * @param options - Configuration object containing the typed array constructor
29
+ */
30
+ constructor(m: TypedArray, options: {
31
+ type: T;
32
+ });
25
33
  /**
26
34
  * Sets the matrix element at position (0,0).
27
35
  * @param val - The value to set
@@ -117,78 +125,6 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
117
125
  * @returns The string 'MutableMatrix33'
118
126
  */
119
127
  get className(): string;
120
- /**
121
- * Creates a new zero matrix (all elements set to 0).
122
- * @returns A new MutableMatrix33 instance with all elements set to 0
123
- */
124
- static zero(): MutableMatrix33;
125
- /**
126
- * Creates a new identity matrix.
127
- * @returns A new MutableMatrix33 instance representing the identity matrix
128
- */
129
- static identity(): MutableMatrix33;
130
- /**
131
- * Creates a dummy matrix for testing purposes.
132
- * @returns A new MutableMatrix33 instance with default values
133
- */
134
- static dummy(): MutableMatrix33;
135
- /**
136
- * Creates a new matrix that is the transpose of the input matrix.
137
- * @param mat - The matrix to transpose
138
- * @returns A new MutableMatrix33 instance representing the transposed matrix
139
- */
140
- static transpose(mat: IMatrix33): MutableMatrix33;
141
- /**
142
- * Creates a new matrix that is the inverse of the input matrix.
143
- * @param mat - The matrix to invert
144
- * @returns A new MutableMatrix33 instance representing the inverted matrix
145
- */
146
- static invert(mat: IMatrix33): MutableMatrix33;
147
- /**
148
- * Creates a rotation matrix around the X-axis.
149
- * @param radian - The rotation angle in radians
150
- * @returns A new MutableMatrix33 instance representing the X-axis rotation
151
- */
152
- static rotateX(radian: number): MutableMatrix33;
153
- /**
154
- * Creates a rotation matrix around the Y-axis.
155
- * @param radian - The rotation angle in radians
156
- * @returns A new MutableMatrix33 instance representing the Y-axis rotation
157
- */
158
- static rotateY(radian: number): MutableMatrix33;
159
- /**
160
- * Creates a rotation matrix around the Z-axis.
161
- * @param radian - The rotation angle in radians
162
- * @returns A new MutableMatrix33 instance representing the Z-axis rotation
163
- */
164
- static rotateZ(radian: number): MutableMatrix33;
165
- /**
166
- * Creates a rotation matrix for combined X, Y, and Z axis rotations applied in that order.
167
- * @param x - Rotation angle around X-axis in radians
168
- * @param y - Rotation angle around Y-axis in radians
169
- * @param z - Rotation angle around Z-axis in radians
170
- * @returns A new MutableMatrix33 instance representing the combined rotation
171
- */
172
- static rotateXYZ(x: number, y: number, z: number): MutableMatrix33;
173
- /**
174
- * Creates a rotation matrix from a vector containing rotation angles.
175
- * @param vec - A vector containing rotation angles for X, Y, and Z axes
176
- * @returns A new MutableMatrix33 instance representing the rotation
177
- */
178
- static rotate(vec: IVector3): MutableMatrix33;
179
- /**
180
- * Creates a scaling matrix from a vector.
181
- * @param vec - A vector containing scale factors for X, Y, and Z axes
182
- * @returns A new MutableMatrix33 instance representing the scaling transformation
183
- */
184
- static scale(vec: IVector3): MutableMatrix33;
185
- /**
186
- * Multiplies two matrices and returns the result as a new matrix.
187
- * @param l_mat - The left matrix operand
188
- * @param r_mat - The right matrix operand
189
- * @returns A new MutableMatrix33 instance representing l_mat * r_mat
190
- */
191
- static multiply(l_mat: IMatrix33, r_mat: IMatrix33): MutableMatrix33;
192
128
  /**
193
129
  * Creates a copy of this matrix.
194
130
  * @returns A new MutableMatrix33 instance with the same values
@@ -198,7 +134,7 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
198
134
  * Gets the raw Float32Array containing the matrix data.
199
135
  * @returns The underlying Float32Array in column-major order
200
136
  */
201
- raw(): Float32Array;
137
+ raw(): TypedArray;
202
138
  /**
203
139
  * Sets a value at the specified row and column position.
204
140
  * @param row_i - The row index (0-2)
@@ -250,9 +186,22 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
250
186
  * @returns This matrix instance for method chaining
251
187
  */
252
188
  transpose(): MutableMatrix33;
189
+ /**
190
+ * Attempts to invert this matrix in place.
191
+ *
192
+ * The matrix is left unchanged when it is numerically singular, which
193
+ * lets callers keep the previous valid value.
194
+ *
195
+ * @returns True if the inversion succeeded, false if the matrix is singular
196
+ */
197
+ tryInvert(): boolean;
253
198
  /**
254
199
  * Inverts this matrix in place using the determinant method.
255
- * Logs an error if the determinant is 0 (matrix is not invertible).
200
+ *
201
+ * If the matrix is numerically singular, it is set to the identity matrix
202
+ * instead of being filled with `Infinity`/`NaN`.
203
+ * Use {@link MutableMatrix33.tryInvert} when the caller needs to detect the failure.
204
+ *
256
205
  * @returns This matrix instance for method chaining
257
206
  */
258
207
  invert(): MutableMatrix33;
@@ -316,101 +265,138 @@ export declare class MutableMatrix33 extends Matrix33 implements IMutableMatrix,
316
265
  * @returns This matrix instance for method chaining
317
266
  */
318
267
  multiplyByLeft(mat: IMatrix33): MutableMatrix33;
268
+ }
269
+ export declare class MutableMatrix33 extends MutableMatrix33_<Float32ArrayConstructor> {
319
270
  /**
320
- * Creates a new matrix from 9 values specified in row-major order.
321
- * This is more intuitive when writing matrix values as they appear visually.
322
- * @param m00 - Element at position (0,0)
323
- * @param m01 - Element at position (0,1)
324
- * @param m02 - Element at position (0,2)
325
- * @param m10 - Element at position (1,0)
326
- * @param m11 - Element at position (1,1)
327
- * @param m12 - Element at position (1,2)
328
- * @param m20 - Element at position (2,0)
329
- * @param m21 - Element at position (2,1)
330
- * @param m22 - Element at position (2,2)
331
- * @returns A new MutableMatrix33 instance
271
+ * Creates a new MutableMatrix33 instance.
272
+ * @param m - The typed array containing the matrix components
332
273
  */
274
+ constructor(m: TypedArray);
275
+ /** Creates a zero matrix. */
276
+ static zero(): MutableMatrix33;
277
+ /** Creates an identity matrix (optimized IdentityMatrix33 instance). */
278
+ static identity(): MutableMatrix33;
279
+ /** Creates a dummy matrix with an empty array. */
280
+ static dummy(): MutableMatrix33;
281
+ /** Creates the transpose of the given matrix. */
282
+ static transpose(mat: IMatrix33): MutableMatrix33;
283
+ /** Attempts to invert the given matrix, returning null when it is singular. */
284
+ static tryInvert(mat: IMatrix33): MutableMatrix33 | null;
285
+ /** Creates the inverse of the given matrix (identity when singular). */
286
+ static invert(mat: IMatrix33): MutableMatrix33;
287
+ /** Attempts to invert the given matrix into outMat. */
288
+ static tryInvertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): boolean;
289
+ /** Inverts the given matrix into outMat (identity when singular). */
290
+ static invertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): T;
291
+ /** Creates a rotation matrix around the X-axis. */
292
+ static rotateX(radian: number): MutableMatrix33;
293
+ /** Creates a rotation matrix around the Y-axis. */
294
+ static rotateY(radian: number): MutableMatrix33;
295
+ /** Creates a rotation matrix around the Z-axis. */
296
+ static rotateZ(radian: number): MutableMatrix33;
297
+ /** Creates a rotation matrix from Euler angles in XYZ order. */
298
+ static rotateXYZ(x: number, y: number, z: number): MutableMatrix33;
299
+ /** Creates a rotation matrix from a Vector3 containing Euler angles. */
300
+ static rotate(vec: IVector3): MutableMatrix33;
301
+ /** Creates a scaling matrix. */
302
+ static scale(vec: IVector3): MutableMatrix33;
303
+ /** Multiplies two matrices. */
304
+ static multiply(l_mat: IMatrix33, r_mat: IMatrix33): MutableMatrix33;
305
+ /** Multiplies two matrices and stores the result in outMat. */
306
+ static multiplyTo<T extends IMutableMatrix33>(l_mat: IMatrix33, r_mat: IMatrix33, outMat: T): T;
307
+ /** Creates a matrix from row-major components. */
333
308
  static fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): MutableMatrix33;
334
- /**
335
- * Creates a new matrix from 9 values specified in column-major order.
336
- * This matches the internal storage format of WebGL matrices.
337
- * @param m00 - Element at position (0,0)
338
- * @param m10 - Element at position (1,0)
339
- * @param m20 - Element at position (2,0)
340
- * @param m01 - Element at position (0,1)
341
- * @param m11 - Element at position (1,1)
342
- * @param m21 - Element at position (2,1)
343
- * @param m02 - Element at position (0,2)
344
- * @param m12 - Element at position (1,2)
345
- * @param m22 - Element at position (2,2)
346
- * @returns A new MutableMatrix33 instance
347
- */
309
+ /** Creates a matrix from column-major components. */
348
310
  static fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): MutableMatrix33;
349
- /**
350
- * Creates a new 3x3 matrix by copying the upper-left 3x3 portion of a 4x4 matrix.
351
- * @param mat - The 4x4 matrix to copy from
352
- * @returns A new MutableMatrix33 instance
353
- */
311
+ /** Creates a matrix from the upper-left 3x3 portion of a 4x4 matrix. */
354
312
  static fromCopyMatrix44(mat: IMatrix44): MutableMatrix33;
355
- /**
356
- * Creates a new matrix using the provided Float32Array directly (no copy).
357
- * The array should contain 9 elements in column-major order.
358
- * @param float32Array - A Float32Array containing the matrix data
359
- * @returns A new MutableMatrix33 instance that shares the array reference
360
- */
361
- static fromFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix33;
362
- /**
363
- * Creates a new matrix by copying data from a Float32Array in column-major order.
364
- * @param float32Array - A Float32Array containing the matrix data to copy
365
- * @returns A new MutableMatrix33 instance with copied data
366
- */
367
- static fromCopyFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix33;
368
- /**
369
- * Creates a new matrix by copying data from a Float32Array in row-major order.
370
- * The data is converted to column-major order during the copy process.
371
- * @param array - A Float32Array containing the matrix data in row-major order
372
- * @returns A new MutableMatrix33 instance with converted data
373
- */
313
+ /** Creates a matrix that directly uses the given Float32Array. */
314
+ static fromFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix33;
315
+ /** Creates a matrix by copying a Float32Array in column-major order. */
316
+ static fromCopyFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix33;
317
+ /** Creates a matrix by copying a Float32Array in row-major order. */
374
318
  static fromCopyFloat32ArrayRowMajor(array: Float32Array): MutableMatrix33;
375
- /**
376
- * Creates a new matrix by copying from another 3x3 matrix.
377
- * @param mat - The source matrix to copy from
378
- * @returns A new MutableMatrix33 instance with copied data
379
- */
319
+ /** Creates a matrix by copying another matrix. */
380
320
  static fromCopyMatrix33(mat: IMatrix33): MutableMatrix33;
381
- /**
382
- * Creates a new matrix from a 9-element array in column-major order.
383
- * @param array - An array containing exactly 9 numbers in column-major order
384
- * @returns A new MutableMatrix33 instance
385
- */
321
+ /** Creates a matrix from a 9-element array in column-major order. */
386
322
  static fromCopyArray9ColumnMajor(array: Array9<number>): MutableMatrix33;
387
- /**
388
- * Creates a new matrix from an array in column-major order.
389
- * Only the first 9 elements are used if the array is larger.
390
- * @param array - An array containing the matrix data in column-major order
391
- * @returns A new MutableMatrix33 instance
392
- */
323
+ /** Creates a matrix from an array in column-major order. */
393
324
  static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix33;
394
- /**
395
- * Creates a new matrix from a 9-element array in row-major order.
396
- * The data is converted to column-major order during the creation process.
397
- * @param array - An array containing exactly 9 numbers in row-major order
398
- * @returns A new MutableMatrix33 instance
399
- */
325
+ /** Creates a matrix from a 9-element array in row-major order. */
400
326
  static fromCopyArray9RowMajor(array: Array9<number>): MutableMatrix33;
401
- /**
402
- * Creates a new matrix from an array in row-major order.
403
- * Only the first 9 elements are used if the array is larger.
404
- * The data is converted to column-major order during the creation process.
405
- * @param array - An array containing the matrix data in row-major order
406
- * @returns A new MutableMatrix33 instance
407
- */
327
+ /** Creates a matrix from an array in row-major order. */
408
328
  static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix33;
409
- /**
410
- * Creates a new rotation matrix from a quaternion.
411
- * Converts the quaternion representation to its equivalent 3x3 rotation matrix.
412
- * @param q - The quaternion to convert (should be normalized)
413
- * @returns A new MutableMatrix33 instance representing the rotation
414
- */
329
+ /** Creates a matrix from a quaternion representing a rotation. */
415
330
  static fromCopyQuaternion(q: IQuaternion): MutableMatrix33;
416
331
  }
332
+ /**
333
+ * Immutable 3x3 matrix with 64-bit float components.
334
+ * Use this implementation when higher numerical precision is required.
335
+ */
336
+ export declare class MutableMatrix33D extends MutableMatrix33_<Float64ArrayConstructor> {
337
+ /**
338
+ * Creates a new MutableMatrix33D instance.
339
+ * @param m - The typed array containing the matrix components
340
+ */
341
+ private constructor();
342
+ /** Creates a zero matrix. */
343
+ static zero(): MutableMatrix33D;
344
+ /** Creates an identity matrix. */
345
+ static identity(): MutableMatrix33D;
346
+ /** Creates a dummy matrix with an empty array. */
347
+ static dummy(): MutableMatrix33D;
348
+ /** Creates the transpose of the given matrix. */
349
+ static transpose(mat: IMatrix33): MutableMatrix33D;
350
+ /** Attempts to invert the given matrix, returning null when it is singular. */
351
+ static tryInvert(mat: IMatrix33): MutableMatrix33D | null;
352
+ /** Creates the inverse of the given matrix (identity when singular). */
353
+ static invert(mat: IMatrix33): MutableMatrix33D;
354
+ /** Attempts to invert the given matrix into outMat. */
355
+ static tryInvertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): boolean;
356
+ /** Inverts the given matrix into outMat (identity when singular). */
357
+ static invertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): T;
358
+ /** Creates a rotation matrix around the X-axis. */
359
+ static rotateX(radian: number): MutableMatrix33D;
360
+ /** Creates a rotation matrix around the Y-axis. */
361
+ static rotateY(radian: number): MutableMatrix33D;
362
+ /** Creates a rotation matrix around the Z-axis. */
363
+ static rotateZ(radian: number): MutableMatrix33D;
364
+ /** Creates a rotation matrix from Euler angles in XYZ order. */
365
+ static rotateXYZ(x: number, y: number, z: number): MutableMatrix33D;
366
+ /** Creates a rotation matrix from a Vector3 containing Euler angles. */
367
+ static rotate(vec: IVector3): MutableMatrix33D;
368
+ /** Creates a scaling matrix. */
369
+ static scale(vec: IVector3): MutableMatrix33D;
370
+ /** Multiplies two matrices. */
371
+ static multiply(l_mat: IMatrix33, r_mat: IMatrix33): MutableMatrix33D;
372
+ /** Multiplies two matrices and stores the result in outMat. */
373
+ static multiplyTo<T extends IMutableMatrix33>(l_mat: IMatrix33, r_mat: IMatrix33, outMat: T): T;
374
+ /** Creates a matrix from row-major components. */
375
+ static fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): MutableMatrix33D;
376
+ /** Creates a matrix from column-major components. */
377
+ static fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): MutableMatrix33D;
378
+ /** Creates a matrix from the upper-left 3x3 portion of a 4x4 matrix. */
379
+ static fromCopyMatrix44(mat: IMatrix44): MutableMatrix33D;
380
+ /** Creates a matrix that directly uses the given Float64Array. */
381
+ static fromFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix33D;
382
+ /** Creates a matrix by copying a Float64Array in column-major order. */
383
+ static fromCopyFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix33D;
384
+ /** Creates a matrix by copying a Float64Array in row-major order. */
385
+ static fromCopyFloat64ArrayRowMajor(array: Float64Array): MutableMatrix33D;
386
+ /** Creates a matrix by copying another matrix. */
387
+ static fromCopyMatrix33(mat: IMatrix33): MutableMatrix33D;
388
+ /** Creates a matrix from a 9-element array in column-major order. */
389
+ static fromCopyArray9ColumnMajor(array: Array9<number>): MutableMatrix33D;
390
+ /** Creates a matrix from an array in column-major order. */
391
+ static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix33D;
392
+ /** Creates a matrix from a 9-element array in row-major order. */
393
+ static fromCopyArray9RowMajor(array: Array9<number>): MutableMatrix33D;
394
+ /** Creates a matrix from an array in row-major order. */
395
+ static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix33D;
396
+ /** Creates a matrix from a quaternion representing a rotation. */
397
+ static fromCopyQuaternion(q: IQuaternion): MutableMatrix33D;
398
+ }
399
+ /**
400
+ * Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
401
+ */
402
+ export { MutableMatrix33 as MutableMatrix33F };