@shopware-ag/dive 1.6.0 → 1.6.2
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 +9 -1
- package/build/dive.cjs.map +1 -1
- package/build/dive.d.cts +35 -26
- package/build/dive.d.ts +35 -26
- package/build/dive.js +9 -1
- package/build/dive.js.map +1 -1
- package/package.json +1 -1
- package/src/com/Communication.ts +9 -0
- package/src/com/actions/index.ts +2 -0
- package/src/com/actions/toolbox/usetool.ts +6 -0
- package/src/model/Model.ts +1 -1
- package/src/model/__test__/Model.test.ts +8 -1
package/build/dive.cjs
CHANGED
|
@@ -812,6 +812,10 @@ var _DIVECommunication = class _DIVECommunication {
|
|
|
812
812
|
returnValue = this.setGizmoVisibility(payload);
|
|
813
813
|
break;
|
|
814
814
|
}
|
|
815
|
+
case "USE_TOOL": {
|
|
816
|
+
returnValue = this.useTool(payload);
|
|
817
|
+
break;
|
|
818
|
+
}
|
|
815
819
|
case "MODEL_LOADED": {
|
|
816
820
|
returnValue = this.modelLoaded(payload);
|
|
817
821
|
break;
|
|
@@ -996,6 +1000,10 @@ var _DIVECommunication = class _DIVECommunication {
|
|
|
996
1000
|
this.toolbox.SetGizmoVisibility(payload);
|
|
997
1001
|
return payload;
|
|
998
1002
|
}
|
|
1003
|
+
useTool(payload) {
|
|
1004
|
+
this.toolbox.UseTool(payload.tool);
|
|
1005
|
+
return true;
|
|
1006
|
+
}
|
|
999
1007
|
modelLoaded(payload) {
|
|
1000
1008
|
this.registered.get(payload.id).loaded = true;
|
|
1001
1009
|
return true;
|
|
@@ -1269,7 +1277,7 @@ var DIVEModel = class extends import_three8.Object3D {
|
|
|
1269
1277
|
const meshBB = mesh.geometry.boundingBox;
|
|
1270
1278
|
const worldPos = mesh.localToWorld(meshBB.max.clone());
|
|
1271
1279
|
const oldPos = this.position.clone();
|
|
1272
|
-
const newPos = this.position.clone().setY(worldPos.y).
|
|
1280
|
+
const newPos = this.position.clone().setY(worldPos.y).sub(new import_three8.Vector3(0, bottomY, 0));
|
|
1273
1281
|
this.position.copy(newPos);
|
|
1274
1282
|
if (this.position.y === oldPos.y) return;
|
|
1275
1283
|
(_a = DIVECommunication.get(this.userData.id)) == null ? void 0 : _a.PerformAction("UPDATE_OBJECT", { id: this.userData.id, position: this.position, rotation: this.rotation, scale: this.scale });
|