@shopware-ag/dive 1.17.2 → 1.18.0

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.
Files changed (40) hide show
  1. package/README.md +56 -22
  2. package/build/dive.cjs +11 -7
  3. package/build/dive.cjs.map +1 -1
  4. package/build/dive.d.cts +3 -4
  5. package/build/dive.d.ts +3 -4
  6. package/build/dive.js +9 -5
  7. package/build/dive.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/__test__/DIVE.test.ts +0 -40
  10. package/src/animation/__test__/AnimationSystem.test.ts +0 -7
  11. package/src/ar/arquicklook/__test__/ARQuickLook.test.ts +0 -140
  12. package/src/ar/sceneviewer/__test__/SceneViewer.test.ts +0 -140
  13. package/src/axiscamera/__test__/AxisCamera.test.ts +0 -76
  14. package/src/com/__test__/Communication.test.ts +0 -6
  15. package/src/controls/__test__/OrbitControls.test.ts +0 -87
  16. package/src/dive.ts +3 -3
  17. package/src/exporters/usdz/__test__/USDZExporter.test.ts +57 -0
  18. package/src/group/Group.ts +6 -1
  19. package/src/group/__test__/Group.test.ts +6 -3
  20. package/src/io/gltf/__test__/GLTFIO.test.ts +0 -77
  21. package/src/light/PointLight.ts +1 -1
  22. package/src/light/__test__/AmbientLight.test.ts +0 -24
  23. package/src/light/__test__/PointLight.test.ts +0 -61
  24. package/src/light/__test__/SceneLight.test.ts +0 -89
  25. package/src/loadingmanager/LoadingManager.ts +2 -1
  26. package/src/loadingmanager/__test__/LoadingManager.test.ts +0 -30
  27. package/src/math/degToRad/__test__/degToRad.test.ts +0 -7
  28. package/src/math/radToDeg/__test__/radToDeg.test.ts +0 -7
  29. package/src/model/Model.ts +1 -1
  30. package/src/model/__test__/Model.test.ts +5 -155
  31. package/src/node/__test__/Node.test.ts +0 -149
  32. package/src/primitive/__test__/Primitive.test.ts +6 -199
  33. package/src/primitive/floor/__test__/Floor.test.ts +0 -3
  34. package/src/renderer/__test__/Renderer.test.ts +16 -46
  35. package/src/scene/__test__/Scene.test.ts +6 -16
  36. package/src/scene/root/Root.ts +4 -4
  37. package/src/scene/root/__test__/Root.test.ts +6 -188
  38. package/src/toolbox/__test__/BaseTool.test.ts +34 -38
  39. package/src/toolbox/select/__test__/SelectTool.test.ts +16 -89
  40. package/src/toolbox/transform/__test__/TransformTool.test.ts +14 -82
