circuit-json-to-gltf 0.0.135 → 0.0.136
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/index.js +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14575,14 +14575,14 @@ function transformMesh(mesh, translation, rotation, scale) {
|
|
|
14575
14575
|
z = rz;
|
|
14576
14576
|
const cosX = Math.cos(rotation.x);
|
|
14577
14577
|
const sinX = Math.sin(rotation.x);
|
|
14578
|
-
const ry = y * cosX
|
|
14579
|
-
const rz2 = y * sinX + z * cosX;
|
|
14578
|
+
const ry = y * cosX + z * sinX;
|
|
14579
|
+
const rz2 = -y * sinX + z * cosX;
|
|
14580
14580
|
y = ry;
|
|
14581
14581
|
z = rz2;
|
|
14582
14582
|
const cosZ = Math.cos(rotation.z);
|
|
14583
14583
|
const sinZ = Math.sin(rotation.z);
|
|
14584
|
-
const rx2 = x * cosZ
|
|
14585
|
-
const ry2 = x * sinZ + y * cosZ;
|
|
14584
|
+
const rx2 = x * cosZ + y * sinZ;
|
|
14585
|
+
const ry2 = -x * sinZ + y * cosZ;
|
|
14586
14586
|
x = rx2;
|
|
14587
14587
|
y = ry2;
|
|
14588
14588
|
}
|
|
@@ -14603,14 +14603,14 @@ function transformMesh(mesh, translation, rotation, scale) {
|
|
|
14603
14603
|
nz = rnz;
|
|
14604
14604
|
const cosX = Math.cos(rotation.x);
|
|
14605
14605
|
const sinX = Math.sin(rotation.x);
|
|
14606
|
-
const rny = ny * cosX
|
|
14607
|
-
const rnz2 = ny * sinX + nz * cosX;
|
|
14606
|
+
const rny = ny * cosX + nz * sinX;
|
|
14607
|
+
const rnz2 = -ny * sinX + nz * cosX;
|
|
14608
14608
|
ny = rny;
|
|
14609
14609
|
nz = rnz2;
|
|
14610
14610
|
const cosZ = Math.cos(rotation.z);
|
|
14611
14611
|
const sinZ = Math.sin(rotation.z);
|
|
14612
|
-
const rnx2 = nx * cosZ
|
|
14613
|
-
const rny2 = nx * sinZ + ny * cosZ;
|
|
14612
|
+
const rnx2 = nx * cosZ + ny * sinZ;
|
|
14613
|
+
const rny2 = -nx * sinZ + ny * cosZ;
|
|
14614
14614
|
nx = rnx2;
|
|
14615
14615
|
ny = rny2;
|
|
14616
14616
|
result.normals[i] = nx;
|