@shopware-ag/dive 1.16.11 → 1.16.13
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 +15 -6
- package/build/dive.cjs.map +1 -1
- package/build/dive.d.cts +1 -0
- package/build/dive.d.ts +1 -0
- package/build/dive.js +15 -6
- package/build/dive.js.map +1 -1
- package/package.json +3 -3
- package/src/com/Communication.ts +7 -0
- package/src/dive.ts +1 -1
- package/src/group/Group.ts +5 -1
- package/src/scene/root/Root.ts +3 -3
- package/src/scene/root/__test__/Root.test.ts +8 -0
package/build/dive.d.cts
CHANGED
|
@@ -402,6 +402,7 @@ declare class DIVENode extends Object3D implements DIVESelectable, DIVEMovable {
|
|
|
402
402
|
declare class DIVEGroup extends DIVENode {
|
|
403
403
|
readonly isDIVEGroup: true;
|
|
404
404
|
private _members;
|
|
405
|
+
get members(): Object3D[];
|
|
405
406
|
private _lines;
|
|
406
407
|
constructor();
|
|
407
408
|
SetPosition(position: Vector3Like): void;
|
package/build/dive.d.ts
CHANGED
|
@@ -402,6 +402,7 @@ declare class DIVENode extends Object3D implements DIVESelectable, DIVEMovable {
|
|
|
402
402
|
declare class DIVEGroup extends DIVENode {
|
|
403
403
|
readonly isDIVEGroup: true;
|
|
404
404
|
private _members;
|
|
405
|
+
get members(): Object3D[];
|
|
405
406
|
private _lines;
|
|
406
407
|
constructor();
|
|
407
408
|
SetPosition(position: Vector3Like): void;
|
package/build/dive.js
CHANGED
|
@@ -1110,6 +1110,11 @@ var _DIVECommunication = class _DIVECommunication {
|
|
|
1110
1110
|
if (!deletedObject) return false;
|
|
1111
1111
|
Object.assign(payload, deletedObject);
|
|
1112
1112
|
this.registered.delete(payload.id);
|
|
1113
|
+
Array.from(this.registered.values()).forEach((object) => {
|
|
1114
|
+
if (!object.parentId) return;
|
|
1115
|
+
if (object.parentId !== payload.id) return;
|
|
1116
|
+
object.parentId = null;
|
|
1117
|
+
});
|
|
1113
1118
|
this.scene.DeleteSceneObject(deletedObject);
|
|
1114
1119
|
return true;
|
|
1115
1120
|
}
|
|
@@ -1896,6 +1901,10 @@ var DIVEGroup = class extends DIVENode {
|
|
|
1896
1901
|
this._members = [];
|
|
1897
1902
|
this._lines = [];
|
|
1898
1903
|
}
|
|
1904
|
+
// children objects
|
|
1905
|
+
get members() {
|
|
1906
|
+
return this._members;
|
|
1907
|
+
}
|
|
1899
1908
|
SetPosition(position) {
|
|
1900
1909
|
super.SetPosition(position);
|
|
1901
1910
|
this._members.forEach((member) => {
|
|
@@ -2313,8 +2322,8 @@ var DIVERoot = class extends Object3D6 {
|
|
|
2313
2322
|
return;
|
|
2314
2323
|
}
|
|
2315
2324
|
this.detachTransformControls(sceneObject);
|
|
2316
|
-
for (let i = sceneObject.
|
|
2317
|
-
this.attach(sceneObject.
|
|
2325
|
+
for (let i = sceneObject.members.length - 1; i >= 0; i--) {
|
|
2326
|
+
this.attach(sceneObject.members[i]);
|
|
2318
2327
|
}
|
|
2319
2328
|
sceneObject.parent.remove(sceneObject);
|
|
2320
2329
|
}
|
|
@@ -2947,7 +2956,7 @@ DIVEInfo._supportsWebXR = null;
|
|
|
2947
2956
|
// package.json
|
|
2948
2957
|
var package_default = {
|
|
2949
2958
|
name: "@shopware-ag/dive",
|
|
2950
|
-
version: "1.16.
|
|
2959
|
+
version: "1.16.13",
|
|
2951
2960
|
description: "Shopware Spatial Framework",
|
|
2952
2961
|
type: "module",
|
|
2953
2962
|
main: "./build/dive.cjs",
|
|
@@ -3002,8 +3011,8 @@ var package_default = {
|
|
|
3002
3011
|
"typescript-eslint": "^7.7.1"
|
|
3003
3012
|
},
|
|
3004
3013
|
scripts: {
|
|
3005
|
-
build: "tsup",
|
|
3006
|
-
dev: "tsup --watch",
|
|
3014
|
+
build: "tsup --env.DIVE_NODE_ENV production",
|
|
3015
|
+
dev: "tsup --watch --env.DIVE_NODE_ENV development",
|
|
3007
3016
|
lint: "eslint",
|
|
3008
3017
|
"lint:actions": "yarn lint:actions:transpile && yarn lint:actions:check && yarn lint:actions:cleanup",
|
|
3009
3018
|
"lint:actions:transpile": "yarn tsc --resolveJsonModule --esModuleInterop ci/lint/lint-actions.ts && mv ci/lint/lint-actions.js ci/lint/lint-actions.cjs",
|
|
@@ -3245,7 +3254,7 @@ var DIVE = class _DIVE {
|
|
|
3245
3254
|
}
|
|
3246
3255
|
};
|
|
3247
3256
|
console.log(
|
|
3248
|
-
`DIVE ${package_default.version} initialized ${
|
|
3257
|
+
`DIVE ${package_default.version} initialized ${false ? "in development mode" : ""}`
|
|
3249
3258
|
);
|
|
3250
3259
|
}
|
|
3251
3260
|
Dispose() {
|