@shopware-ag/dive 1.16.8 → 1.16.9
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/build/dive.cjs +27 -2
- package/build/dive.cjs.map +1 -1
- package/build/dive.d.cts +10 -0
- package/build/dive.d.ts +10 -0
- package/build/dive.js +33 -3
- package/build/dive.js.map +1 -1
- package/package.json +1 -1
- package/src/group/Group.ts +16 -1
- package/src/group/__test__/Group.test.ts +97 -0
- package/src/math/degToRad/__test__/degToRad.test.ts +179 -0
- package/src/math/degToRad/degToRad.ts +5 -0
- package/src/math/index.ts +6 -0
- package/src/math/radToDeg/__test__/radToDeg.test.ts +162 -0
- package/src/math/radToDeg/radToDeg.ts +5 -0
- package/src/node/Node.ts +3 -0
package/build/dive.cjs
CHANGED
|
@@ -1468,6 +1468,9 @@ var DIVENode = class extends import_three7.Object3D {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
|
+
/**
|
|
1472
|
+
* Can be called when the object is moved from a foreign object (gizmo, parent, etc.) to update the object's position.
|
|
1473
|
+
*/
|
|
1471
1474
|
onMove() {
|
|
1472
1475
|
var _a;
|
|
1473
1476
|
(_a = DIVECommunication.get(this.userData.id)) == null ? void 0 : _a.PerformAction(
|
|
@@ -1886,6 +1889,14 @@ var DIVEGroup = class extends DIVENode {
|
|
|
1886
1889
|
this._members = [];
|
|
1887
1890
|
this._lines = [];
|
|
1888
1891
|
}
|
|
1892
|
+
SetPosition(position) {
|
|
1893
|
+
super.SetPosition(position);
|
|
1894
|
+
this._members.forEach((member) => {
|
|
1895
|
+
if ("isDIVENode" in member) {
|
|
1896
|
+
member.onMove();
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1889
1900
|
SetLinesVisibility(visible, object) {
|
|
1890
1901
|
if (!object) {
|
|
1891
1902
|
this._lines.forEach((line) => {
|
|
@@ -2918,7 +2929,7 @@ DIVEInfo._supportsWebXR = null;
|
|
|
2918
2929
|
// package.json
|
|
2919
2930
|
var package_default = {
|
|
2920
2931
|
name: "@shopware-ag/dive",
|
|
2921
|
-
version: "1.16.
|
|
2932
|
+
version: "1.16.9",
|
|
2922
2933
|
description: "Shopware Spatial Framework",
|
|
2923
2934
|
type: "module",
|
|
2924
2935
|
main: "./build/dive.cjs",
|
|
@@ -3036,6 +3047,18 @@ function truncateExp(number, decimals = 0) {
|
|
|
3036
3047
|
return shift(Math.trunc(n), -decimals);
|
|
3037
3048
|
}
|
|
3038
3049
|
|
|
3050
|
+
// src/math/radToDeg/radToDeg.ts
|
|
3051
|
+
var import_three17 = require("three");
|
|
3052
|
+
function radToDeg(radians) {
|
|
3053
|
+
return (import_three17.MathUtils.radToDeg(radians) + 360) % 360;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
// src/math/degToRad/degToRad.ts
|
|
3057
|
+
var import_three18 = require("three");
|
|
3058
|
+
function degToRad(degrees) {
|
|
3059
|
+
return import_three18.MathUtils.degToRad(degrees);
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3039
3062
|
// src/math/index.ts
|
|
3040
3063
|
var DIVEMath = {
|
|
3041
3064
|
ceilExp,
|
|
@@ -3043,7 +3066,9 @@ var DIVEMath = {
|
|
|
3043
3066
|
roundExp: roundExponential,
|
|
3044
3067
|
toFixedExp,
|
|
3045
3068
|
truncateExp,
|
|
3046
|
-
signedAngleTo
|
|
3069
|
+
signedAngleTo,
|
|
3070
|
+
radToDeg,
|
|
3071
|
+
degToRad
|
|
3047
3072
|
};
|
|
3048
3073
|
|
|
3049
3074
|
// src/dive.ts
|