@vertexvis/geometry 0.24.3-testing.0 → 0.24.3
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 +1 -1
- package/dist/bundle.cjs.js +14 -10
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +14 -10
- package/dist/bundle.esm.js.map +1 -1
- package/dist/cdn/bundle.esm.js +14 -10
- package/dist/cdn/bundle.esm.js.map +1 -1
- package/dist/cdn/bundle.esm.min.js.map +1 -1
- package/dist/cdn/euler.d.ts +14 -10
- package/dist/euler.d.ts +14 -10
- package/package.json +4 -4
package/dist/bundle.esm.js
CHANGED
|
@@ -801,12 +801,12 @@ var matrix4 = /*#__PURE__*/Object.freeze({
|
|
|
801
801
|
});
|
|
802
802
|
|
|
803
803
|
/**
|
|
804
|
-
* Creates a new
|
|
804
|
+
* Creates a new set of Euler angles where each axis of rotation is defined by an angle,
|
|
805
805
|
* in radians. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is
|
|
806
806
|
* returned.
|
|
807
807
|
*
|
|
808
|
-
* @param value The values to populate the
|
|
809
|
-
* @returns A
|
|
808
|
+
* @param value The values to populate the Euler angles with.
|
|
809
|
+
* @returns A set of Euler angles.
|
|
810
810
|
*/
|
|
811
811
|
function create$c(value) {
|
|
812
812
|
var _a, _b, _c, _d;
|
|
@@ -819,12 +819,12 @@ function create$c(value) {
|
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
821
|
/**
|
|
822
|
-
* Creates a new
|
|
822
|
+
* Creates a new set of Euler angles where each axis of rotation is defined by an angle,
|
|
823
823
|
* in degrees. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is
|
|
824
824
|
* returned.
|
|
825
825
|
*
|
|
826
|
-
* @param value The values to populate the
|
|
827
|
-
* @returns A
|
|
826
|
+
* @param value The values to populate the Euler angles with.
|
|
827
|
+
* @returns A set of Euler angles.
|
|
828
828
|
*/
|
|
829
829
|
function fromDegrees(value) {
|
|
830
830
|
if (value === void 0) { value = {}; }
|
|
@@ -837,9 +837,13 @@ function fromDegrees(value) {
|
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
839
|
/**
|
|
840
|
-
* Creates a
|
|
840
|
+
* Creates a set of Euler angles from the rotation components of a 4x4 matrix. The
|
|
841
841
|
* rotation components are represented by the upper 3x3 of the matrix.
|
|
842
842
|
*
|
|
843
|
+
* Note that there are two solutions for the Euler angle of the 2nd applied
|
|
844
|
+
* rotation (i.e. y for xyz) because sin(theta) = sin(PI-theta).
|
|
845
|
+
* The returned angle will always be the solution between -PI/2 and PI/2.
|
|
846
|
+
*
|
|
843
847
|
* @param matrix A pure rotation matrix, unscaled.
|
|
844
848
|
* @param order The order that the rotations are applied.
|
|
845
849
|
*/
|
|
@@ -916,12 +920,12 @@ function fromRotationMatrix(matrix, order) {
|
|
|
916
920
|
return { x: x, y: y, z: z, order: order };
|
|
917
921
|
}
|
|
918
922
|
/**
|
|
919
|
-
* Returns a
|
|
923
|
+
* Returns a set of Euler angles that was decoded from a JSON string. Supports either
|
|
920
924
|
* extracting values from an array `[x, y, z, order]` or object `{x, y, z,
|
|
921
925
|
* order}`.
|
|
922
926
|
*
|
|
923
927
|
* @param json A JSON object.
|
|
924
|
-
* @returns A
|
|
928
|
+
* @returns A set of Euler angles.
|
|
925
929
|
*/
|
|
926
930
|
function fromJson$4(json) {
|
|
927
931
|
var obj = JSON.parse(json);
|
|
@@ -935,7 +939,7 @@ function fromJson$4(json) {
|
|
|
935
939
|
}
|
|
936
940
|
}
|
|
937
941
|
/**
|
|
938
|
-
* Type guard that checks if the given type is a Euler.
|
|
942
|
+
* Type guard that checks if the given type is a set of Euler angles.
|
|
939
943
|
*/
|
|
940
944
|
function isType$1(obj) {
|
|
941
945
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|