@vertexvis/geometry 0.24.3-testing.1 → 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/README.md
CHANGED
|
@@ -24,7 +24,7 @@ viewer.
|
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<script type="module">
|
|
27
|
-
import { Vector3 } from 'https://cdn.jsdelivr.net/npm/@vertexvis/geometry@0.24.
|
|
27
|
+
import { Vector3 } from 'https://cdn.jsdelivr.net/npm/@vertexvis/geometry@0.24.3/dist/cdn/bundle.esm.js';
|
|
28
28
|
|
|
29
29
|
async function main() {
|
|
30
30
|
const viewer = document.querySelector('#viewer');
|
package/dist/bundle.cjs.js
CHANGED
|
@@ -805,12 +805,12 @@ var matrix4 = /*#__PURE__*/Object.freeze({
|
|
|
805
805
|
});
|
|
806
806
|
|
|
807
807
|
/**
|
|
808
|
-
* Creates a new
|
|
808
|
+
* Creates a new set of Euler angles where each axis of rotation is defined by an angle,
|
|
809
809
|
* in radians. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is
|
|
810
810
|
* returned.
|
|
811
811
|
*
|
|
812
|
-
* @param value The values to populate the
|
|
813
|
-
* @returns A
|
|
812
|
+
* @param value The values to populate the Euler angles with.
|
|
813
|
+
* @returns A set of Euler angles.
|
|
814
814
|
*/
|
|
815
815
|
function create$c(value) {
|
|
816
816
|
var _a, _b, _c, _d;
|
|
@@ -823,12 +823,12 @@ function create$c(value) {
|
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
825
|
/**
|
|
826
|
-
* Creates a new
|
|
826
|
+
* Creates a new set of Euler angles where each axis of rotation is defined by an angle,
|
|
827
827
|
* in degrees. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is
|
|
828
828
|
* returned.
|
|
829
829
|
*
|
|
830
|
-
* @param value The values to populate the
|
|
831
|
-
* @returns A
|
|
830
|
+
* @param value The values to populate the Euler angles with.
|
|
831
|
+
* @returns A set of Euler angles.
|
|
832
832
|
*/
|
|
833
833
|
function fromDegrees(value) {
|
|
834
834
|
if (value === void 0) { value = {}; }
|
|
@@ -841,9 +841,13 @@ function fromDegrees(value) {
|
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
843
|
/**
|
|
844
|
-
* Creates a
|
|
844
|
+
* Creates a set of Euler angles from the rotation components of a 4x4 matrix. The
|
|
845
845
|
* rotation components are represented by the upper 3x3 of the matrix.
|
|
846
846
|
*
|
|
847
|
+
* Note that there are two solutions for the Euler angle of the 2nd applied
|
|
848
|
+
* rotation (i.e. y for xyz) because sin(theta) = sin(PI-theta).
|
|
849
|
+
* The returned angle will always be the solution between -PI/2 and PI/2.
|
|
850
|
+
*
|
|
847
851
|
* @param matrix A pure rotation matrix, unscaled.
|
|
848
852
|
* @param order The order that the rotations are applied.
|
|
849
853
|
*/
|
|
@@ -920,12 +924,12 @@ function fromRotationMatrix(matrix, order) {
|
|
|
920
924
|
return { x: x, y: y, z: z, order: order };
|
|
921
925
|
}
|
|
922
926
|
/**
|
|
923
|
-
* Returns a
|
|
927
|
+
* Returns a set of Euler angles that was decoded from a JSON string. Supports either
|
|
924
928
|
* extracting values from an array `[x, y, z, order]` or object `{x, y, z,
|
|
925
929
|
* order}`.
|
|
926
930
|
*
|
|
927
931
|
* @param json A JSON object.
|
|
928
|
-
* @returns A
|
|
932
|
+
* @returns A set of Euler angles.
|
|
929
933
|
*/
|
|
930
934
|
function fromJson$4(json) {
|
|
931
935
|
var obj = JSON.parse(json);
|
|
@@ -939,7 +943,7 @@ function fromJson$4(json) {
|
|
|
939
943
|
}
|
|
940
944
|
}
|
|
941
945
|
/**
|
|
942
|
-
* Type guard that checks if the given type is a Euler.
|
|
946
|
+
* Type guard that checks if the given type is a set of Euler angles.
|
|
943
947
|
*/
|
|
944
948
|
function isType$1(obj) {
|
|
945
949
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|