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
|
@@ -161,7 +161,7 @@ export declare class Scalar extends Scalar_<Float32ArrayConstructor> implements
|
|
|
161
161
|
* Provides higher precision than the standard Scalar class for applications
|
|
162
162
|
* requiring double-precision arithmetic.
|
|
163
163
|
*/
|
|
164
|
-
export declare class
|
|
164
|
+
export declare class ScalarD extends Scalar_<Float64ArrayConstructor> {
|
|
165
165
|
/**
|
|
166
166
|
* Creates a new 64-bit float scalar instance.
|
|
167
167
|
* @param x - The typed array containing the scalar value
|
|
@@ -170,32 +170,31 @@ export declare class Scalard extends Scalar_<Float64ArrayConstructor> {
|
|
|
170
170
|
/**
|
|
171
171
|
* Creates a new double-precision scalar from a numeric value.
|
|
172
172
|
* @param value - The numeric value to create the scalar from
|
|
173
|
-
* @returns A new
|
|
173
|
+
* @returns A new ScalarD instance
|
|
174
174
|
*/
|
|
175
|
-
static fromCopyNumber(value: number):
|
|
175
|
+
static fromCopyNumber(value: number): ScalarD;
|
|
176
176
|
/**
|
|
177
177
|
* Creates a double-precision scalar with value zero.
|
|
178
|
-
* @returns A new
|
|
178
|
+
* @returns A new ScalarD instance with value 0
|
|
179
179
|
*/
|
|
180
|
-
static zero():
|
|
180
|
+
static zero(): ScalarD;
|
|
181
181
|
/**
|
|
182
182
|
* Creates a double-precision scalar with value one.
|
|
183
|
-
* @returns A new
|
|
183
|
+
* @returns A new ScalarD instance with value 1
|
|
184
184
|
*/
|
|
185
|
-
static one():
|
|
185
|
+
static one(): ScalarD;
|
|
186
186
|
/**
|
|
187
187
|
* Creates a dummy (uninitialized) double-precision scalar instance.
|
|
188
|
-
* @returns A new dummy
|
|
188
|
+
* @returns A new dummy ScalarD instance
|
|
189
189
|
*/
|
|
190
|
-
static dummy():
|
|
190
|
+
static dummy(): ScalarD;
|
|
191
191
|
/**
|
|
192
192
|
* Creates a deep copy of this double-precision scalar.
|
|
193
|
-
* @returns A new
|
|
193
|
+
* @returns A new ScalarD instance with the same value
|
|
194
194
|
*/
|
|
195
|
-
clone():
|
|
195
|
+
clone(): ScalarD;
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
199
|
-
* Provides convenient naming for float-precision scalar operations.
|
|
198
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
200
199
|
*/
|
|
201
|
-
export
|
|
200
|
+
export { Scalar as ScalarF };
|
|
@@ -533,9 +533,9 @@ export declare class Vector2 extends Vector2_<Float32ArrayConstructor> implement
|
|
|
533
533
|
* This class provides high-precision vector operations for applications requiring double precision.
|
|
534
534
|
* All operations return new vector instances, preserving immutability.
|
|
535
535
|
*/
|
|
536
|
-
export declare class
|
|
536
|
+
export declare class Vector2D extends Vector2_<Float64ArrayConstructor> {
|
|
537
537
|
/**
|
|
538
|
-
* Creates a new
|
|
538
|
+
* Creates a new Vector2D instance.
|
|
539
539
|
*
|
|
540
540
|
* @param x - The typed array containing the vector components
|
|
541
541
|
*/
|
|
@@ -544,122 +544,118 @@ export declare class Vector2d extends Vector2_<Float64ArrayConstructor> {
|
|
|
544
544
|
* Creates a vector from a 2-element array.
|
|
545
545
|
*
|
|
546
546
|
* @param array - The array containing [x, y] components
|
|
547
|
-
* @returns A new
|
|
547
|
+
* @returns A new Vector2D instance
|
|
548
548
|
*/
|
|
549
|
-
static fromCopyArray2(array: Array2<number>):
|
|
549
|
+
static fromCopyArray2(array: Array2<number>): Vector2D;
|
|
550
550
|
/**
|
|
551
551
|
* Creates a vector from individual x and y components.
|
|
552
552
|
*
|
|
553
553
|
* @param x - The x component
|
|
554
554
|
* @param y - The y component
|
|
555
|
-
* @returns A new
|
|
555
|
+
* @returns A new Vector2D instance
|
|
556
556
|
*/
|
|
557
|
-
static fromCopy2(x: number, y: number):
|
|
557
|
+
static fromCopy2(x: number, y: number): Vector2D;
|
|
558
558
|
/**
|
|
559
559
|
* Creates a vector from an array, taking the first 2 elements.
|
|
560
560
|
*
|
|
561
561
|
* @param array - The array containing components
|
|
562
|
-
* @returns A new
|
|
562
|
+
* @returns A new Vector2D instance
|
|
563
563
|
*/
|
|
564
|
-
static fromCopyArray(array: Array<number>):
|
|
564
|
+
static fromCopyArray(array: Array<number>): Vector2D;
|
|
565
565
|
/**
|
|
566
566
|
* Creates a vector from an ArrayBuffer.
|
|
567
567
|
*
|
|
568
568
|
* @param arrayBuffer - The ArrayBuffer containing the vector data
|
|
569
|
-
* @returns A new
|
|
569
|
+
* @returns A new Vector2D instance
|
|
570
570
|
*/
|
|
571
|
-
static fromArrayBuffer(arrayBuffer: ArrayBuffer):
|
|
571
|
+
static fromArrayBuffer(arrayBuffer: ArrayBuffer): Vector2D;
|
|
572
572
|
/**
|
|
573
573
|
* Creates a vector from a Float64Array.
|
|
574
574
|
*
|
|
575
575
|
* @param float64Array - The Float64Array containing the vector data
|
|
576
|
-
* @returns A new
|
|
576
|
+
* @returns A new Vector2D instance
|
|
577
577
|
*/
|
|
578
|
-
static fromFloat64Array(float64Array: Float64Array):
|
|
578
|
+
static fromFloat64Array(float64Array: Float64Array): Vector2D;
|
|
579
579
|
/**
|
|
580
580
|
* Creates a zero vector (0, 0).
|
|
581
581
|
*
|
|
582
|
-
* @returns A new zero
|
|
582
|
+
* @returns A new zero Vector2D instance
|
|
583
583
|
*/
|
|
584
|
-
static zero():
|
|
584
|
+
static zero(): Vector2D;
|
|
585
585
|
/**
|
|
586
586
|
* Creates a one vector (1, 1).
|
|
587
587
|
*
|
|
588
|
-
* @returns A new one
|
|
588
|
+
* @returns A new one Vector2D instance
|
|
589
589
|
*/
|
|
590
|
-
static one():
|
|
590
|
+
static one(): Vector2D;
|
|
591
591
|
/**
|
|
592
592
|
* Creates a dummy vector with no components.
|
|
593
593
|
*
|
|
594
|
-
* @returns A new dummy
|
|
594
|
+
* @returns A new dummy Vector2D instance
|
|
595
595
|
*/
|
|
596
|
-
static dummy():
|
|
596
|
+
static dummy(): Vector2D;
|
|
597
597
|
/**
|
|
598
598
|
* Normalizes a vector to unit length.
|
|
599
599
|
*
|
|
600
600
|
* @param vec - The vector to normalize
|
|
601
|
-
* @returns A new normalized
|
|
601
|
+
* @returns A new normalized Vector2D instance
|
|
602
602
|
*/
|
|
603
|
-
static normalize(vec: IVector2):
|
|
603
|
+
static normalize(vec: IVector2): Vector2D;
|
|
604
604
|
/**
|
|
605
605
|
* Adds two vectors component-wise.
|
|
606
606
|
*
|
|
607
607
|
* @param l_vec - The left vector operand
|
|
608
608
|
* @param r_vec - The right vector operand
|
|
609
|
-
* @returns A new
|
|
609
|
+
* @returns A new Vector2D instance containing the sum
|
|
610
610
|
*/
|
|
611
|
-
static add(l_vec: IVector2, r_vec: IVector2):
|
|
611
|
+
static add(l_vec: IVector2, r_vec: IVector2): Vector2D;
|
|
612
612
|
/**
|
|
613
613
|
* Subtracts the right vector from the left vector component-wise.
|
|
614
614
|
*
|
|
615
615
|
* @param l_vec - The left vector operand
|
|
616
616
|
* @param r_vec - The right vector operand
|
|
617
|
-
* @returns A new
|
|
617
|
+
* @returns A new Vector2D instance containing the difference
|
|
618
618
|
*/
|
|
619
|
-
static subtract(l_vec: IVector2, r_vec: IVector2):
|
|
619
|
+
static subtract(l_vec: IVector2, r_vec: IVector2): Vector2D;
|
|
620
620
|
/**
|
|
621
621
|
* Multiplies a vector by a scalar value.
|
|
622
622
|
*
|
|
623
623
|
* @param vec - The vector to multiply
|
|
624
624
|
* @param value - The scalar value to multiply by
|
|
625
|
-
* @returns A new
|
|
625
|
+
* @returns A new Vector2D instance containing the scaled result
|
|
626
626
|
*/
|
|
627
|
-
static multiply(vec: IVector2, value: number):
|
|
627
|
+
static multiply(vec: IVector2, value: number): Vector2D;
|
|
628
628
|
/**
|
|
629
629
|
* Multiplies two vectors component-wise.
|
|
630
630
|
*
|
|
631
631
|
* @param l_vec - The left vector operand
|
|
632
632
|
* @param r_vec - The right vector operand
|
|
633
|
-
* @returns A new
|
|
633
|
+
* @returns A new Vector2D instance containing the component-wise product
|
|
634
634
|
*/
|
|
635
|
-
static multiplyVector(l_vec: IVector2, r_vec: IVector2):
|
|
635
|
+
static multiplyVector(l_vec: IVector2, r_vec: IVector2): Vector2D;
|
|
636
636
|
/**
|
|
637
637
|
* Divides a vector by a scalar value.
|
|
638
638
|
*
|
|
639
639
|
* @param vec - The vector to divide
|
|
640
640
|
* @param value - The scalar value to divide by
|
|
641
|
-
* @returns A new
|
|
641
|
+
* @returns A new Vector2D instance containing the divided result
|
|
642
642
|
*/
|
|
643
|
-
static divide(vec: IVector2, value: number):
|
|
643
|
+
static divide(vec: IVector2, value: number): Vector2D;
|
|
644
644
|
/**
|
|
645
645
|
* Divides the left vector by the right vector component-wise.
|
|
646
646
|
*
|
|
647
647
|
* @param l_vec - The left vector operand (dividend)
|
|
648
648
|
* @param r_vec - The right vector operand (divisor)
|
|
649
|
-
* @returns A new
|
|
649
|
+
* @returns A new Vector2D instance containing the component-wise division result
|
|
650
650
|
*/
|
|
651
|
-
static divideVector(l_vec: IVector2, r_vec: IVector2):
|
|
651
|
+
static divideVector(l_vec: IVector2, r_vec: IVector2): Vector2D;
|
|
652
652
|
/**
|
|
653
653
|
* Creates a clone of this vector.
|
|
654
654
|
*
|
|
655
|
-
* @returns A new
|
|
655
|
+
* @returns A new Vector2D instance with the same components
|
|
656
656
|
*/
|
|
657
|
-
clone():
|
|
657
|
+
clone(): Vector2D;
|
|
658
658
|
}
|
|
659
|
-
/**
|
|
660
|
-
* Type alias for Vector2 using 32-bit float components.
|
|
661
|
-
*/
|
|
662
|
-
export type Vector2f = Vector2;
|
|
663
659
|
/**
|
|
664
660
|
* Constant Vector2 instance representing (1, 1).
|
|
665
661
|
*/
|
|
@@ -668,3 +664,7 @@ export declare const ConstVector2_1_1: Vector2;
|
|
|
668
664
|
* Constant Vector2 instance representing (0, 0).
|
|
669
665
|
*/
|
|
670
666
|
export declare const ConstVector2_0_0: Vector2;
|
|
667
|
+
/**
|
|
668
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
669
|
+
*/
|
|
670
|
+
export { Vector2 as Vector2F };
|
|
@@ -129,6 +129,8 @@ export declare class Vector3_<T extends FloatTypedArrayConstructor> extends Abst
|
|
|
129
129
|
static _dummy(type: FloatTypedArrayConstructor): Vector3_<FloatTypedArrayConstructor>;
|
|
130
130
|
/**
|
|
131
131
|
* Normalizes a vector to unit length (static version).
|
|
132
|
+
* A zero-length vector is normalized to the zero vector (an error is logged)
|
|
133
|
+
* instead of becoming `Infinity`/`NaN`.
|
|
132
134
|
* @param vec - The vector to normalize
|
|
133
135
|
* @param type - The typed array constructor to use
|
|
134
136
|
* @returns A new normalized vector
|
|
@@ -238,7 +240,7 @@ export declare class Vector3_<T extends FloatTypedArrayConstructor> extends Abst
|
|
|
238
240
|
* @param value - The scalar value to divide by
|
|
239
241
|
* @param type - The typed array constructor to use
|
|
240
242
|
* @returns A new vector containing the divided result
|
|
241
|
-
* @
|
|
243
|
+
* @remarks If division by zero occurs, the result is set to 0 and an error is logged
|
|
242
244
|
*/
|
|
243
245
|
static _divide(vec: IVector3, value: number, type: FloatTypedArrayConstructor): Vector3_<FloatTypedArrayConstructor>;
|
|
244
246
|
/**
|
|
@@ -247,7 +249,7 @@ export declare class Vector3_<T extends FloatTypedArrayConstructor> extends Abst
|
|
|
247
249
|
* @param value - The scalar value to divide by
|
|
248
250
|
* @param out - The output vector to store the result
|
|
249
251
|
* @returns The output vector containing the divided result
|
|
250
|
-
* @
|
|
252
|
+
* @remarks If division by zero occurs, the result is set to 0 and an error is logged
|
|
251
253
|
*/
|
|
252
254
|
static divideTo(vec: IVector3, value: number, out: IMutableVector3): IMutableVector3;
|
|
253
255
|
/**
|
|
@@ -256,7 +258,7 @@ export declare class Vector3_<T extends FloatTypedArrayConstructor> extends Abst
|
|
|
256
258
|
* @param r_vec - The vector to divide by
|
|
257
259
|
* @param type - The typed array constructor to use
|
|
258
260
|
* @returns A new vector containing the component-wise division result
|
|
259
|
-
* @
|
|
261
|
+
* @remarks If division by zero occurs, the result is set to 0 and an error is logged
|
|
260
262
|
*/
|
|
261
263
|
static _divideVector(l_vec: IVector3, r_vec: IVector3, type: FloatTypedArrayConstructor): Vector3_<FloatTypedArrayConstructor>;
|
|
262
264
|
/**
|
|
@@ -265,7 +267,7 @@ export declare class Vector3_<T extends FloatTypedArrayConstructor> extends Abst
|
|
|
265
267
|
* @param r_vec - The vector to divide by
|
|
266
268
|
* @param out - The output vector to store the result
|
|
267
269
|
* @returns The output vector containing the component-wise division result
|
|
268
|
-
* @
|
|
270
|
+
* @remarks If division by zero occurs, the result is set to 0 and an error is logged
|
|
269
271
|
*/
|
|
270
272
|
static divideVectorTo(l_vec: IVector3, r_vec: IVector3, out: IMutableVector3): IMutableVector3;
|
|
271
273
|
/**
|
|
@@ -615,153 +617,148 @@ export declare class Vector3 extends Vector3_<Float32ArrayConstructor> {
|
|
|
615
617
|
*
|
|
616
618
|
* @example
|
|
617
619
|
* ```typescript
|
|
618
|
-
* const v1 =
|
|
619
|
-
* const v2 =
|
|
620
|
-
* const sum =
|
|
620
|
+
* const v1 = Vector3D.fromCopy3(1.123456789, 2.987654321, 3.456789123);
|
|
621
|
+
* const v2 = Vector3D.fromCopy3(4.111111111, 5.222222222, 6.333333333);
|
|
622
|
+
* const sum = Vector3D.add(v1, v2);
|
|
621
623
|
* ```
|
|
622
624
|
*/
|
|
623
|
-
export declare class
|
|
625
|
+
export declare class Vector3D extends Vector3_<Float64ArrayConstructor> {
|
|
624
626
|
/**
|
|
625
|
-
* Creates a new
|
|
627
|
+
* Creates a new Vector3D instance from a typed array.
|
|
626
628
|
* @param v - The Float64Array containing the vector components
|
|
627
629
|
*/
|
|
628
630
|
private constructor();
|
|
629
631
|
/**
|
|
630
632
|
* Creates a vector from a 3-element array.
|
|
631
633
|
* @param array - Array containing [x, y, z] components
|
|
632
|
-
* @returns A new
|
|
634
|
+
* @returns A new Vector3D instance
|
|
633
635
|
*/
|
|
634
|
-
static fromCopyArray3(array: Array3<number>):
|
|
636
|
+
static fromCopyArray3(array: Array3<number>): Vector3D;
|
|
635
637
|
/**
|
|
636
638
|
* Creates a vector from individual x, y, z components.
|
|
637
639
|
* @param x - The x component
|
|
638
640
|
* @param y - The y component
|
|
639
641
|
* @param z - The z component
|
|
640
|
-
* @returns A new
|
|
642
|
+
* @returns A new Vector3D instance
|
|
641
643
|
*/
|
|
642
|
-
static fromCopy3(x: number, y: number, z: number):
|
|
644
|
+
static fromCopy3(x: number, y: number, z: number): Vector3D;
|
|
643
645
|
/**
|
|
644
646
|
* Creates a vector with all components set to the same value.
|
|
645
647
|
* @param val - The value to set for all components
|
|
646
|
-
* @returns A new
|
|
648
|
+
* @returns A new Vector3D instance
|
|
647
649
|
*/
|
|
648
|
-
static fromCopy1(val: number):
|
|
650
|
+
static fromCopy1(val: number): Vector3D;
|
|
649
651
|
/**
|
|
650
652
|
* Creates a vector from an array (takes first 3 elements).
|
|
651
653
|
* @param array - The array containing the components
|
|
652
|
-
* @returns A new
|
|
654
|
+
* @returns A new Vector3D instance
|
|
653
655
|
*/
|
|
654
|
-
static fromCopyArray(array: Array<number>):
|
|
656
|
+
static fromCopyArray(array: Array<number>): Vector3D;
|
|
655
657
|
/**
|
|
656
658
|
* Creates a vector from an ArrayBuffer.
|
|
657
659
|
* @param arrayBuffer - The ArrayBuffer containing the vector data
|
|
658
|
-
* @returns A new
|
|
660
|
+
* @returns A new Vector3D instance
|
|
659
661
|
*/
|
|
660
|
-
static fromArrayBuffer(arrayBuffer: ArrayBuffer):
|
|
662
|
+
static fromArrayBuffer(arrayBuffer: ArrayBuffer): Vector3D;
|
|
661
663
|
/**
|
|
662
664
|
* Creates a vector from a Float64Array.
|
|
663
665
|
* @param float64Array - The Float64Array containing the vector data
|
|
664
|
-
* @returns A new
|
|
666
|
+
* @returns A new Vector3D instance
|
|
665
667
|
*/
|
|
666
|
-
static fromFloat64Array(float64Array: Float64Array):
|
|
668
|
+
static fromFloat64Array(float64Array: Float64Array): Vector3D;
|
|
667
669
|
/**
|
|
668
670
|
* Creates a zero vector (0, 0, 0).
|
|
669
|
-
* @returns A new
|
|
671
|
+
* @returns A new Vector3D instance with all components set to 0
|
|
670
672
|
*/
|
|
671
|
-
static zero():
|
|
673
|
+
static zero(): Vector3D;
|
|
672
674
|
/**
|
|
673
675
|
* Creates a vector with all components set to 1 (1, 1, 1).
|
|
674
|
-
* @returns A new
|
|
676
|
+
* @returns A new Vector3D instance with all components set to 1
|
|
675
677
|
*/
|
|
676
|
-
static one():
|
|
678
|
+
static one(): Vector3D;
|
|
677
679
|
/**
|
|
678
680
|
* Creates an empty dummy vector for placeholder purposes.
|
|
679
|
-
* @returns A new dummy
|
|
681
|
+
* @returns A new dummy Vector3D instance
|
|
680
682
|
*/
|
|
681
|
-
static dummy():
|
|
683
|
+
static dummy(): Vector3D;
|
|
682
684
|
/**
|
|
683
685
|
* Normalizes a vector to unit length.
|
|
684
686
|
* @param vec - The vector to normalize
|
|
685
|
-
* @returns A new normalized
|
|
687
|
+
* @returns A new normalized Vector3D instance
|
|
686
688
|
*/
|
|
687
|
-
static normalize(vec: IVector3):
|
|
689
|
+
static normalize(vec: IVector3): Vector3D;
|
|
688
690
|
/**
|
|
689
691
|
* Adds two vectors component-wise.
|
|
690
692
|
* @param l_vec - The first vector
|
|
691
693
|
* @param r_vec - The second vector
|
|
692
|
-
* @returns A new
|
|
694
|
+
* @returns A new Vector3D instance containing the sum
|
|
693
695
|
*/
|
|
694
|
-
static add(l_vec: IVector3, r_vec: IVector3):
|
|
696
|
+
static add(l_vec: IVector3, r_vec: IVector3): Vector3D;
|
|
695
697
|
/**
|
|
696
698
|
* Subtracts the second vector from the first vector.
|
|
697
699
|
* @param l_vec - The vector to subtract from
|
|
698
700
|
* @param r_vec - The vector to subtract
|
|
699
|
-
* @returns A new
|
|
701
|
+
* @returns A new Vector3D instance containing the difference
|
|
700
702
|
*/
|
|
701
|
-
static subtract(l_vec: IVector3, r_vec: IVector3):
|
|
703
|
+
static subtract(l_vec: IVector3, r_vec: IVector3): Vector3D;
|
|
702
704
|
/**
|
|
703
705
|
* Multiplies a vector by a scalar value.
|
|
704
706
|
* @param vec - The vector to multiply
|
|
705
707
|
* @param value - The scalar value to multiply by
|
|
706
|
-
* @returns A new
|
|
708
|
+
* @returns A new Vector3D instance containing the scaled result
|
|
707
709
|
*/
|
|
708
|
-
static multiply(vec: IVector3, value: number):
|
|
710
|
+
static multiply(vec: IVector3, value: number): Vector3D;
|
|
709
711
|
/**
|
|
710
712
|
* Multiplies two vectors component-wise.
|
|
711
713
|
* @param l_vec - The first vector
|
|
712
714
|
* @param r_vec - The second vector
|
|
713
|
-
* @returns A new
|
|
715
|
+
* @returns A new Vector3D instance containing the component-wise product
|
|
714
716
|
*/
|
|
715
|
-
static multiplyVector(l_vec: IVector3, r_vec: IVector3):
|
|
717
|
+
static multiplyVector(l_vec: IVector3, r_vec: IVector3): Vector3D;
|
|
716
718
|
/**
|
|
717
719
|
* Transforms a 3D vector by a 4x4 matrix.
|
|
718
720
|
* @param vec - The vector to transform
|
|
719
721
|
* @param mat - The 4x4 transformation matrix
|
|
720
|
-
* @returns A new
|
|
722
|
+
* @returns A new Vector3D instance containing the transformed result
|
|
721
723
|
*/
|
|
722
|
-
static multiplyMatrix4(vec: IVector3, mat: IMatrix44):
|
|
724
|
+
static multiplyMatrix4(vec: IVector3, mat: IMatrix44): Vector3D;
|
|
723
725
|
/**
|
|
724
726
|
* Divides a vector by a scalar value.
|
|
725
727
|
* @param vec - The vector to divide
|
|
726
728
|
* @param value - The scalar value to divide by
|
|
727
|
-
* @returns A new
|
|
729
|
+
* @returns A new Vector3D instance containing the divided result
|
|
728
730
|
*/
|
|
729
|
-
static divide(vec: IVector3, value: number):
|
|
731
|
+
static divide(vec: IVector3, value: number): Vector3D;
|
|
730
732
|
/**
|
|
731
733
|
* Divides two vectors component-wise.
|
|
732
734
|
* @param l_vec - The vector to divide
|
|
733
735
|
* @param r_vec - The vector to divide by
|
|
734
|
-
* @returns A new
|
|
736
|
+
* @returns A new Vector3D instance containing the component-wise division result
|
|
735
737
|
*/
|
|
736
|
-
static divideVector(l_vec: IVector3, r_vec: IVector3):
|
|
738
|
+
static divideVector(l_vec: IVector3, r_vec: IVector3): Vector3D;
|
|
737
739
|
/**
|
|
738
740
|
* Calculates the cross product of two vectors.
|
|
739
741
|
* @param l_vec - The first vector (left operand)
|
|
740
742
|
* @param r_vec - The second vector (right operand)
|
|
741
|
-
* @returns A new
|
|
743
|
+
* @returns A new Vector3D instance containing the cross product result
|
|
742
744
|
*/
|
|
743
|
-
static cross(l_vec: IVector3, r_vec: IVector3):
|
|
745
|
+
static cross(l_vec: IVector3, r_vec: IVector3): Vector3D;
|
|
744
746
|
/**
|
|
745
747
|
* Transforms a vector by a quaternion rotation.
|
|
746
748
|
* @param quat - The quaternion to apply
|
|
747
749
|
* @param vec - The vector to transform
|
|
748
|
-
* @returns A new
|
|
750
|
+
* @returns A new Vector3D instance containing the transformed result
|
|
749
751
|
*/
|
|
750
|
-
static multiplyQuaternion(quat: IQuaternion, vec: IVector3):
|
|
752
|
+
static multiplyQuaternion(quat: IQuaternion, vec: IVector3): Vector3D;
|
|
751
753
|
/**
|
|
752
754
|
* Performs linear interpolation between two vectors.
|
|
753
755
|
* @param lhs - The start vector
|
|
754
756
|
* @param rhs - The end vector
|
|
755
757
|
* @param ratio - The interpolation ratio (0.0 to 1.0)
|
|
756
|
-
* @returns A new
|
|
758
|
+
* @returns A new Vector3D instance containing the interpolated result
|
|
757
759
|
*/
|
|
758
|
-
static lerp(lhs: IVector3, rhs: IVector3, ratio: number):
|
|
760
|
+
static lerp(lhs: IVector3, rhs: IVector3, ratio: number): Vector3D;
|
|
759
761
|
}
|
|
760
|
-
/**
|
|
761
|
-
* Type alias for Vector3 with 32-bit float precision.
|
|
762
|
-
* @deprecated Use Vector3 directly instead
|
|
763
|
-
*/
|
|
764
|
-
export type Vector3f = Vector3;
|
|
765
762
|
/**
|
|
766
763
|
* Constant vector representing (1, 1, 1).
|
|
767
764
|
* Useful for scaling operations or as a default "one" value.
|
|
@@ -772,3 +769,7 @@ export declare const ConstVector3_1_1_1: Vector3;
|
|
|
772
769
|
* Useful as an origin point or for zero/null vector operations.
|
|
773
770
|
*/
|
|
774
771
|
export declare const ConstVector3_0_0_0: Vector3;
|
|
772
|
+
/**
|
|
773
|
+
* Alias for the 32-bit (Float32Array) implementation, making the precision explicit.
|
|
774
|
+
*/
|
|
775
|
+
export { Vector3 as Vector3F };
|