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.
- package/README.md +32 -2
- package/VERSION-FILE +1 -1
- package/dist/esm/effekseer/main.d.ts +3 -1
- package/dist/esm/foundation/components/Animation/AnimationComponent.d.ts +15 -1
- package/dist/esm/foundation/components/Animation/AnimationStateRepository.d.ts +26 -10
- package/dist/esm/foundation/components/AnimationState/AnimationStateComponent.d.ts +14 -0
- package/dist/esm/foundation/components/CharacterController/CharacterAnimationController.d.ts +63 -0
- package/dist/esm/foundation/components/CharacterController/CharacterControllerComponent.d.ts +67 -0
- package/dist/esm/foundation/components/CharacterController/ICharacterControllerEntity.d.ts +4 -0
- package/dist/esm/foundation/components/CharacterController/createCharacterControllerEntity.d.ts +4 -0
- package/dist/esm/foundation/components/CharacterController/index.d.ts +4 -0
- package/dist/esm/foundation/components/ComponentTypes.d.ts +6 -0
- package/dist/esm/foundation/components/Physics/PhysicsComponent.d.ts +27 -0
- package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.d.ts +30 -0
- package/dist/esm/foundation/components/Shape/IShapeEntity.d.ts +4 -0
- package/dist/esm/foundation/components/Shape/ShapeComponent.d.ts +43 -0
- package/dist/esm/foundation/components/Shape/createShapeEntity.d.ts +3 -0
- package/dist/esm/foundation/components/Shape/index.d.ts +3 -0
- package/dist/esm/foundation/components/Skeletal/SkeletalComponent.d.ts +138 -45
- package/dist/esm/foundation/components/Transform/TransformComponent.d.ts +2 -3
- package/dist/esm/foundation/components/Trigger/ITriggerEntity.d.ts +4 -0
- package/dist/esm/foundation/components/Trigger/TriggerComponent.d.ts +58 -0
- package/dist/esm/foundation/components/Trigger/index.d.ts +2 -0
- package/dist/esm/foundation/components/Vrm/VrmComponent.d.ts +16 -1
- package/dist/esm/foundation/components/WellKnownComponentTIDs.d.ts +4 -1
- package/dist/esm/foundation/components/index.d.ts +3 -0
- package/dist/esm/foundation/core/Component.d.ts +63 -3
- package/dist/esm/foundation/core/ComponentMemoryRegistry.d.ts +59 -1
- package/dist/esm/foundation/core/Config.d.ts +8 -7
- package/dist/esm/foundation/core/Entity.d.ts +15 -0
- package/dist/esm/foundation/definitions/BoneDataType.d.ts +12 -1
- package/dist/esm/foundation/definitions/PhysicsShapeType.d.ts +1 -0
- package/dist/esm/foundation/definitions/ProcessApproach.d.ts +8 -4
- package/dist/esm/foundation/exporter/Gltf2ExporterOps.d.ts +2 -0
- package/dist/esm/foundation/geometry/Shape.d.ts +35 -0
- package/dist/esm/foundation/geometry/index.d.ts +1 -0
- package/dist/esm/foundation/geometry/shapes/Cylinder.d.ts +16 -0
- package/dist/esm/foundation/geometry/shapes/index.d.ts +1 -0
- package/dist/esm/foundation/gizmos/ShapeGizmo.d.ts +22 -0
- package/dist/esm/foundation/gizmos/index.d.ts +1 -0
- package/dist/esm/foundation/helpers/EntityHelper.d.ts +6 -0
- package/dist/esm/foundation/helpers/MeshHelper.d.ts +275 -15
- package/dist/esm/foundation/importer/AnimationAssigner.d.ts +62 -3
- package/dist/esm/foundation/importer/BoneDataTypeDetector.d.ts +31 -0
- package/dist/esm/foundation/importer/Gltf2Importer.d.ts +6 -0
- package/dist/esm/foundation/importer/KhrPhysicsImporter.d.ts +58 -0
- package/dist/esm/foundation/importer/VrmaImporter.d.ts +11 -3
- package/dist/esm/foundation/importer/index.d.ts +2 -0
- package/dist/esm/foundation/math/AbstractMatrix.d.ts +3 -2
- package/dist/esm/foundation/math/AbstractQuaternion.d.ts +2 -1
- package/dist/esm/foundation/math/AnimatedQuaternion.d.ts +4 -0
- package/dist/esm/foundation/math/AnimatedScalar.d.ts +4 -0
- package/dist/esm/foundation/math/AnimatedVector2.d.ts +4 -0
- package/dist/esm/foundation/math/AnimatedVector3.d.ts +4 -0
- package/dist/esm/foundation/math/AnimatedVector4.d.ts +4 -0
- package/dist/esm/foundation/math/AnimatedVectorN.d.ts +4 -0
- package/dist/esm/foundation/math/IAnimatedValue.d.ts +12 -0
- package/dist/esm/foundation/math/IMatrix.d.ts +2 -2
- package/dist/esm/foundation/math/IQuaternion.d.ts +4 -4
- package/dist/esm/foundation/math/LogQuaternion.d.ts +110 -38
- package/dist/esm/foundation/math/MathUtil.d.ts +63 -1
- package/dist/esm/foundation/math/Matrix22.d.ts +176 -30
- package/dist/esm/foundation/math/Matrix33.d.ts +206 -38
- package/dist/esm/foundation/math/Matrix44.d.ts +222 -39
- package/dist/esm/foundation/math/MutableMatrix22.d.ts +125 -130
- package/dist/esm/foundation/math/MutableMatrix33.d.ts +148 -162
- package/dist/esm/foundation/math/MutableMatrix44.d.ts +159 -183
- package/dist/esm/foundation/math/MutableQuaternion.d.ts +241 -132
- package/dist/esm/foundation/math/MutableScalar.d.ts +11 -12
- package/dist/esm/foundation/math/MutableVector2.d.ts +30 -31
- package/dist/esm/foundation/math/MutableVector3.d.ts +28 -26
- package/dist/esm/foundation/math/MutableVector4.d.ts +37 -37
- package/dist/esm/foundation/math/Quaternion.d.ts +529 -36
- package/dist/esm/foundation/math/Scalar.d.ts +13 -14
- package/dist/esm/foundation/math/Vector2.d.ts +38 -38
- package/dist/esm/foundation/math/Vector3.d.ts +55 -54
- package/dist/esm/foundation/math/Vector4.d.ts +54 -55
- package/dist/esm/foundation/misc/MiscUtil.d.ts +79 -16
- package/dist/esm/foundation/misc/Time.d.ts +10 -1
- package/dist/esm/foundation/physics/CharacterControllerStrategy.d.ts +65 -0
- package/dist/esm/foundation/physics/Oimo/OimoPhysicsStrategy.d.ts +17 -1
- package/dist/esm/foundation/physics/PhysicsProperty.d.ts +43 -0
- package/dist/esm/foundation/physics/PhysicsStrategy.d.ts +15 -0
- package/dist/esm/foundation/physics/PhysicsWorldQuery.d.ts +65 -0
- package/dist/esm/foundation/physics/Rapier/RapierCharacterControllerStrategy.d.ts +58 -0
- package/dist/esm/foundation/physics/Rapier/RapierPhysicsStrategy.d.ts +157 -19
- package/dist/esm/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.d.ts +11 -0
- package/dist/esm/foundation/physics/Rapier/index.d.ts +2 -0
- package/dist/esm/foundation/physics/ShapeTransformResolver.d.ts +19 -0
- package/dist/esm/foundation/physics/index.d.ts +2 -0
- package/dist/esm/index.js +728 -723
- package/dist/esm/types/AnimationTypes.d.ts +1 -1
- package/dist/esm/types/KHR_implicit_shapes.d.ts +47 -0
- package/dist/esm/types/KHR_physics_rigid_bodies.d.ts +54 -0
- package/dist/esm/types/VRMC.d.ts +12 -12
- package/dist/esm/types/VRMC_vrm_animation.d.ts +5 -0
- package/dist/esm/types/glTF2.d.ts +8 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/webgl/main.d.ts +2 -1
- package/dist/esm/webgl/textureLoader/KTX2TextureLoader.d.ts +12 -0
- package/dist/esmdev/effekseer/main.d.ts +3 -1
- package/dist/esmdev/foundation/components/Animation/AnimationComponent.d.ts +15 -1
- package/dist/esmdev/foundation/components/Animation/AnimationStateRepository.d.ts +26 -10
- package/dist/esmdev/foundation/components/AnimationState/AnimationStateComponent.d.ts +14 -0
- package/dist/esmdev/foundation/components/CharacterController/CharacterAnimationController.d.ts +63 -0
- package/dist/esmdev/foundation/components/CharacterController/CharacterControllerComponent.d.ts +67 -0
- package/dist/esmdev/foundation/components/CharacterController/ICharacterControllerEntity.d.ts +4 -0
- package/dist/esmdev/foundation/components/CharacterController/createCharacterControllerEntity.d.ts +4 -0
- package/dist/esmdev/foundation/components/CharacterController/index.d.ts +4 -0
- package/dist/esmdev/foundation/components/ComponentTypes.d.ts +6 -0
- package/dist/esmdev/foundation/components/Physics/PhysicsComponent.d.ts +27 -0
- package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.d.ts +30 -0
- package/dist/esmdev/foundation/components/Shape/IShapeEntity.d.ts +4 -0
- package/dist/esmdev/foundation/components/Shape/ShapeComponent.d.ts +43 -0
- package/dist/esmdev/foundation/components/Shape/createShapeEntity.d.ts +3 -0
- package/dist/esmdev/foundation/components/Shape/index.d.ts +3 -0
- package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.d.ts +138 -45
- package/dist/esmdev/foundation/components/Transform/TransformComponent.d.ts +2 -3
- package/dist/esmdev/foundation/components/Trigger/ITriggerEntity.d.ts +4 -0
- package/dist/esmdev/foundation/components/Trigger/TriggerComponent.d.ts +58 -0
- package/dist/esmdev/foundation/components/Trigger/index.d.ts +2 -0
- package/dist/esmdev/foundation/components/Vrm/VrmComponent.d.ts +16 -1
- package/dist/esmdev/foundation/components/WellKnownComponentTIDs.d.ts +4 -1
- package/dist/esmdev/foundation/components/index.d.ts +3 -0
- package/dist/esmdev/foundation/core/Component.d.ts +63 -3
- package/dist/esmdev/foundation/core/ComponentMemoryRegistry.d.ts +59 -1
- package/dist/esmdev/foundation/core/Config.d.ts +8 -7
- package/dist/esmdev/foundation/core/Entity.d.ts +15 -0
- package/dist/esmdev/foundation/definitions/BoneDataType.d.ts +12 -1
- package/dist/esmdev/foundation/definitions/PhysicsShapeType.d.ts +1 -0
- package/dist/esmdev/foundation/definitions/ProcessApproach.d.ts +8 -4
- package/dist/esmdev/foundation/exporter/Gltf2ExporterOps.d.ts +2 -0
- package/dist/esmdev/foundation/geometry/Shape.d.ts +35 -0
- package/dist/esmdev/foundation/geometry/index.d.ts +1 -0
- package/dist/esmdev/foundation/geometry/shapes/Cylinder.d.ts +16 -0
- package/dist/esmdev/foundation/geometry/shapes/index.d.ts +1 -0
- package/dist/esmdev/foundation/gizmos/ShapeGizmo.d.ts +22 -0
- package/dist/esmdev/foundation/gizmos/index.d.ts +1 -0
- package/dist/esmdev/foundation/helpers/EntityHelper.d.ts +6 -0
- package/dist/esmdev/foundation/helpers/MeshHelper.d.ts +275 -15
- package/dist/esmdev/foundation/importer/AnimationAssigner.d.ts +62 -3
- package/dist/esmdev/foundation/importer/BoneDataTypeDetector.d.ts +31 -0
- package/dist/esmdev/foundation/importer/Gltf2Importer.d.ts +6 -0
- package/dist/esmdev/foundation/importer/KhrPhysicsImporter.d.ts +58 -0
- package/dist/esmdev/foundation/importer/VrmaImporter.d.ts +11 -3
- package/dist/esmdev/foundation/importer/index.d.ts +2 -0
- package/dist/esmdev/foundation/math/AbstractMatrix.d.ts +3 -2
- package/dist/esmdev/foundation/math/AbstractQuaternion.d.ts +2 -1
- package/dist/esmdev/foundation/math/AnimatedQuaternion.d.ts +4 -0
- package/dist/esmdev/foundation/math/AnimatedScalar.d.ts +4 -0
- package/dist/esmdev/foundation/math/AnimatedVector2.d.ts +4 -0
- package/dist/esmdev/foundation/math/AnimatedVector3.d.ts +4 -0
- package/dist/esmdev/foundation/math/AnimatedVector4.d.ts +4 -0
- package/dist/esmdev/foundation/math/AnimatedVectorN.d.ts +4 -0
- package/dist/esmdev/foundation/math/IAnimatedValue.d.ts +12 -0
- package/dist/esmdev/foundation/math/IMatrix.d.ts +2 -2
- package/dist/esmdev/foundation/math/IQuaternion.d.ts +4 -4
- package/dist/esmdev/foundation/math/LogQuaternion.d.ts +110 -38
- package/dist/esmdev/foundation/math/MathUtil.d.ts +63 -1
- package/dist/esmdev/foundation/math/Matrix22.d.ts +176 -30
- package/dist/esmdev/foundation/math/Matrix33.d.ts +206 -38
- package/dist/esmdev/foundation/math/Matrix44.d.ts +222 -39
- package/dist/esmdev/foundation/math/MutableMatrix22.d.ts +125 -130
- package/dist/esmdev/foundation/math/MutableMatrix33.d.ts +148 -162
- package/dist/esmdev/foundation/math/MutableMatrix44.d.ts +159 -183
- package/dist/esmdev/foundation/math/MutableQuaternion.d.ts +241 -132
- package/dist/esmdev/foundation/math/MutableScalar.d.ts +11 -12
- package/dist/esmdev/foundation/math/MutableVector2.d.ts +30 -31
- package/dist/esmdev/foundation/math/MutableVector3.d.ts +28 -26
- package/dist/esmdev/foundation/math/MutableVector4.d.ts +37 -37
- package/dist/esmdev/foundation/math/Quaternion.d.ts +529 -36
- package/dist/esmdev/foundation/math/Scalar.d.ts +13 -14
- package/dist/esmdev/foundation/math/Vector2.d.ts +38 -38
- package/dist/esmdev/foundation/math/Vector3.d.ts +55 -54
- package/dist/esmdev/foundation/math/Vector4.d.ts +54 -55
- package/dist/esmdev/foundation/misc/MiscUtil.d.ts +79 -16
- package/dist/esmdev/foundation/misc/Time.d.ts +10 -1
- package/dist/esmdev/foundation/physics/CharacterControllerStrategy.d.ts +65 -0
- package/dist/esmdev/foundation/physics/Oimo/OimoPhysicsStrategy.d.ts +17 -1
- package/dist/esmdev/foundation/physics/PhysicsProperty.d.ts +43 -0
- package/dist/esmdev/foundation/physics/PhysicsStrategy.d.ts +15 -0
- package/dist/esmdev/foundation/physics/PhysicsWorldQuery.d.ts +65 -0
- package/dist/esmdev/foundation/physics/Rapier/RapierCharacterControllerStrategy.d.ts +58 -0
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.d.ts +157 -19
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.d.ts +11 -0
- package/dist/esmdev/foundation/physics/Rapier/index.d.ts +2 -0
- package/dist/esmdev/foundation/physics/ShapeTransformResolver.d.ts +19 -0
- package/dist/esmdev/foundation/physics/index.d.ts +2 -0
- package/dist/esmdev/index.js +35168 -27712
- package/dist/esmdev/types/AnimationTypes.d.ts +1 -1
- package/dist/esmdev/types/KHR_implicit_shapes.d.ts +47 -0
- package/dist/esmdev/types/KHR_physics_rigid_bodies.d.ts +54 -0
- package/dist/esmdev/types/VRMC.d.ts +12 -12
- package/dist/esmdev/types/VRMC_vrm_animation.d.ts +5 -0
- package/dist/esmdev/types/glTF2.d.ts +8 -0
- package/dist/esmdev/types/index.d.ts +2 -0
- package/dist/esmdev/webgl/main.d.ts +2 -1
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.d.ts +12 -0
- package/package.json +25 -23
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Array9 } from '../../types';
|
|
2
|
+
import type { FloatTypedArrayConstructor, TypedArray } from '../../types/CommonTypes';
|
|
2
3
|
import { AbstractMatrix } from './AbstractMatrix';
|
|
3
|
-
import type { IMatrix, IMatrix33 } from './IMatrix';
|
|
4
|
+
import type { IMatrix, IMatrix33, IMatrix44, IMutableMatrix33 } from './IMatrix';
|
|
5
|
+
import type { IQuaternion } from './IQuaternion';
|
|
4
6
|
import type { IMutableVector3, IVector3 } from './IVector';
|
|
5
|
-
import type { Matrix44 } from './Matrix44';
|
|
6
|
-
import type { MutableMatrix33 } from './MutableMatrix33';
|
|
7
7
|
import type { MutableVector3 } from './MutableVector3';
|
|
8
|
-
import type { Quaternion } from './Quaternion';
|
|
9
8
|
import { Vector3 } from './Vector3';
|
|
10
9
|
/**
|
|
11
10
|
* Immutable 3x3 matrix class for 3D transformations.
|
|
@@ -27,12 +26,15 @@ import { Vector3 } from './Vector3';
|
|
|
27
26
|
* const result = Matrix33.multiply(rotation, scale);
|
|
28
27
|
* ```
|
|
29
28
|
*/
|
|
30
|
-
export declare class
|
|
29
|
+
export declare class Matrix33_<T extends FloatTypedArrayConstructor> extends AbstractMatrix implements IMatrix, IMatrix33 {
|
|
31
30
|
/**
|
|
32
|
-
* Creates a new
|
|
33
|
-
* @param m -
|
|
31
|
+
* Creates a new Matrix33_ instance.
|
|
32
|
+
* @param m - Typed array containing 9 matrix values in column-major order
|
|
33
|
+
* @param _options - Configuration object containing the typed array constructor
|
|
34
34
|
*/
|
|
35
|
-
constructor(m:
|
|
35
|
+
constructor(m: TypedArray, _options: {
|
|
36
|
+
type: T;
|
|
37
|
+
});
|
|
36
38
|
/**
|
|
37
39
|
* Gets the matrix element at row 0, column 0.
|
|
38
40
|
* @returns The m00 component
|
|
@@ -134,57 +136,85 @@ export declare class Matrix33 extends AbstractMatrix implements IMatrix, IMatrix
|
|
|
134
136
|
* Creates a zero matrix (all elements are 0).
|
|
135
137
|
* @returns A new Matrix33 with all zero elements
|
|
136
138
|
*/
|
|
137
|
-
static
|
|
139
|
+
static _zero(type: FloatTypedArrayConstructor): IMatrix33;
|
|
138
140
|
/**
|
|
139
141
|
* Creates an identity matrix.
|
|
140
142
|
* @returns A new identity matrix (optimized IdentityMatrix33 instance)
|
|
141
143
|
*/
|
|
142
|
-
static
|
|
144
|
+
static _identity(type: FloatTypedArrayConstructor): IMatrix33;
|
|
143
145
|
/**
|
|
144
146
|
* Creates a dummy matrix with empty data array.
|
|
145
147
|
* Used for placeholder purposes.
|
|
146
148
|
* @returns A new Matrix33 with empty Float32Array
|
|
147
149
|
*/
|
|
148
|
-
static
|
|
150
|
+
static _dummy(type: FloatTypedArrayConstructor): IMatrix33;
|
|
149
151
|
/**
|
|
150
152
|
* Creates the transpose of the given matrix.
|
|
151
153
|
* @param mat - The matrix to transpose
|
|
152
154
|
* @returns A new transposed matrix
|
|
153
155
|
*/
|
|
154
|
-
static
|
|
156
|
+
static _transpose(mat: IMatrix33, type: FloatTypedArrayConstructor): IMatrix33;
|
|
157
|
+
/**
|
|
158
|
+
* Attempts to create the inverse of the given matrix.
|
|
159
|
+
*
|
|
160
|
+
* Returns null instead of dividing by zero when the matrix is numerically
|
|
161
|
+
* singular (see {@link MathUtil.isSingularDet}).
|
|
162
|
+
*
|
|
163
|
+
* @param mat - The matrix to invert
|
|
164
|
+
* @returns A new inverted matrix, or null if the matrix is not invertible
|
|
165
|
+
*/
|
|
166
|
+
static _tryInvert(mat: IMatrix33, type: FloatTypedArrayConstructor): IMatrix33 | null;
|
|
155
167
|
/**
|
|
156
168
|
* Creates the inverse of the given matrix.
|
|
169
|
+
*
|
|
170
|
+
* If the matrix is numerically singular, an identity matrix is returned
|
|
171
|
+
* instead of dividing by zero. Use {@link Matrix33.tryInvert} when the
|
|
172
|
+
* caller needs to detect the failure.
|
|
173
|
+
*
|
|
157
174
|
* @param mat - The matrix to invert
|
|
158
|
-
* @returns A new inverted matrix
|
|
159
|
-
* @throws Will log an error if the matrix is not invertible (determinant is 0)
|
|
175
|
+
* @returns A new inverted matrix, or the identity matrix if the input is singular
|
|
160
176
|
*/
|
|
161
|
-
static
|
|
177
|
+
static _invert(mat: IMatrix33, type: FloatTypedArrayConstructor): IMatrix33;
|
|
178
|
+
/**
|
|
179
|
+
* Attempts to calculate the inverse of the given matrix and stores the
|
|
180
|
+
* result in the output matrix. The output matrix is left untouched when the
|
|
181
|
+
* input is numerically singular.
|
|
182
|
+
*
|
|
183
|
+
* @param mat - The matrix to invert
|
|
184
|
+
* @param outMat - The output mutable matrix to store the result
|
|
185
|
+
* @returns True if the inversion succeeded, false if the matrix is singular
|
|
186
|
+
*/
|
|
187
|
+
static _tryInvertTo(mat: IMatrix33, outMat: IMutableMatrix33): boolean;
|
|
162
188
|
/**
|
|
163
189
|
* Calculates the inverse of the given matrix and stores the result in the output matrix.
|
|
190
|
+
*
|
|
191
|
+
* If the matrix is numerically singular, the output matrix is set to the
|
|
192
|
+
* identity matrix instead of being filled with `Infinity`/`NaN`.
|
|
193
|
+
* Use {@link Matrix33.tryInvertTo} when the caller needs to detect the failure.
|
|
194
|
+
*
|
|
164
195
|
* @param mat - The matrix to invert
|
|
165
196
|
* @param outMat - The output mutable matrix to store the result
|
|
166
|
-
* @returns The output matrix containing the inverted matrix
|
|
167
|
-
* @throws Will log an error if the matrix is not invertible (determinant is 0)
|
|
197
|
+
* @returns The output matrix containing the inverted matrix, or the identity matrix if the input is singular
|
|
168
198
|
*/
|
|
169
|
-
static
|
|
199
|
+
static _invertTo(mat: IMatrix33, outMat: IMutableMatrix33): IMutableMatrix33;
|
|
170
200
|
/**
|
|
171
201
|
* Creates a rotation matrix around the X-axis.
|
|
172
202
|
* @param radian - The rotation angle in radians
|
|
173
203
|
* @returns A new rotation matrix
|
|
174
204
|
*/
|
|
175
|
-
static
|
|
205
|
+
static _rotateX(radian: number, type: FloatTypedArrayConstructor): IMatrix33;
|
|
176
206
|
/**
|
|
177
207
|
* Creates a rotation matrix around the Y-axis.
|
|
178
208
|
* @param radian - The rotation angle in radians
|
|
179
209
|
* @returns A new rotation matrix
|
|
180
210
|
*/
|
|
181
|
-
static
|
|
211
|
+
static _rotateY(radian: number, type: FloatTypedArrayConstructor): IMatrix33;
|
|
182
212
|
/**
|
|
183
213
|
* Creates a rotation matrix around the Z-axis.
|
|
184
214
|
* @param radian - The rotation angle in radians
|
|
185
215
|
* @returns A new rotation matrix
|
|
186
216
|
*/
|
|
187
|
-
static
|
|
217
|
+
static _rotateZ(radian: number, type: FloatTypedArrayConstructor): IMatrix33;
|
|
188
218
|
/**
|
|
189
219
|
* Creates a rotation matrix from Euler angles in XYZ order.
|
|
190
220
|
* @param x - Rotation around X-axis in radians
|
|
@@ -192,26 +222,26 @@ export declare class Matrix33 extends AbstractMatrix implements IMatrix, IMatrix
|
|
|
192
222
|
* @param z - Rotation around Z-axis in radians
|
|
193
223
|
* @returns A new rotation matrix representing the combined rotations
|
|
194
224
|
*/
|
|
195
|
-
static
|
|
225
|
+
static _rotateXYZ(x: number, y: number, z: number, type: FloatTypedArrayConstructor): IMatrix33;
|
|
196
226
|
/**
|
|
197
227
|
* Creates a rotation matrix from a Vector3 containing Euler angles.
|
|
198
228
|
* @param vec - Vector3 containing rotation angles (x, y, z) in radians
|
|
199
229
|
* @returns A new rotation matrix
|
|
200
230
|
*/
|
|
201
|
-
static
|
|
231
|
+
static _rotate(vec: IVector3, type: FloatTypedArrayConstructor): IMatrix33;
|
|
202
232
|
/**
|
|
203
233
|
* Creates a scaling matrix.
|
|
204
234
|
* @param vec - Vector3 containing scale factors for each axis
|
|
205
235
|
* @returns A new scaling matrix
|
|
206
236
|
*/
|
|
207
|
-
static
|
|
237
|
+
static _scale(vec: IVector3, type: FloatTypedArrayConstructor): IMatrix33;
|
|
208
238
|
/**
|
|
209
239
|
* Multiplies two matrices together.
|
|
210
240
|
* @param l_mat - The left matrix
|
|
211
241
|
* @param r_mat - The right matrix
|
|
212
242
|
* @returns A new matrix representing l_mat * r_mat
|
|
213
243
|
*/
|
|
214
|
-
static
|
|
244
|
+
static _multiply(l_mat: IMatrix33, r_mat: IMatrix33, type: FloatTypedArrayConstructor): IMatrix33;
|
|
215
245
|
/**
|
|
216
246
|
* Multiplies two matrices and stores the result in an output matrix.
|
|
217
247
|
* @param l_mat - The left matrix
|
|
@@ -219,7 +249,7 @@ export declare class Matrix33 extends AbstractMatrix implements IMatrix, IMatrix
|
|
|
219
249
|
* @param outMat - The output mutable matrix to store the result
|
|
220
250
|
* @returns The output matrix containing l_mat * r_mat
|
|
221
251
|
*/
|
|
222
|
-
static
|
|
252
|
+
static _multiplyTo(l_mat: IMatrix33, r_mat: IMatrix33, outMat: IMutableMatrix33): IMutableMatrix33;
|
|
223
253
|
/**
|
|
224
254
|
* Converts the matrix to a human-readable string representation.
|
|
225
255
|
* @returns A formatted string showing the matrix in 3x3 layout
|
|
@@ -314,7 +344,7 @@ export declare class Matrix33 extends AbstractMatrix implements IMatrix, IMatrix
|
|
|
314
344
|
* @param m22 - Element at row 2, column 2
|
|
315
345
|
* @returns A new Matrix33 instance
|
|
316
346
|
*/
|
|
317
|
-
static
|
|
347
|
+
static _fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number, type: FloatTypedArrayConstructor): IMatrix33;
|
|
318
348
|
/**
|
|
319
349
|
* Creates a Matrix33 from 9 values in column-major order.
|
|
320
350
|
* @param m00 - Element at row 0, column 0
|
|
@@ -328,65 +358,203 @@ export declare class Matrix33 extends AbstractMatrix implements IMatrix, IMatrix
|
|
|
328
358
|
* @param m22 - Element at row 2, column 2
|
|
329
359
|
* @returns A new Matrix33 instance
|
|
330
360
|
*/
|
|
331
|
-
static
|
|
361
|
+
static _fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number, type: FloatTypedArrayConstructor): IMatrix33;
|
|
332
362
|
/**
|
|
333
363
|
* Creates a Matrix33 from the upper-left 3x3 portion of a Matrix44.
|
|
334
364
|
* @param mat - The Matrix44 to extract from
|
|
335
365
|
* @returns A new Matrix33 instance
|
|
336
366
|
*/
|
|
337
|
-
static
|
|
367
|
+
static _fromCopyMatrix44(mat: IMatrix44, type: FloatTypedArrayConstructor): IMatrix33;
|
|
338
368
|
/**
|
|
339
369
|
* Creates a Matrix33 using the provided Float32Array directly (no copy).
|
|
340
370
|
* @param float32Array - The Float32Array in column-major order
|
|
341
371
|
* @returns A new Matrix33 instance
|
|
342
372
|
*/
|
|
343
|
-
static
|
|
373
|
+
static _fromTypedArrayColumnMajor(array: TypedArray, type: FloatTypedArrayConstructor): IMatrix33;
|
|
344
374
|
/**
|
|
345
375
|
* Creates a Matrix33 by copying from a Float32Array in column-major order.
|
|
346
376
|
* @param float32Array - The Float32Array to copy from
|
|
347
377
|
* @returns A new Matrix33 instance
|
|
348
378
|
*/
|
|
349
|
-
static
|
|
379
|
+
static _fromCopyTypedArrayColumnMajor(array: TypedArray, type: FloatTypedArrayConstructor): IMatrix33;
|
|
350
380
|
/**
|
|
351
381
|
* Creates a Matrix33 by copying from a Float32Array in row-major order.
|
|
352
382
|
* @param array - The Float32Array in row-major order
|
|
353
383
|
* @returns A new Matrix33 instance
|
|
354
384
|
*/
|
|
355
|
-
static
|
|
385
|
+
static _fromCopyTypedArrayRowMajor(array: TypedArray, type: FloatTypedArrayConstructor): IMatrix33;
|
|
356
386
|
/**
|
|
357
387
|
* Creates a Matrix33 by copying from another IMatrix33.
|
|
358
388
|
* @param mat - The matrix to copy from
|
|
359
389
|
* @returns A new Matrix33 instance
|
|
360
390
|
*/
|
|
361
|
-
static
|
|
391
|
+
static _fromCopyMatrix33(mat: IMatrix33, type: FloatTypedArrayConstructor): IMatrix33;
|
|
362
392
|
/**
|
|
363
393
|
* Creates a Matrix33 from an Array9 in column-major order.
|
|
364
394
|
* @param array - The Array9 containing 9 numbers
|
|
365
395
|
* @returns A new Matrix33 instance
|
|
366
396
|
*/
|
|
367
|
-
static
|
|
397
|
+
static _fromCopyArray9ColumnMajor(array: Array9<number>, type: FloatTypedArrayConstructor): IMatrix33;
|
|
368
398
|
/**
|
|
369
399
|
* Creates a Matrix33 from a regular array in column-major order.
|
|
370
400
|
* @param array - The array containing at least 9 numbers
|
|
371
401
|
* @returns A new Matrix33 instance
|
|
372
402
|
*/
|
|
373
|
-
static
|
|
403
|
+
static _fromCopyArrayColumnMajor(array: Array<number>, type: FloatTypedArrayConstructor): IMatrix33;
|
|
374
404
|
/**
|
|
375
405
|
* Creates a Matrix33 from an Array9 in row-major order.
|
|
376
406
|
* @param array - The Array9 containing 9 numbers in row-major order
|
|
377
407
|
* @returns A new Matrix33 instance
|
|
378
408
|
*/
|
|
379
|
-
static
|
|
409
|
+
static _fromCopyArray9RowMajor(array: Array9<number>, type: FloatTypedArrayConstructor): IMatrix33;
|
|
380
410
|
/**
|
|
381
411
|
* Creates a Matrix33 from a regular array in row-major order.
|
|
382
412
|
* @param array - The array containing at least 9 numbers in row-major order
|
|
383
413
|
* @returns A new Matrix33 instance
|
|
384
414
|
*/
|
|
385
|
-
static
|
|
415
|
+
static _fromCopyArrayRowMajor(array: Array<number>, type: FloatTypedArrayConstructor): IMatrix33;
|
|
386
416
|
/**
|
|
387
417
|
* Creates a Matrix33 from a quaternion representing rotation.
|
|
388
418
|
* @param q - The quaternion to convert
|
|
389
419
|
* @returns A new Matrix33 representing the rotation
|
|
390
420
|
*/
|
|
391
|
-
static
|
|
421
|
+
static _fromCopyQuaternion(q: IQuaternion, type: FloatTypedArrayConstructor): IMatrix33;
|
|
392
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Immutable 3x3 matrix with 32-bit float components.
|
|
425
|
+
* This is the standard precision implementation for normal matrices and other 3D math.
|
|
426
|
+
*/
|
|
427
|
+
export declare class Matrix33 extends Matrix33_<Float32ArrayConstructor> {
|
|
428
|
+
/**
|
|
429
|
+
* Creates a new Matrix33 instance.
|
|
430
|
+
* @param m - The typed array containing the matrix components
|
|
431
|
+
*/
|
|
432
|
+
constructor(m: TypedArray);
|
|
433
|
+
/** Creates a zero matrix. */
|
|
434
|
+
static zero(): Matrix33;
|
|
435
|
+
/** Creates an identity matrix (optimized IdentityMatrix33 instance). */
|
|
436
|
+
static identity(): IMatrix33;
|
|
437
|
+
/** Creates a dummy matrix with an empty array. */
|
|
438
|
+
static dummy(): Matrix33;
|
|
439
|
+
/** Creates the transpose of the given matrix. */
|
|
440
|
+
static transpose(mat: IMatrix33): Matrix33;
|
|
441
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
442
|
+
static tryInvert(mat: IMatrix33): Matrix33 | null;
|
|
443
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
444
|
+
static invert(mat: IMatrix33): Matrix33;
|
|
445
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
446
|
+
static tryInvertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): boolean;
|
|
447
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
448
|
+
static invertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): T;
|
|
449
|
+
/** Creates a rotation matrix around the X-axis. */
|
|
450
|
+
static rotateX(radian: number): Matrix33;
|
|
451
|
+
/** Creates a rotation matrix around the Y-axis. */
|
|
452
|
+
static rotateY(radian: number): Matrix33;
|
|
453
|
+
/** Creates a rotation matrix around the Z-axis. */
|
|
454
|
+
static rotateZ(radian: number): Matrix33;
|
|
455
|
+
/** Creates a rotation matrix from Euler angles in XYZ order. */
|
|
456
|
+
static rotateXYZ(x: number, y: number, z: number): Matrix33;
|
|
457
|
+
/** Creates a rotation matrix from a Vector3 containing Euler angles. */
|
|
458
|
+
static rotate(vec: IVector3): Matrix33;
|
|
459
|
+
/** Creates a scaling matrix. */
|
|
460
|
+
static scale(vec: IVector3): Matrix33;
|
|
461
|
+
/** Multiplies two matrices. */
|
|
462
|
+
static multiply(l_mat: IMatrix33, r_mat: IMatrix33): Matrix33;
|
|
463
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
464
|
+
static multiplyTo<T extends IMutableMatrix33>(l_mat: IMatrix33, r_mat: IMatrix33, outMat: T): T;
|
|
465
|
+
/** Creates a matrix from row-major components. */
|
|
466
|
+
static fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): Matrix33;
|
|
467
|
+
/** Creates a matrix from column-major components. */
|
|
468
|
+
static fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): Matrix33;
|
|
469
|
+
/** Creates a matrix from the upper-left 3x3 portion of a 4x4 matrix. */
|
|
470
|
+
static fromCopyMatrix44(mat: IMatrix44): Matrix33;
|
|
471
|
+
/** Creates a matrix that directly uses the given Float32Array. */
|
|
472
|
+
static fromFloat32ArrayColumnMajor(array: Float32Array): Matrix33;
|
|
473
|
+
/** Creates a matrix by copying a Float32Array in column-major order. */
|
|
474
|
+
static fromCopyFloat32ArrayColumnMajor(array: Float32Array): Matrix33;
|
|
475
|
+
/** Creates a matrix by copying a Float32Array in row-major order. */
|
|
476
|
+
static fromCopyFloat32ArrayRowMajor(array: Float32Array): Matrix33;
|
|
477
|
+
/** Creates a matrix by copying another matrix. */
|
|
478
|
+
static fromCopyMatrix33(mat: IMatrix33): Matrix33;
|
|
479
|
+
/** Creates a matrix from a 9-element array in column-major order. */
|
|
480
|
+
static fromCopyArray9ColumnMajor(array: Array9<number>): Matrix33;
|
|
481
|
+
/** Creates a matrix from an array in column-major order. */
|
|
482
|
+
static fromCopyArrayColumnMajor(array: Array<number>): Matrix33;
|
|
483
|
+
/** Creates a matrix from a 9-element array in row-major order. */
|
|
484
|
+
static fromCopyArray9RowMajor(array: Array9<number>): Matrix33;
|
|
485
|
+
/** Creates a matrix from an array in row-major order. */
|
|
486
|
+
static fromCopyArrayRowMajor(array: Array<number>): Matrix33;
|
|
487
|
+
/** Creates a matrix from a quaternion representing a rotation. */
|
|
488
|
+
static fromCopyQuaternion(q: IQuaternion): Matrix33;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Immutable 3x3 matrix with 64-bit float components.
|
|
492
|
+
* Use this implementation when higher numerical precision is required.
|
|
493
|
+
*/
|
|
494
|
+
export declare class Matrix33D extends Matrix33_<Float64ArrayConstructor> {
|
|
495
|
+
/**
|
|
496
|
+
* Creates a new Matrix33D instance.
|
|
497
|
+
* @param m - The typed array containing the matrix components
|
|
498
|
+
*/
|
|
499
|
+
private constructor();
|
|
500
|
+
/** Creates a zero matrix. */
|
|
501
|
+
static zero(): Matrix33D;
|
|
502
|
+
/** Creates an identity matrix. */
|
|
503
|
+
static identity(): Matrix33D;
|
|
504
|
+
/** Creates a dummy matrix with an empty array. */
|
|
505
|
+
static dummy(): Matrix33D;
|
|
506
|
+
/** Creates the transpose of the given matrix. */
|
|
507
|
+
static transpose(mat: IMatrix33): Matrix33D;
|
|
508
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
509
|
+
static tryInvert(mat: IMatrix33): Matrix33D | null;
|
|
510
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
511
|
+
static invert(mat: IMatrix33): Matrix33D;
|
|
512
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
513
|
+
static tryInvertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): boolean;
|
|
514
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
515
|
+
static invertTo<T extends IMutableMatrix33>(mat: IMatrix33, outMat: T): T;
|
|
516
|
+
/** Creates a rotation matrix around the X-axis. */
|
|
517
|
+
static rotateX(radian: number): Matrix33D;
|
|
518
|
+
/** Creates a rotation matrix around the Y-axis. */
|
|
519
|
+
static rotateY(radian: number): Matrix33D;
|
|
520
|
+
/** Creates a rotation matrix around the Z-axis. */
|
|
521
|
+
static rotateZ(radian: number): Matrix33D;
|
|
522
|
+
/** Creates a rotation matrix from Euler angles in XYZ order. */
|
|
523
|
+
static rotateXYZ(x: number, y: number, z: number): Matrix33D;
|
|
524
|
+
/** Creates a rotation matrix from a Vector3 containing Euler angles. */
|
|
525
|
+
static rotate(vec: IVector3): Matrix33D;
|
|
526
|
+
/** Creates a scaling matrix. */
|
|
527
|
+
static scale(vec: IVector3): Matrix33D;
|
|
528
|
+
/** Multiplies two matrices. */
|
|
529
|
+
static multiply(l_mat: IMatrix33, r_mat: IMatrix33): Matrix33D;
|
|
530
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
531
|
+
static multiplyTo<T extends IMutableMatrix33>(l_mat: IMatrix33, r_mat: IMatrix33, outMat: T): T;
|
|
532
|
+
/** Creates a matrix from row-major components. */
|
|
533
|
+
static fromCopy9RowMajor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): Matrix33D;
|
|
534
|
+
/** Creates a matrix from column-major components. */
|
|
535
|
+
static fromCopy9ColumnMajor(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): Matrix33D;
|
|
536
|
+
/** Creates a matrix from the upper-left 3x3 portion of a 4x4 matrix. */
|
|
537
|
+
static fromCopyMatrix44(mat: IMatrix44): Matrix33D;
|
|
538
|
+
/** Creates a matrix that directly uses the given Float64Array. */
|
|
539
|
+
static fromFloat64ArrayColumnMajor(array: Float64Array): Matrix33D;
|
|
540
|
+
/** Creates a matrix by copying a Float64Array in column-major order. */
|
|
541
|
+
static fromCopyFloat64ArrayColumnMajor(array: Float64Array): Matrix33D;
|
|
542
|
+
/** Creates a matrix by copying a Float64Array in row-major order. */
|
|
543
|
+
static fromCopyFloat64ArrayRowMajor(array: Float64Array): Matrix33D;
|
|
544
|
+
/** Creates a matrix by copying another matrix. */
|
|
545
|
+
static fromCopyMatrix33(mat: IMatrix33): Matrix33D;
|
|
546
|
+
/** Creates a matrix from a 9-element array in column-major order. */
|
|
547
|
+
static fromCopyArray9ColumnMajor(array: Array9<number>): Matrix33D;
|
|
548
|
+
/** Creates a matrix from an array in column-major order. */
|
|
549
|
+
static fromCopyArrayColumnMajor(array: Array<number>): Matrix33D;
|
|
550
|
+
/** Creates a matrix from a 9-element array in row-major order. */
|
|
551
|
+
static fromCopyArray9RowMajor(array: Array9<number>): Matrix33D;
|
|
552
|
+
/** Creates a matrix from an array in row-major order. */
|
|
553
|
+
static fromCopyArrayRowMajor(array: Array<number>): Matrix33D;
|
|
554
|
+
/** Creates a matrix from a quaternion representing a rotation. */
|
|
555
|
+
static fromCopyQuaternion(q: IQuaternion): Matrix33D;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
559
|
+
*/
|
|
560
|
+
export { Matrix33 as Matrix33F };
|