package/build/dive.d.cts CHANGED
@@ -2,8 +2,7 @@ import { ShadowMapType, ToneMapping, WebGLRenderer, Scene, Camera, PerspectiveCa
2
2
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
3
3
  import { Tween } from '@tweenjs/tween.js';
4
4
  import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
5
- import { TransformControls as TransformControls$1, GLTF } from 'three/examples/jsm/Addons.js';
6
- import { GLTF as GLTF$1 } from 'three/examples/jsm/loaders/GLTFLoader';
5
+ import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
7
6
 
8
7
  type DIVERendererSettings = {
9
8
  antialias: boolean;
@@ -451,7 +450,7 @@ declare class DIVEPointLight extends Object3D implements DIVESelectable, DIVEMov
451
450
  readonly isDIVEPointLight: true;
452
451
  readonly isMovable: true;
453
452
  readonly isSelectable: true;
454
- gizmo: TransformControls$1 | null;
453
+ gizmo: TransformControls | null;
455
454
  private light;
456
455
  private mesh;
457
456
  constructor();
@@ -530,7 +529,7 @@ declare class DIVEPrimitive extends DIVENode {
530
529
  type DIVESceneObject = DIVEModel | DIVEGroup | DIVEPrimitive | DIVEAmbientLight | DIVEPointLight | DIVESceneLight;
531
530
 
532
531
  type DIVESceneFileType = {
533
- glb: GLTF$1;
532
+ glb: GLTF;
534
533
  };
535
534
 
536
535
  type DIVESceneData = {
package/build/dive.d.ts CHANGED
@@ -2,8 +2,7 @@ import { ShadowMapType, ToneMapping, WebGLRenderer, Scene, Camera, PerspectiveCa
2
2
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
3
3
  import { Tween } from '@tweenjs/tween.js';
4
4
  import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
5
- import { TransformControls as TransformControls$1, GLTF } from 'three/examples/jsm/Addons.js';
6
- import { GLTF as GLTF$1 } from 'three/examples/jsm/loaders/GLTFLoader';
5
+ import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
7
6
 
8
7
  type DIVERendererSettings = {
9
8
  antialias: boolean;
@@ -451,7 +450,7 @@ declare class DIVEPointLight extends Object3D implements DIVESelectable, DIVEMov
451
450
  readonly isDIVEPointLight: true;
452
451
  readonly isMovable: true;
453
452
  readonly isSelectable: true;
454
- gizmo: TransformControls$1 | null;
453
+ gizmo: TransformControls | null;
455
454
  private light;
456
455
  private mesh;
457
456
  constructor();
@@ -530,7 +529,7 @@ declare class DIVEPrimitive extends DIVENode {
530
529
  type DIVESceneObject = DIVEModel | DIVEGroup | DIVEPrimitive | DIVEAmbientLight | DIVEPointLight | DIVESceneLight;
531
530
 
532
531
  type DIVESceneFileType = {
533
- glb: GLTF$1;
532
+ glb: GLTF;
534
533
  };
535
534
 
536
535
  type DIVESceneData = {
package/build/dive.js CHANGED
@@ -3095,7 +3095,8 @@ var DIVEModel = class extends DIVENode {
3095
3095
  };
3096
3096
 
3097
3097
  // src/loadingmanager/LoadingManager.ts
3098
- import { DRACOLoader, GLTFLoader as GLTFLoader2 } from "three/examples/jsm/Addons.js";
3098
+ import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader";
3099
+ import { GLTFLoader as GLTFLoader2 } from "three/examples/jsm/loaders/GLTFLoader";
3099
3100
  var DIVELoadingManager = class {
3100
3101
  // ... maybe extend with other loaders later
3101
3102
  constructor() {
@@ -3414,6 +3415,9 @@ var DIVEGroup = class extends DIVENode {
3414
3415
  this._lines[index].visible = visible;
3415
3416
  }
3416
3417
  attach(object) {
3418
+ if (this._members.includes(object)) {
3419
+ return this;
3420
+ }
3417
3421
  const line = this.createLine();
3418
3422
  this.add(line);
3419
3423
  this._lines.push(line);
@@ -4460,12 +4464,12 @@ var getObjectDelta = (a, b) => {
4460
4464
 
4461
4465
  // src/dive.ts
4462
4466
  init_Info();
4463
- import { generateUUID as generateUUID2 } from "three/src/math/MathUtils";
4467
+ import { MathUtils as MathUtils5 } from "three";
4464
4468
 
4465
4469
  // package.json
4466
4470
  var package_default = {
4467
4471
  name: "@shopware-ag/dive",
4468
- version: "1.17.2",
4472
+ version: "1.18.0",
4469
4473
  description: "Shopware Spatial Framework",
4470
4474
  type: "module",
4471
4475
  main: "./build/dive.cjs",
@@ -4625,7 +4629,7 @@ var DIVE = class _DIVE {
4625
4629
  position: { x: 0, y: 2, z: 2 },
4626
4630
  target: { x: 0, y: 0.5, z: 0 }
4627
4631
  });
4628
- const lightid = generateUUID2();
4632
+ const lightid = MathUtils5.generateUUID();
4629
4633
  dive.Communication.PerformAction("ADD_OBJECT", {
4630
4634
  entityType: "light",
4631
4635
  type: "scene",
@@ -4636,7 +4640,7 @@ var DIVE = class _DIVE {
4636
4640
  intensity: 1,
4637
4641
  color: 16777215
4638
4642
  });
4639
- const modelid = generateUUID2();
4643
+ const modelid = MathUtils5.generateUUID();
4640
4644
  dive.Communication.Subscribe("MODEL_LOADED", (data) => {
4641
4645
  if (data.id !== modelid) return;
4642
4646
  const transform = dive.Communication.PerformAction(