minerender 2.1.0-alpha.130 → 2.1.0-alpha.131
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/dist/browser/esm/util/model.mjs +7 -7
- package/dist/browser/esm/util/model.mjs.map +1 -1
- package/dist/browser/index.js +7 -7
- package/dist/browser/index.js.map +1 -1
- package/dist/bundle.js +7 -7
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.js +7 -7
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +7 -7
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -2691,13 +2691,13 @@ function applyElementRotation(rotation, geometry) {
|
|
|
2691
2691
|
break;
|
|
2692
2692
|
}
|
|
2693
2693
|
if (rotation.rescale) {
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2694
|
+
const angle = toRadians(rotation.angle);
|
|
2695
|
+
const s = 1 / Math.max(Math.abs(Math.cos(angle)), Math.abs(Math.sin(angle)));
|
|
2696
|
+
geometry.scale(
|
|
2697
|
+
rotation.axis === "x" /* X */ ? 1 : s,
|
|
2698
|
+
rotation.axis === "y" /* Y */ ? 1 : s,
|
|
2699
|
+
rotation.axis === "z" /* Z */ ? 1 : s
|
|
2700
|
+
);
|
|
2701
2701
|
}
|
|
2702
2702
|
geometry.translate(origin.x, origin.y, origin.z);
|
|
2703
2703
|
}
|