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,8 +1,8 @@
|
|
|
1
|
-
import type { Array16, Index } from '../../types/CommonTypes';
|
|
1
|
+
import type { Array16, ArrayType, FloatTypedArrayConstructor, Index, TypedArray } from '../../types/CommonTypes';
|
|
2
2
|
import type { IMatrix33, IMatrix44, IMutableMatrix, IMutableMatrix44 } from './IMatrix';
|
|
3
3
|
import type { IQuaternion } from './IQuaternion';
|
|
4
4
|
import type { IVector3 } from './IVector';
|
|
5
|
-
import {
|
|
5
|
+
import { Matrix44_ } from './Matrix44';
|
|
6
6
|
import type { MutableVector3 } from './MutableVector3';
|
|
7
7
|
/**
|
|
8
8
|
* A mutable 4x4 matrix class that extends the immutable Matrix44 class.
|
|
@@ -18,7 +18,15 @@ import type { MutableVector3 } from './MutableVector3';
|
|
|
18
18
|
* matrix.rotateY(Math.PI / 4);
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export declare class
|
|
21
|
+
export declare class MutableMatrix44_<T extends FloatTypedArrayConstructor> extends Matrix44_<T> implements IMutableMatrix, IMutableMatrix44 {
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new MutableMatrix44_ instance.
|
|
24
|
+
* @param m - The typed array containing the matrix components
|
|
25
|
+
* @param options - Configuration object containing the typed array constructor
|
|
26
|
+
*/
|
|
27
|
+
constructor(m: TypedArray, options: {
|
|
28
|
+
type: T;
|
|
29
|
+
});
|
|
22
30
|
/**
|
|
23
31
|
* Sets the value at position (0,0) in the matrix.
|
|
24
32
|
*
|
|
@@ -253,97 +261,6 @@ export declare class MutableMatrix44 extends Matrix44 implements IMutableMatrix,
|
|
|
253
261
|
* @returns The string 'MutableMatrix44'
|
|
254
262
|
*/
|
|
255
263
|
get className(): string;
|
|
256
|
-
/**
|
|
257
|
-
* Creates a zero matrix (all elements are 0).
|
|
258
|
-
*
|
|
259
|
-
* @returns A new MutableMatrix44 instance with all elements set to 0
|
|
260
|
-
*/
|
|
261
|
-
static zero(): MutableMatrix44;
|
|
262
|
-
/**
|
|
263
|
-
* Creates an identity matrix.
|
|
264
|
-
*
|
|
265
|
-
* @returns A new MutableMatrix44 instance representing the 4x4 identity matrix
|
|
266
|
-
*/
|
|
267
|
-
static identity(): MutableMatrix44;
|
|
268
|
-
/**
|
|
269
|
-
* Creates a dummy matrix (typically used as a placeholder).
|
|
270
|
-
*
|
|
271
|
-
* @returns A new MutableMatrix44 instance representing a dummy matrix
|
|
272
|
-
*/
|
|
273
|
-
static dummy(): MutableMatrix44;
|
|
274
|
-
/**
|
|
275
|
-
* Creates a transposed matrix from the given matrix.
|
|
276
|
-
*
|
|
277
|
-
* @param mat - The matrix to transpose
|
|
278
|
-
* @returns A new MutableMatrix44 instance that is the transpose of the input matrix
|
|
279
|
-
*/
|
|
280
|
-
static transpose(mat: IMatrix44): MutableMatrix44;
|
|
281
|
-
/**
|
|
282
|
-
* Creates an inverted matrix from the given matrix.
|
|
283
|
-
*
|
|
284
|
-
* @param mat - The matrix to invert
|
|
285
|
-
* @returns A new MutableMatrix44 instance that is the inverse of the input matrix
|
|
286
|
-
*/
|
|
287
|
-
static invert(mat: IMatrix44): MutableMatrix44;
|
|
288
|
-
/**
|
|
289
|
-
* Creates a translation matrix from the given vector.
|
|
290
|
-
*
|
|
291
|
-
* @param vec - The translation vector
|
|
292
|
-
* @returns A new MutableMatrix44 instance representing the translation transformation
|
|
293
|
-
*/
|
|
294
|
-
static translate(vec: IVector3): MutableMatrix44;
|
|
295
|
-
/**
|
|
296
|
-
* Creates a rotation matrix around the X-axis.
|
|
297
|
-
*
|
|
298
|
-
* @param radian - The rotation angle in radians
|
|
299
|
-
* @returns A new MutableMatrix44 instance representing the X-axis rotation
|
|
300
|
-
*/
|
|
301
|
-
static rotateX(radian: number): MutableMatrix44;
|
|
302
|
-
/**
|
|
303
|
-
* Creates a rotation matrix around the Y-axis.
|
|
304
|
-
*
|
|
305
|
-
* @param radian - The rotation angle in radians
|
|
306
|
-
* @returns A new MutableMatrix44 instance representing the Y-axis rotation
|
|
307
|
-
*/
|
|
308
|
-
static rotateY(radian: number): MutableMatrix44;
|
|
309
|
-
/**
|
|
310
|
-
* Creates a rotation matrix around the Z-axis.
|
|
311
|
-
*
|
|
312
|
-
* @param radian - The rotation angle in radians
|
|
313
|
-
* @returns A new MutableMatrix44 instance representing the Z-axis rotation
|
|
314
|
-
*/
|
|
315
|
-
static rotateZ(radian: number): MutableMatrix44;
|
|
316
|
-
/**
|
|
317
|
-
* Creates a rotation matrix with rotations around X, Y, and Z axes in that order.
|
|
318
|
-
*
|
|
319
|
-
* @param x - Rotation angle around X-axis in radians
|
|
320
|
-
* @param y - Rotation angle around Y-axis in radians
|
|
321
|
-
* @param z - Rotation angle around Z-axis in radians
|
|
322
|
-
* @returns A new MutableMatrix44 instance representing the combined rotation
|
|
323
|
-
*/
|
|
324
|
-
static rotateXYZ(x: number, y: number, z: number): MutableMatrix44;
|
|
325
|
-
/**
|
|
326
|
-
* Creates a rotation matrix from a vector containing X, Y, Z rotation angles.
|
|
327
|
-
*
|
|
328
|
-
* @param vec - Vector containing rotation angles (x, y, z) in radians
|
|
329
|
-
* @returns A new MutableMatrix44 instance representing the rotation transformation
|
|
330
|
-
*/
|
|
331
|
-
static rotate(vec: IVector3): MutableMatrix44;
|
|
332
|
-
/**
|
|
333
|
-
* Creates a scaling matrix from the given vector.
|
|
334
|
-
*
|
|
335
|
-
* @param vec - The scaling factors for X, Y, and Z axes
|
|
336
|
-
* @returns A new MutableMatrix44 instance representing the scaling transformation
|
|
337
|
-
*/
|
|
338
|
-
static scale(vec: IVector3): MutableMatrix44;
|
|
339
|
-
/**
|
|
340
|
-
* Multiplies two matrices and returns the result as a new matrix.
|
|
341
|
-
*
|
|
342
|
-
* @param l_mat - The left matrix in the multiplication
|
|
343
|
-
* @param r_mat - The right matrix in the multiplication
|
|
344
|
-
* @returns A new MutableMatrix44 instance representing the product l_mat * r_mat
|
|
345
|
-
*/
|
|
346
|
-
static multiply(l_mat: IMatrix44, r_mat: IMatrix44): MutableMatrix44;
|
|
347
264
|
/**
|
|
348
265
|
* Creates a copy of this matrix.
|
|
349
266
|
*
|
|
@@ -380,7 +297,7 @@ export declare class MutableMatrix44 extends Matrix44 implements IMutableMatrix,
|
|
|
380
297
|
*
|
|
381
298
|
* @returns The internal Float32Array with matrix values in column-major order
|
|
382
299
|
*/
|
|
383
|
-
raw():
|
|
300
|
+
raw(): TypedArray;
|
|
384
301
|
/**
|
|
385
302
|
* Sets a value at the specified row and column position.
|
|
386
303
|
*
|
|
@@ -439,9 +356,21 @@ export declare class MutableMatrix44 extends Matrix44 implements IMutableMatrix,
|
|
|
439
356
|
* @returns This matrix instance for method chaining
|
|
440
357
|
*/
|
|
441
358
|
transpose(): MutableMatrix44;
|
|
359
|
+
/**
|
|
360
|
+
* Attempts to invert this matrix in place.
|
|
361
|
+
*
|
|
362
|
+
* The matrix is left unchanged when it is numerically singular, which
|
|
363
|
+
* lets callers keep the previous valid value.
|
|
364
|
+
*
|
|
365
|
+
* @returns True if the inversion succeeded, false if the matrix is singular
|
|
366
|
+
*/
|
|
367
|
+
tryInvert(): boolean;
|
|
442
368
|
/**
|
|
443
369
|
* Inverts this matrix in place.
|
|
444
|
-
*
|
|
370
|
+
*
|
|
371
|
+
* If the matrix is numerically singular, it is set to the identity matrix
|
|
372
|
+
* instead of being filled with `Infinity`/`NaN`.
|
|
373
|
+
* Use {@link MutableMatrix44.tryInvert} when the caller needs to detect the failure.
|
|
445
374
|
*
|
|
446
375
|
* @returns This matrix instance for method chaining
|
|
447
376
|
*/
|
|
@@ -543,103 +472,150 @@ export declare class MutableMatrix44 extends Matrix44 implements IMutableMatrix,
|
|
|
543
472
|
* @returns This matrix instance for method chaining
|
|
544
473
|
*/
|
|
545
474
|
fromQuaternion(quat: IQuaternion): MutableMatrix44;
|
|
475
|
+
}
|
|
476
|
+
export declare class MutableMatrix44 extends MutableMatrix44_<Float32ArrayConstructor> {
|
|
546
477
|
/**
|
|
547
|
-
* Creates a
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
* @param m00-m33 - Matrix elements in row-major order
|
|
551
|
-
* @returns A new MutableMatrix44 instance
|
|
478
|
+
* Creates a new MutableMatrix44 instance.
|
|
479
|
+
* @param m - The typed array containing the matrix components
|
|
552
480
|
*/
|
|
481
|
+
constructor(m: TypedArray);
|
|
482
|
+
/** Creates a zero matrix. */
|
|
483
|
+
static zero(): MutableMatrix44;
|
|
484
|
+
/** Creates an identity matrix (optimized IdentityMatrix44 instance). */
|
|
485
|
+
static identity(): MutableMatrix44;
|
|
486
|
+
/** Creates a dummy matrix with an empty array. */
|
|
487
|
+
static dummy(): MutableMatrix44;
|
|
488
|
+
/** Creates the transpose of the given matrix. */
|
|
489
|
+
static transpose(mat: IMatrix44): MutableMatrix44;
|
|
490
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
491
|
+
static tryInvert(mat: IMatrix44): MutableMatrix44 | null;
|
|
492
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
493
|
+
static invert(mat: IMatrix44): MutableMatrix44;
|
|
494
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
495
|
+
static tryInvertTo<T extends IMutableMatrix44>(mat: IMatrix44, outMat: T): boolean;
|
|
496
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
497
|
+
static invertTo<T extends IMutableMatrix44>(mat: IMatrix44, outMat: T): T;
|
|
498
|
+
/** Creates a translation matrix. */
|
|
499
|
+
static translate(vec: IVector3): MutableMatrix44;
|
|
500
|
+
/** Creates a rotation matrix around the X-axis. */
|
|
501
|
+
static rotateX(radian: number): MutableMatrix44;
|
|
502
|
+
/** Creates a rotation matrix around the Y-axis. */
|
|
503
|
+
static rotateY(radian: number): MutableMatrix44;
|
|
504
|
+
/** Creates a rotation matrix around the Z-axis. */
|
|
505
|
+
static rotateZ(radian: number): MutableMatrix44;
|
|
506
|
+
/** Creates a rotation matrix from Euler angles in XYZ order. */
|
|
507
|
+
static rotateXYZ(x: number, y: number, z: number): MutableMatrix44;
|
|
508
|
+
/** Creates a rotation matrix from a vector containing Euler angles. */
|
|
509
|
+
static rotate(vec: IVector3): MutableMatrix44;
|
|
510
|
+
/** Creates a scaling matrix. */
|
|
511
|
+
static scale(vec: IVector3): MutableMatrix44;
|
|
512
|
+
/** Multiplies two matrices. */
|
|
513
|
+
static multiply(l_mat: IMatrix44, r_mat: IMatrix44): MutableMatrix44;
|
|
514
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
515
|
+
static multiplyTo<T extends IMutableMatrix44>(l_mat: IMatrix44, r_mat: IMatrix44, outMat: T): T;
|
|
516
|
+
/** Multiplies a matrix with typed array data and stores the result in outMat. */
|
|
517
|
+
static multiplyTypedArrayTo<T extends IMutableMatrix44>(l_mat: IMatrix44, r_array: ArrayType, outMat: T, offsetAsComposition: number): T;
|
|
518
|
+
/** Creates a rotation matrix from a quaternion and stores it in outMat. */
|
|
519
|
+
static fromQuaternionTo<T extends IMutableMatrix44>(quat: IQuaternion, outMat: T): T;
|
|
520
|
+
/** Creates a matrix from row-major components. */
|
|
553
521
|
static fromCopy16RowMajor(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): MutableMatrix44;
|
|
554
|
-
/**
|
|
555
|
-
* Creates a matrix from 16 values in column-major order.
|
|
556
|
-
*
|
|
557
|
-
* @param m00-m33 - Matrix elements in column-major order
|
|
558
|
-
* @returns A new MutableMatrix44 instance
|
|
559
|
-
*/
|
|
522
|
+
/** Creates a matrix from column-major components. */
|
|
560
523
|
static fromCopy16ColumnMajor(m00: number, m10: number, m20: number, m30: number, m01: number, m11: number, m21: number, m31: number, m02: number, m12: number, m22: number, m32: number, m03: number, m13: number, m23: number, m33: number): MutableMatrix44;
|
|
561
|
-
/**
|
|
562
|
-
* Creates a new MutableMatrix44 from an existing Matrix44 instance.
|
|
563
|
-
* This creates a copy of the matrix data, so modifications to the new matrix
|
|
564
|
-
* will not affect the original.
|
|
565
|
-
*
|
|
566
|
-
* @param mat - The source Matrix44 to copy from
|
|
567
|
-
* @returns A new MutableMatrix44 instance with copied data
|
|
568
|
-
*/
|
|
524
|
+
/** Creates a matrix by copying another matrix. */
|
|
569
525
|
static fromCopyMatrix44(mat: IMatrix44): MutableMatrix44;
|
|
570
|
-
/**
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
* @param float32Array - A Float32Array containing 16 elements in column-major order
|
|
576
|
-
* @returns A new MutableMatrix44 instance using the provided array
|
|
577
|
-
*/
|
|
578
|
-
static fromFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix44;
|
|
579
|
-
/**
|
|
580
|
-
* Creates a new MutableMatrix44 from a Float32Array in column-major order.
|
|
581
|
-
* This method creates a copy of the input array, so modifications to the matrix
|
|
582
|
-
* will not affect the original array.
|
|
583
|
-
*
|
|
584
|
-
* @param float32Array - A Float32Array containing 16 elements in column-major order
|
|
585
|
-
* @returns A new MutableMatrix44 instance with copied data
|
|
586
|
-
*/
|
|
587
|
-
static fromCopyFloat32ArrayColumnMajor(float32Array: Float32Array): MutableMatrix44;
|
|
588
|
-
/**
|
|
589
|
-
* Creates a new MutableMatrix44 from a Float32Array in row-major order.
|
|
590
|
-
* The input data is converted from row-major to column-major order during creation.
|
|
591
|
-
*
|
|
592
|
-
* @param array - A Float32Array containing 16 elements in row-major order
|
|
593
|
-
* @returns A new MutableMatrix44 instance with data converted to column-major order
|
|
594
|
-
*/
|
|
526
|
+
/** Creates a matrix that directly uses the given Float32Array. */
|
|
527
|
+
static fromFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix44;
|
|
528
|
+
/** Creates a matrix by copying a Float32Array in column-major order. */
|
|
529
|
+
static fromCopyFloat32ArrayColumnMajor(array: Float32Array): MutableMatrix44;
|
|
530
|
+
/** Creates a matrix by copying a Float32Array in row-major order. */
|
|
595
531
|
static fromCopyFloat32ArrayRowMajor(array: Float32Array): MutableMatrix44;
|
|
596
|
-
/**
|
|
597
|
-
* Creates a new MutableMatrix44 from a 3x3 matrix.
|
|
598
|
-
* The 3x3 matrix is embedded in the upper-left corner of the 4x4 matrix,
|
|
599
|
-
* with the bottom row and right column set to [0, 0, 0, 1].
|
|
600
|
-
*
|
|
601
|
-
* @param mat - The source 3x3 matrix to convert
|
|
602
|
-
* @returns A new MutableMatrix44 instance with the 3x3 matrix embedded
|
|
603
|
-
*/
|
|
532
|
+
/** Creates a matrix from a 3x3 matrix embedded in the upper-left corner. */
|
|
604
533
|
static fromCopyMatrix33(mat: IMatrix33): MutableMatrix44;
|
|
605
|
-
/**
|
|
606
|
-
* Creates a new MutableMatrix44 from an Array16 in column-major order.
|
|
607
|
-
* This method copies the array data into a new Float32Array.
|
|
608
|
-
*
|
|
609
|
-
* @param array - An Array16 containing 16 elements in column-major order
|
|
610
|
-
* @returns A new MutableMatrix44 instance with copied data
|
|
611
|
-
*/
|
|
534
|
+
/** Creates a matrix from a 16-element array in column-major order. */
|
|
612
535
|
static fromCopyArray16ColumnMajor(array: Array16<number>): MutableMatrix44;
|
|
613
|
-
/**
|
|
614
|
-
* Creates a new MutableMatrix44 from a regular array in column-major order.
|
|
615
|
-
* Only the first 16 elements are used if the array is larger.
|
|
616
|
-
*
|
|
617
|
-
* @param array - An array containing at least 16 elements in column-major order
|
|
618
|
-
* @returns A new MutableMatrix44 instance with copied data
|
|
619
|
-
*/
|
|
536
|
+
/** Creates a matrix from an array in column-major order. */
|
|
620
537
|
static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix44;
|
|
621
|
-
/**
|
|
622
|
-
* Creates a new MutableMatrix44 from an Array16 in row-major order.
|
|
623
|
-
* The input data is converted from row-major to column-major order during creation.
|
|
624
|
-
*
|
|
625
|
-
* @param array - An Array16 containing 16 elements in row-major order
|
|
626
|
-
* @returns A new MutableMatrix44 instance with data converted to column-major order
|
|
627
|
-
*/
|
|
538
|
+
/** Creates a matrix from a 16-element array in row-major order. */
|
|
628
539
|
static fromCopyArray16RowMajor(array: Array16<number>): MutableMatrix44;
|
|
629
|
-
/**
|
|
630
|
-
* Creates a new MutableMatrix44 from a regular array in row-major order.
|
|
631
|
-
* The input data is converted from row-major to column-major order during creation.
|
|
632
|
-
* Only the first 16 elements are used if the array is larger.
|
|
633
|
-
*
|
|
634
|
-
* @param array - An array containing at least 16 elements in row-major order
|
|
635
|
-
* @returns A new MutableMatrix44 instance with data converted to column-major order
|
|
636
|
-
*/
|
|
540
|
+
/** Creates a matrix from an array in row-major order. */
|
|
637
541
|
static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix44;
|
|
638
|
-
/**
|
|
639
|
-
* Creates a matrix from a quaternion.
|
|
640
|
-
*
|
|
641
|
-
* @param q - The quaternion to convert
|
|
642
|
-
* @returns A new MutableMatrix44 instance representing the rotation
|
|
643
|
-
*/
|
|
542
|
+
/** Creates a rotation matrix from a quaternion. */
|
|
644
543
|
static fromCopyQuaternion(q: IQuaternion): MutableMatrix44;
|
|
645
544
|
}
|
|
545
|
+
/**
|
|
546
|
+
* Immutable 4x4 matrix with 64-bit float components.
|
|
547
|
+
* Use this implementation when higher numerical precision is required.
|
|
548
|
+
*/
|
|
549
|
+
export declare class MutableMatrix44D extends MutableMatrix44_<Float64ArrayConstructor> {
|
|
550
|
+
/**
|
|
551
|
+
* Creates a new MutableMatrix44D instance.
|
|
552
|
+
* @param m - The typed array containing the matrix components
|
|
553
|
+
*/
|
|
554
|
+
private constructor();
|
|
555
|
+
/** Creates a zero matrix. */
|
|
556
|
+
static zero(): MutableMatrix44D;
|
|
557
|
+
/** Creates an identity matrix. */
|
|
558
|
+
static identity(): MutableMatrix44D;
|
|
559
|
+
/** Creates a dummy matrix with an empty array. */
|
|
560
|
+
static dummy(): MutableMatrix44D;
|
|
561
|
+
/** Creates the transpose of the given matrix. */
|
|
562
|
+
static transpose(mat: IMatrix44): MutableMatrix44D;
|
|
563
|
+
/** Attempts to invert the given matrix, returning null when it is singular. */
|
|
564
|
+
static tryInvert(mat: IMatrix44): MutableMatrix44D | null;
|
|
565
|
+
/** Creates the inverse of the given matrix (identity when singular). */
|
|
566
|
+
static invert(mat: IMatrix44): MutableMatrix44D;
|
|
567
|
+
/** Attempts to invert the given matrix into outMat. */
|
|
568
|
+
static tryInvertTo<T extends IMutableMatrix44>(mat: IMatrix44, outMat: T): boolean;
|
|
569
|
+
/** Inverts the given matrix into outMat (identity when singular). */
|
|
570
|
+
static invertTo<T extends IMutableMatrix44>(mat: IMatrix44, outMat: T): T;
|
|
571
|
+
/** Creates a translation matrix. */
|
|
572
|
+
static translate(vec: IVector3): MutableMatrix44D;
|
|
573
|
+
/** Creates a rotation matrix around the X-axis. */
|
|
574
|
+
static rotateX(radian: number): MutableMatrix44D;
|
|
575
|
+
/** Creates a rotation matrix around the Y-axis. */
|
|
576
|
+
static rotateY(radian: number): MutableMatrix44D;
|
|
577
|
+
/** Creates a rotation matrix around the Z-axis. */
|
|
578
|
+
static rotateZ(radian: number): MutableMatrix44D;
|
|
579
|
+
/** Creates a rotation matrix from Euler angles in XYZ order. */
|
|
580
|
+
static rotateXYZ(x: number, y: number, z: number): MutableMatrix44D;
|
|
581
|
+
/** Creates a rotation matrix from a vector containing Euler angles. */
|
|
582
|
+
static rotate(vec: IVector3): MutableMatrix44D;
|
|
583
|
+
/** Creates a scaling matrix. */
|
|
584
|
+
static scale(vec: IVector3): MutableMatrix44D;
|
|
585
|
+
/** Multiplies two matrices. */
|
|
586
|
+
static multiply(l_mat: IMatrix44, r_mat: IMatrix44): MutableMatrix44D;
|
|
587
|
+
/** Multiplies two matrices and stores the result in outMat. */
|
|
588
|
+
static multiplyTo<T extends IMutableMatrix44>(l_mat: IMatrix44, r_mat: IMatrix44, outMat: T): T;
|
|
589
|
+
/** Multiplies a matrix with typed array data and stores the result in outMat. */
|
|
590
|
+
static multiplyTypedArrayTo<T extends IMutableMatrix44>(l_mat: IMatrix44, r_array: ArrayType, outMat: T, offsetAsComposition: number): T;
|
|
591
|
+
/** Creates a rotation matrix from a quaternion and stores it in outMat. */
|
|
592
|
+
static fromQuaternionTo<T extends IMutableMatrix44>(quat: IQuaternion, outMat: T): T;
|
|
593
|
+
/** Creates a matrix from row-major components. */
|
|
594
|
+
static fromCopy16RowMajor(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): MutableMatrix44D;
|
|
595
|
+
/** Creates a matrix from column-major components. */
|
|
596
|
+
static fromCopy16ColumnMajor(m00: number, m10: number, m20: number, m30: number, m01: number, m11: number, m21: number, m31: number, m02: number, m12: number, m22: number, m32: number, m03: number, m13: number, m23: number, m33: number): MutableMatrix44D;
|
|
597
|
+
/** Creates a matrix by copying another matrix. */
|
|
598
|
+
static fromCopyMatrix44(mat: IMatrix44): MutableMatrix44D;
|
|
599
|
+
/** Creates a matrix that directly uses the given Float64Array. */
|
|
600
|
+
static fromFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix44D;
|
|
601
|
+
/** Creates a matrix by copying a Float64Array in column-major order. */
|
|
602
|
+
static fromCopyFloat64ArrayColumnMajor(array: Float64Array): MutableMatrix44D;
|
|
603
|
+
/** Creates a matrix by copying a Float64Array in row-major order. */
|
|
604
|
+
static fromCopyFloat64ArrayRowMajor(array: Float64Array): MutableMatrix44D;
|
|
605
|
+
/** Creates a matrix from a 3x3 matrix embedded in the upper-left corner. */
|
|
606
|
+
static fromCopyMatrix33(mat: IMatrix33): MutableMatrix44D;
|
|
607
|
+
/** Creates a matrix from a 16-element array in column-major order. */
|
|
608
|
+
static fromCopyArray16ColumnMajor(array: Array16<number>): MutableMatrix44D;
|
|
609
|
+
/** Creates a matrix from an array in column-major order. */
|
|
610
|
+
static fromCopyArrayColumnMajor(array: Array<number>): MutableMatrix44D;
|
|
611
|
+
/** Creates a matrix from a 16-element array in row-major order. */
|
|
612
|
+
static fromCopyArray16RowMajor(array: Array16<number>): MutableMatrix44D;
|
|
613
|
+
/** Creates a matrix from an array in row-major order. */
|
|
614
|
+
static fromCopyArrayRowMajor(array: Array<number>): MutableMatrix44D;
|
|
615
|
+
/** Creates a rotation matrix from a quaternion. */
|
|
616
|
+
static fromCopyQuaternion(q: IQuaternion): MutableMatrix44D;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
620
|
+
*/
|
|
621
|
+
export { MutableMatrix44 as MutableMatrix44F };
|