@shopware-ag/dive 2.2.3 → 2.2.5

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/build/chunks/{AssetCache-kFHaTt4q.mjs → AssetCache-BgBHM6S5.mjs} +1 -1
  2. package/build/chunks/{AssetCache-C1x_3etl.cjs → AssetCache-Bn5GNWfs.cjs} +1 -1
  3. package/build/chunks/{AssetLoader-CChuNBTq.mjs → AssetLoader--8t2T5ko.mjs} +2 -2
  4. package/build/chunks/{AssetLoader-D4IN0yOZ.cjs → AssetLoader-b5ktist5.cjs} +1 -1
  5. package/build/chunks/FileTypes-CbfZcYpV.cjs +29 -0
  6. package/build/chunks/{FileTypes-HNcEuUhi.mjs → FileTypes-Dv8dH6R0.mjs} +81 -83
  7. package/build/chunks/HDREnvorinment-D9NfhUuA.mjs +255 -0
  8. package/build/chunks/HDREnvorinment-DBz-m4DU.cjs +5 -0
  9. package/build/chunks/{SelectTool-gpfuLJfp.cjs → SelectTool-C7VQJNWQ.cjs} +1 -1
  10. package/build/chunks/{SelectTool-DAZe_dB4.mjs → SelectTool-DU_wsl-z.mjs} +1 -1
  11. package/build/dive.cjs +1 -1
  12. package/build/dive.mjs +2 -2
  13. package/build/engine/scene/Scene.d.ts +2 -2
  14. package/build/plugins/ar/index.cjs +1 -1
  15. package/build/plugins/ar/index.mjs +1 -1
  16. package/build/plugins/assetcache/index.cjs +1 -1
  17. package/build/plugins/assetcache/index.mjs +1 -1
  18. package/build/plugins/assetloader/index.cjs +1 -1
  19. package/build/plugins/assetloader/index.mjs +1 -1
  20. package/build/plugins/hdr/index.cjs +1 -0
  21. package/build/plugins/hdr/index.d.ts +2 -0
  22. package/build/plugins/hdr/index.mjs +5 -0
  23. package/build/plugins/hdr/src/HDREnvorinment.d.ts +33 -0
  24. package/build/plugins/hdr/src/index.d.ts +1 -0
  25. package/build/plugins/hdr/types/HDREnvironmentSettings.d.ts +44 -0
  26. package/build/plugins/hdr/types/index.d.ts +1 -0
  27. package/build/plugins/orbitcontroller/index.cjs +1 -1
  28. package/build/plugins/orbitcontroller/index.mjs +1 -1
  29. package/build/plugins/orientationdisplay/index.cjs +1 -1
  30. package/build/plugins/orientationdisplay/index.mjs +1 -1
  31. package/build/plugins/quickview/index.cjs +1 -1
  32. package/build/plugins/quickview/index.mjs +18 -10
  33. package/build/plugins/quickview/src/QuickView.d.ts +3 -1
  34. package/build/plugins/quickview/types/QuickViewSettings.d.ts +5 -0
  35. package/build/plugins/state/index.cjs +1 -1
  36. package/build/plugins/state/index.mjs +2 -2
  37. package/build/plugins/toolbox/index.cjs +1 -1
  38. package/build/plugins/toolbox/index.mjs +2 -2
  39. package/package.json +6 -1
  40. package/build/chunks/FileTypes-Fd6DeJyo.cjs +0 -29
@@ -1,8 +1,8 @@
1
1
  var j = Object.defineProperty;
2
2
  var tt = (o, s, t) => s in o ? j(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
3
  var i = (o, s, t) => tt(o, typeof s != "symbol" ? s + "" : s, t);
4
- import { WebGLRenderer as et, PCFSoftShadowMap as it, PCFShadowMap as st, BasicShadowMap as at, MathUtils as x, Object3D as f, AmbientLight as nt, PointLight as rt, SphereGeometry as R, MeshBasicMaterial as H, FrontSide as Y, Mesh as M, HemisphereLight as ot, DirectionalLight as ht, Vector3 as h, Box3 as w, Quaternion as k, Box3Helper as lt, Sphere as dt, MeshStandardMaterial as A, Raycaster as ct, CylinderGeometry as ut, BufferGeometry as W, BufferAttribute as z, BoxGeometry as I, ConeGeometry as pt, LineDashedMaterial as mt, Line as _t, PlaneGeometry as gt, Color as _, GridHelper as ft, Scene as wt, TOUCH as m, MOUSE as p, EventDispatcher as yt, Spherical as B, Vector2 as c, AxesHelper as bt, Matrix4 as Dt, OrthographicCamera as Et, Vector4 as St } from "three";
5
- import { P as g, U as Pt, H as vt, C as y, a as xt, D as G } from "./PerspectiveCamera-BFzE2TQU.mjs";
4
+ import { WebGLRenderer as et, PCFSoftShadowMap as it, PCFShadowMap as st, BasicShadowMap as at, MathUtils as x, Object3D as f, AmbientLight as rt, PointLight as nt, SphereGeometry as V, MeshBasicMaterial as H, FrontSide as Y, Mesh as M, HemisphereLight as ot, DirectionalLight as ht, Vector3 as h, Box3 as w, Quaternion as k, Box3Helper as lt, Sphere as dt, MeshStandardMaterial as A, Raycaster as ct, CylinderGeometry as ut, BufferGeometry as W, BufferAttribute as z, BoxGeometry as I, ConeGeometry as pt, LineDashedMaterial as mt, Line as _t, PlaneGeometry as gt, Color as g, GridHelper as ft, Scene as wt, TOUCH as m, MOUSE as p, EventDispatcher as yt, Spherical as B, Vector2 as c, AxesHelper as bt, Matrix4 as Dt, OrthographicCamera as Et, Vector4 as St } from "three";
5
+ import { P as _, U as Pt, H as vt, C as y, a as xt, D as G } from "./PerspectiveCamera-BFzE2TQU.mjs";
6
6
  import T from "three-spritetext";
7
7
  class Mt {
8
8
  constructor() {
@@ -89,14 +89,14 @@ class Lt {
89
89
  i(this, "_width", 0);
90
90
  i(this, "_height", 0);
91
91
  this._renderer = s, this._camera = t, this._resizeObserver = new ResizeObserver((e) => {
92
- const a = e[0], { width: n, height: r } = a.contentRect;
93
- n === this._width && r === this._height || (this._renderer.onResize(n, r), this._camera.onResize(n, r), this._width = n, this._height = r);
92
+ const a = e[0], { width: r, height: n } = a.contentRect;
93
+ r === this._width && n === this._height || (this._camera.onResize(r, n), this._renderer.onResize(r, n), this._width = r, this._height = n, this._renderer.render());
94
94
  }), this._observeCanvas(this._renderer.canvas);
95
95
  }
96
96
  setCanvas(s) {
97
97
  this._resizeObserver.disconnect(), this._observeCanvas(s);
98
98
  const { width: t, height: e } = s.getBoundingClientRect();
99
- this._renderer.onResize(t, e), this._camera.onResize(t, e), this._width = t, this._height = e;
99
+ this._camera.onResize(t, e), this._renderer.onResize(t, e), this._width = t, this._height = e, this._renderer.render();
100
100
  }
101
101
  dispose() {
102
102
  this._resizeObserver.disconnect();
@@ -166,7 +166,7 @@ class It extends f {
166
166
  i(this, "isDIVEAmbientLight", !0);
167
167
  i(this, "isSelectable", !0);
168
168
  i(this, "_light");
169
- this.name = "DIVEAmbientLight", this._light = new nt(16777215, 1), this._light.layers.mask = g, this.add(this._light);
169
+ this.name = "DIVEAmbientLight", this._light = new rt(16777215, 1), this._light.layers.mask = _, this.add(this._light);
170
170
  }
171
171
  setColor(t) {
172
172
  this._light.color = t;
@@ -188,8 +188,8 @@ class Tt extends f {
188
188
  i(this, "gizmo", null);
189
189
  i(this, "light");
190
190
  i(this, "mesh");
191
- this.name = "DIVEPointLight", this.light = new rt(16777215, 1), this.light.layers.mask = g, this.light.castShadow = !0, this.light.shadow.mapSize.width = 512, this.light.shadow.mapSize.height = 512, this.add(this.light);
192
- const t = 0.1, e = new R(
191
+ this.name = "DIVEPointLight", this.light = new nt(16777215, 1), this.light.layers.mask = _, this.light.castShadow = !0, this.light.shadow.mapSize.width = 512, this.light.shadow.mapSize.height = 512, this.add(this.light);
192
+ const t = 0.1, e = new V(
193
193
  t,
194
194
  t * 320,
195
195
  t * 320
@@ -244,7 +244,7 @@ class kt extends f {
244
244
  i(this, "isSelectable", !0);
245
245
  i(this, "_hemiLight");
246
246
  i(this, "_dirLight");
247
- this.name = "DIVESceneLight", this._hemiLight = new ot(16777215, 16777215, 2), this._hemiLight.layers.mask = g, this._hemiLight.position.set(0, 50, 0), this._hemiLight.visible = !0, this.add(this._hemiLight), this._dirLight = new ht(16777215, 3), this._dirLight.layers.mask = g, this._dirLight.position.set(1, 1.75, 1), this._dirLight.position.multiplyScalar(30), this._dirLight.castShadow = !0, this._dirLight.visible = !0, this._dirLight.shadow.mapSize.width = 2048, this._dirLight.shadow.mapSize.height = 2048;
247
+ this.name = "DIVESceneLight", this._hemiLight = new ot(16777215, 16777215, 2), this._hemiLight.layers.mask = _, this._hemiLight.position.set(0, 50, 0), this._hemiLight.visible = !0, this.add(this._hemiLight), this._dirLight = new ht(16777215, 3), this._dirLight.layers.mask = _, this._dirLight.position.set(1, 1.75, 1), this._dirLight.position.multiplyScalar(30), this._dirLight.castShadow = !0, this._dirLight.visible = !0, this._dirLight.shadow.mapSize.width = 2048, this._dirLight.shadow.mapSize.height = 2048;
248
248
  const t = 5;
249
249
  this._dirLight.shadow.camera.left = -5, this._dirLight.shadow.camera.right = t, this._dirLight.shadow.camera.top = t, this._dirLight.shadow.camera.bottom = -5, this._dirLight.shadow.camera.far = 3500, this.add(this._dirLight);
250
250
  }
@@ -268,7 +268,7 @@ class C extends f {
268
268
  i(this, "gizmo", null);
269
269
  i(this, "_positionWorldBuffer");
270
270
  i(this, "_boundingBox");
271
- this.layers.mask = g, this._positionWorldBuffer = new h(), this._boundingBox = new w();
271
+ this.layers.mask = _, this._positionWorldBuffer = new h(), this._boundingBox = new w();
272
272
  }
273
273
  setPosition(t) {
274
274
  if (!this.parent) {
@@ -329,7 +329,7 @@ class C extends f {
329
329
  });
330
330
  }
331
331
  }
332
- class V extends C {
332
+ class R extends C {
333
333
  /**
334
334
  * Creates a new BoundingBox instance for the specified 3D object.
335
335
  *
@@ -368,18 +368,18 @@ class V extends C {
368
368
  i(this, "_sphereHelper");
369
369
  /** The dimensions (width, height, depth) of the bounding box */
370
370
  i(this, "_size");
371
- const n = new w();
372
- e ? n.setFromObject(t) : (t.updateWorldMatrix(!0, !0), t.traverse((l) => {
371
+ const r = new w();
372
+ e ? r.setFromObject(t) : (t.updateWorldMatrix(!0, !0), t.traverse((l) => {
373
373
  if (l.isMesh) {
374
374
  const d = l, u = d.geometry.clone();
375
375
  u.applyMatrix4(d.matrixWorld);
376
376
  const D = d.getWorldQuaternion(new k()).invert();
377
- u.applyQuaternion(D), u.computeBoundingBox(), u.boundingBox && n.union(u.boundingBox);
377
+ u.applyQuaternion(D), u.computeBoundingBox(), u.boundingBox && r.union(u.boundingBox);
378
378
  }
379
- })), this.rotation.copy(t.rotation), this._box = n, this._size = n.getSize(new h()), this._center = n.getCenter(new h()), this._boxHelper = new lt(this._box, a), this._boxHelper.visible = !1, this.add(this._boxHelper), this._sphere = n.getBoundingSphere(new dt()), this._radius = this._sphere.radius;
380
- const r = new R(this._radius, 32, 32);
381
- r.translate(this._center.x, this._center.y, this._center.z), this._sphereHelper = new M(
382
- r,
379
+ })), this.rotation.copy(t.rotation), this._box = r, this._size = r.getSize(new h()), this._center = r.getCenter(new h()), this._boxHelper = new lt(this._box, a), this._boxHelper.visible = !1, this.add(this._boxHelper), this._sphere = r.getBoundingSphere(new dt()), this._radius = this._sphere.radius;
380
+ const n = new V(this._radius, 32, 32);
381
+ n.translate(this._center.x, this._center.y, this._center.z), this._sphereHelper = new M(
382
+ n,
383
383
  new H({ color: a, wireframe: !0 })
384
384
  ), this._sphereHelper.visible = !1, this.add(this._sphereHelper);
385
385
  }
@@ -472,9 +472,9 @@ class q extends C {
472
472
  }
473
473
  async setFromURL(t) {
474
474
  const a = await (await this._getAssetLoader()).load(t);
475
- return this.setFromGLTF(a), import("../plugins/state/index.mjs").then(({ State: n }) => {
476
- var r;
477
- (r = n.get(this.userData.id)) == null || r.performAction("MODEL_LOADED", {
475
+ return this.setFromGLTF(a), import("../plugins/state/index.mjs").then(({ State: r }) => {
476
+ var n;
477
+ (n = r.get(this.userData.id)) == null || n.performAction("MODEL_LOADED", {
478
478
  id: this.userData.id
479
479
  });
480
480
  }), this;
@@ -490,13 +490,13 @@ class q extends C {
490
490
  placeOnFloor() {
491
491
  this.updateWorldMatrix(!0, !0);
492
492
  const t = this.getWorldPosition(this._positionWorldBuffer), e = t.clone(), a = new w();
493
- this.children.forEach((r) => {
494
- r instanceof V || a.expandByObject(r, !0);
493
+ this.children.forEach((n) => {
494
+ n instanceof R || a.expandByObject(n, !0);
495
495
  });
496
- const n = -a.min.y;
497
- Math.abs(n) < 1e-9 || (t.y += n, t.y !== e.y && (this.setPosition(t), import("../plugins/state/index.mjs").then(({ State: r }) => {
496
+ const r = -a.min.y;
497
+ Math.abs(r) < 1e-9 || (t.y += r, t.y !== e.y && (this.setPosition(t), import("../plugins/state/index.mjs").then(({ State: n }) => {
498
498
  var l;
499
- (l = r.get(this.userData.id)) == null || l.performAction("UPDATE_OBJECT", {
499
+ (l = n.get(this.userData.id)) == null || l.performAction("UPDATE_OBJECT", {
500
500
  id: this.userData.id,
501
501
  position: t,
502
502
  rotation: this.rotation,
@@ -514,13 +514,13 @@ class q extends C {
514
514
  }
515
515
  const t = this.getWorldPosition(this._positionWorldBuffer), e = t.clone(), a = new w();
516
516
  this.children.forEach((d) => {
517
- d instanceof V || a.expandByObject(d, !0);
517
+ d instanceof R || a.expandByObject(d, !0);
518
518
  });
519
- const n = a.getCenter(new h());
520
- n.y = a.min.y;
521
- const r = new ct(n, new h(0, -1, 0));
522
- r.layers.mask = g;
523
- const l = r.intersectObjects(
519
+ const r = a.getCenter(new h());
520
+ r.y = a.min.y;
521
+ const n = new ct(r, new h(0, -1, 0));
522
+ n.layers.mask = _;
523
+ const l = n.intersectObjects(
524
524
  X(this).root.children,
525
525
  !0
526
526
  );
@@ -540,13 +540,13 @@ class q extends C {
540
540
  this.placeOnFloor();
541
541
  }
542
542
  }
543
- class Vt extends q {
543
+ class Rt extends q {
544
544
  constructor() {
545
545
  super();
546
546
  i(this, "isDIVEPrimitive", !0);
547
547
  i(this, "_mesh");
548
548
  i(this, "_material");
549
- this._mesh = new M(), this._mesh.name = "PrimitiveMesh", this._mesh.layers.mask = g, this._mesh.castShadow = !0, this._mesh.receiveShadow = !0, this.add(this._mesh), this._material = new A(), this._mesh.material = this._material;
549
+ this._mesh = new M(), this._mesh.name = "PrimitiveMesh", this._mesh.layers.mask = _, this._mesh.castShadow = !0, this._mesh.receiveShadow = !0, this.add(this._mesh), this._material = new A(), this._mesh.material = this._material;
550
550
  }
551
551
  setGeometry(t) {
552
552
  const e = this.assembleGeometry(t);
@@ -586,7 +586,7 @@ class Vt extends q {
586
586
  return e.translate(0, t.height / 2, 0), e;
587
587
  }
588
588
  createSphereGeometry(t) {
589
- return new R(t.width / 2, 256, 256);
589
+ return new V(t.width / 2, 256, 256);
590
590
  }
591
591
  createPyramidGeometry(t) {
592
592
  const e = new Float32Array([
@@ -628,11 +628,11 @@ class Vt extends q {
628
628
  3,
629
629
  4,
630
630
  0
631
- ]), n = new W();
632
- return n.setAttribute(
631
+ ]), r = new W();
632
+ return r.setAttribute(
633
633
  "position",
634
634
  new z(e, 3)
635
- ), n.setIndex(new z(a, 1)), n;
635
+ ), r.setIndex(new z(a, 1)), r;
636
636
  }
637
637
  createBoxGeometry(t) {
638
638
  const e = new I(
@@ -664,7 +664,7 @@ class Vt extends q {
664
664
  return e.translate(0, t.height / 2, 0), e;
665
665
  }
666
666
  }
667
- class Rt extends C {
667
+ class Vt extends C {
668
668
  // lines to children
669
669
  constructor() {
670
670
  super();
@@ -684,8 +684,8 @@ class Rt extends C {
684
684
  }
685
685
  setLinesVisibility(t, e) {
686
686
  if (!e) {
687
- this._lines.forEach((n) => {
688
- n.visible = t;
687
+ this._lines.forEach((r) => {
688
+ r.visible = t;
689
689
  });
690
690
  return;
691
691
  }
@@ -788,18 +788,18 @@ class At extends M {
788
788
  const t = new gt(1, 1);
789
789
  t.scale(1e3, 1e3, 1), t.rotateX(-Math.PI / 2);
790
790
  const e = new A({
791
- color: new _(16777215),
791
+ color: new g(16777215),
792
792
  side: Y
793
793
  });
794
794
  super(t, e);
795
795
  i(this, "isDIVEFloor", !0);
796
- this.name = "Floor", this.layers.mask = g, this.receiveShadow = !0;
796
+ this.name = "Floor", this.layers.mask = _, this.receiveShadow = !0;
797
797
  }
798
798
  setVisibility(t) {
799
799
  this.visible = t;
800
800
  }
801
801
  setColor(t) {
802
- this.material.color = new _(t);
802
+ this.material.color = new g(t);
803
803
  }
804
804
  }
805
805
  class Ct extends f {
@@ -862,11 +862,11 @@ class Ct extends f {
862
862
  break;
863
863
  }
864
864
  case "primitive": {
865
- e = new Vt(), e.name = t.name, e.userData.id = t.id, this.add(e), this._updatePrimitive(e, t);
865
+ e = new Rt(), e.name = t.name, e.userData.id = t.id, this.add(e), this._updatePrimitive(e, t);
866
866
  break;
867
867
  }
868
868
  case "group": {
869
- e = new Rt(), e.name = t.name, e.userData.id = t.id, this.add(e), this._updateGroup(e, t);
869
+ e = new Vt(), e.name = t.name, e.userData.id = t.id, this.add(e), this._updateGroup(e, t);
870
870
  break;
871
871
  }
872
872
  default:
@@ -947,7 +947,7 @@ class Ct extends f {
947
947
  e.position.x,
948
948
  e.position.y,
949
949
  e.position.z
950
- ), e.intensity !== void 0 && e.intensity !== null && t.setIntensity(e.intensity), e.enabled !== void 0 && e.enabled !== null && t.setEnabled(e.enabled), e.color !== void 0 && e.color !== null && t.setColor(new _(e.color)), e.visible !== void 0 && e.visible !== null && (t.visible = e.visible), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
950
+ ), e.intensity !== void 0 && e.intensity !== null && t.setIntensity(e.intensity), e.enabled !== void 0 && e.enabled !== null && t.setEnabled(e.enabled), e.color !== void 0 && e.color !== null && t.setColor(new g(e.color)), e.visible !== void 0 && e.visible !== null && (t.visible = e.visible), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
951
951
  }
952
952
  _updateModel(t, e) {
953
953
  e.uri !== void 0 && t.setFromURL(e.uri), e.name !== void 0 && (t.name = e.name), e.position !== void 0 && t.setPosition(e.position), e.rotation !== void 0 && t.setRotation(e.rotation), e.scale !== void 0 && t.setScale(e.scale), e.visible !== void 0 && t.setVisibility(e.visible), e.material !== void 0 && t.setMaterial(e.material), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
@@ -1021,7 +1021,7 @@ class Gt extends wt {
1021
1021
  i(this, "isDIVEScene", !0);
1022
1022
  i(this, "_root");
1023
1023
  i(this, "_grid");
1024
- this.background = new _(
1024
+ this.setBackground(
1025
1025
  (t == null ? void 0 : t.backgroundColor) ?? v.backgroundColor
1026
1026
  ), this._root = new Ct(), this._root.floor.setVisibility(
1027
1027
  (t == null ? void 0 : t.displayFloor) ?? v.displayFloor
@@ -1036,7 +1036,7 @@ class Gt extends wt {
1036
1036
  return this._grid;
1037
1037
  }
1038
1038
  setBackground(t) {
1039
- this.background = new _(t);
1039
+ this.background = new g(t);
1040
1040
  }
1041
1041
  computeSceneBB() {
1042
1042
  return this._root.computeSceneBB();
@@ -1320,7 +1320,7 @@ const Ft = {
1320
1320
  this.object = t, this.domElements = Array.isArray(e) ? e : [e], Object.assign(this, a), this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.quat = new k().setFromUnitVectors(
1321
1321
  t.up,
1322
1322
  new h(0, 1, 0)
1323
- ), this.quatInverse = this.quat.clone().invert(), this.domElements.forEach((n) => this.addEventListeners(n)), this.update();
1323
+ ), this.quatInverse = this.quat.clone().invert(), this.domElements.forEach((r) => this.addEventListeners(r)), this.update();
1324
1324
  }
1325
1325
  get domElement() {
1326
1326
  return this.domElements[0];
@@ -1375,15 +1375,15 @@ const Ft = {
1375
1375
  this.removeDomElements(...this.domElements), this.domElements = [], this.addDomElements(...t);
1376
1376
  }
1377
1377
  computeEncompassingView(t, e = 0) {
1378
- const a = t.center, r = t.sphere.radius, l = this.object.fov * (Math.PI / 180), d = this.object.aspect, u = l / 2, D = Math.atan(Math.tan(u) * d), E = r / Math.sin(u), L = r / Math.sin(D), S = Math.max(E, L) * (1 + e), O = this.object.position.clone().sub(this.target).normalize(), $ = O.length() > 1e-3 ? O : new h(0, 0, 1);
1378
+ const a = t.center, n = t.sphere.radius, l = this.object.fov * (Math.PI / 180), d = this.object.aspect, u = l / 2, D = Math.atan(Math.tan(u) * d), E = n / Math.sin(u), L = n / Math.sin(D), S = Math.max(E, L) * (1 + e), O = this.object.position.clone().sub(this.target).normalize(), $ = O.length() > 1e-3 ? O : new h(0, 0, 1);
1379
1379
  return {
1380
1380
  position: a.clone().add($.multiplyScalar(S)),
1381
1381
  target: a
1382
1382
  };
1383
1383
  }
1384
1384
  focusObject(t, e = 0) {
1385
- const a = new V(t), n = this.computeEncompassingView(a, e);
1386
- this.object.position.copy(n.position), this.target.copy(n.target), this.update();
1385
+ const a = new R(t), r = this.computeEncompassingView(a, e);
1386
+ this.object.position.copy(r.position), this.target.copy(r.target), this.update();
1387
1387
  }
1388
1388
  zoomIn(t) {
1389
1389
  this.dollyIn(Math.pow(0.95, t ?? b.DEFAULT_ZOOM_FACTOR)), this.update();
@@ -1430,11 +1430,11 @@ const Ft = {
1430
1430
  this.sphericalDelta.phi -= t;
1431
1431
  }
1432
1432
  pan(t, e, a) {
1433
- const n = new h();
1433
+ const r = new h();
1434
1434
  if ("isPerspectiveCamera" in this.object) {
1435
- const r = this.object.position;
1436
- n.copy(r).sub(this.target);
1437
- let l = n.length();
1435
+ const n = this.object.position;
1436
+ r.copy(n).sub(this.target);
1437
+ let l = r.length();
1438
1438
  l *= Math.tan(
1439
1439
  this.object.fov / 2 * Math.PI / 180
1440
1440
  ), this.panLeft(
@@ -1516,21 +1516,21 @@ const Ft = {
1516
1516
  if (this.pointers.length === 1)
1517
1517
  this.rotateStart.set(t.pageX, t.pageY);
1518
1518
  else {
1519
- const e = this.getSecondPointer(t), a = 0.5 * (t.pageX + e.pageX), n = 0.5 * (t.pageY + e.pageY);
1520
- this.rotateStart.set(a, n);
1519
+ const e = this.getSecondPointer(t), a = 0.5 * (t.pageX + e.pageX), r = 0.5 * (t.pageY + e.pageY);
1520
+ this.rotateStart.set(a, r);
1521
1521
  }
1522
1522
  }
1523
1523
  handleTouchStartPan(t) {
1524
1524
  if (this.pointers.length === 1)
1525
1525
  this.panStart.set(t.pageX, t.pageY);
1526
1526
  else {
1527
- const e = this.getSecondPointer(t), a = 0.5 * (t.pageX + e.pageX), n = 0.5 * (t.pageY + e.pageY);
1528
- this.panStart.set(a, n);
1527
+ const e = this.getSecondPointer(t), a = 0.5 * (t.pageX + e.pageX), r = 0.5 * (t.pageY + e.pageY);
1528
+ this.panStart.set(a, r);
1529
1529
  }
1530
1530
  }
1531
1531
  handleTouchStartDolly(t) {
1532
- const e = this.getSecondPointer(t), a = t.pageX - e.pageX, n = t.pageY - e.pageY, r = Math.sqrt(a * a + n * n);
1533
- this.dollyStart.set(0, r);
1532
+ const e = this.getSecondPointer(t), a = t.pageX - e.pageX, r = t.pageY - e.pageY, n = Math.sqrt(a * a + r * r);
1533
+ this.dollyStart.set(0, n);
1534
1534
  }
1535
1535
  handleTouchStartDollyPan(t) {
1536
1536
  this.enableZoom && this.handleTouchStartDolly(t), this.enablePan && this.handleTouchStartPan(t);
@@ -1542,8 +1542,8 @@ const Ft = {
1542
1542
  if (this.pointers.length === 1)
1543
1543
  this.rotateEnd.set(t.pageX, t.pageY);
1544
1544
  else {
1545
- const a = this.getSecondPointer(t), n = 0.5 * (t.pageX + a.pageX), r = 0.5 * (t.pageY + a.pageY);
1546
- this.rotateEnd.set(n, r);
1545
+ const a = this.getSecondPointer(t), r = 0.5 * (t.pageX + a.pageX), n = 0.5 * (t.pageY + a.pageY);
1546
+ this.rotateEnd.set(r, n);
1547
1547
  }
1548
1548
  const e = t.currentTarget;
1549
1549
  this.rotateDelta.subVectors(this.rotateEnd, this.rotateStart).multiplyScalar(this.rotateSpeed), this.rotateLeft(
@@ -1556,15 +1556,15 @@ const Ft = {
1556
1556
  if (this.pointers.length === 1)
1557
1557
  this.panEnd.set(t.pageX, t.pageY);
1558
1558
  else {
1559
- const a = this.getSecondPointer(t), n = 0.5 * (t.pageX + a.pageX), r = 0.5 * (t.pageY + a.pageY);
1560
- this.panEnd.set(n, r);
1559
+ const a = this.getSecondPointer(t), r = 0.5 * (t.pageX + a.pageX), n = 0.5 * (t.pageY + a.pageY);
1560
+ this.panEnd.set(r, n);
1561
1561
  }
1562
1562
  const e = t.currentTarget;
1563
1563
  this.panDelta.subVectors(this.panEnd, this.panStart).multiplyScalar(this.panSpeed), this.pan(this.panDelta.x, this.panDelta.y, e), this.panStart.copy(this.panEnd);
1564
1564
  }
1565
1565
  handleTouchMoveDolly(t) {
1566
- const e = this.getSecondPointer(t), a = t.pageX - e.pageX, n = t.pageY - e.pageY, r = Math.sqrt(a * a + n * n);
1567
- this.dollyEnd.set(0, r), this.dollyDelta.set(
1566
+ const e = this.getSecondPointer(t), a = t.pageX - e.pageX, r = t.pageY - e.pageY, n = Math.sqrt(a * a + r * r);
1567
+ this.dollyEnd.set(0, n), this.dollyDelta.set(
1568
1568
  0,
1569
1569
  Math.pow(this.dollyEnd.y / this.dollyStart.y, this.zoomSpeed)
1570
1570
  ), this.dollyOut(this.dollyDelta.y), this.dollyStart.copy(this.dollyEnd);
@@ -1606,9 +1606,9 @@ class Ut extends f {
1606
1606
  super();
1607
1607
  i(this, "_axesHelper");
1608
1608
  this._axesHelper = new bt(0.5), this._axesHelper.layers.mask = y, this._axesHelper.material.depthTest = !1, this._axesHelper.position.set(0, 0, -1), this._axesHelper.setColors(
1609
- new _(Zt),
1610
- new _(Nt),
1611
- new _(Xt)
1609
+ new g(Zt),
1610
+ new g(Nt),
1611
+ new g(Xt)
1612
1612
  );
1613
1613
  const t = new T("X", 0.2, K), e = new T("Y", 0.2, Q), a = new T("Z", 0.2, J);
1614
1614
  t.layers.mask = y, e.layers.mask = y, a.layers.mask = y, t.position.set(0.7, 0, 0), e.position.set(0, 0.7, 0), a.position.set(0, 0, 0.7), this._axesHelper.add(t), this._axesHelper.add(e), this._axesHelper.add(a);
@@ -1701,13 +1701,11 @@ class Wt {
1701
1701
  this._settings = {
1702
1702
  ...P,
1703
1703
  ...s ?? {}
1704
- }, this._clock = new Mt(), this._scene = new Gt(), this.scene.setBackground(
1705
- (s == null ? void 0 : s.backgroundColor) ?? P.backgroundColor
1706
- ), this.scene.grid.setVisibility(
1707
- (s == null ? void 0 : s.displayGrid) ?? P.displayGrid
1708
- ), this.scene.root.floor.setVisibility(
1709
- (s == null ? void 0 : s.displayFloor) ?? P.displayFloor
1710
- );
1704
+ }, this._clock = new Mt(), this._scene = new Gt({
1705
+ backgroundColor: (s == null ? void 0 : s.backgroundColor) ?? P.backgroundColor,
1706
+ displayGrid: (s == null ? void 0 : s.displayGrid) ?? P.displayGrid,
1707
+ displayFloor: (s == null ? void 0 : s.displayFloor) ?? P.displayFloor
1708
+ });
1711
1709
  const t = new F(
1712
1710
  this._scene,
1713
1711
  new G(),
@@ -1717,7 +1715,7 @@ class Wt {
1717
1715
  this.mainView.renderer,
1718
1716
  this.scene,
1719
1717
  this.mainView.camera
1720
- ), this.clock.addTicker(this.orientationDisplay)) : this.orientationDisplay = null, console.log("DIVE 2.2.3 initialized successfully!"), console.log(Yt), window.DIVE.instances.push(this);
1718
+ ), this.clock.addTicker(this.orientationDisplay)) : this.orientationDisplay = null, console.log("DIVE 2.2.5 initialized successfully!"), console.log(Yt), window.DIVE.instances.push(this);
1721
1719
  }
1722
1720
  /**
1723
1721
  * @deprecated This static method will be removed in a future version. Please use `import { QuickView, QuickViewSettings, QuickViewDefaultSettings } from '@shopware-ag/dive/quickview'` instead.
@@ -1815,10 +1813,10 @@ const ee = Wt, K = "#c20017", Q = "#00ab26", J = "#0081d4", Zt = K, Nt = Q, Xt =
1815
1813
  export {
1816
1814
  Zt as A,
1817
1815
  C as B,
1818
- Vt as C,
1816
+ Rt as C,
1819
1817
  P as D,
1820
1818
  Ct as E,
1821
- V as F,
1819
+ R as F,
1822
1820
  Ot as G,
1823
1821
  X as H,
1824
1822
  qt as I,
@@ -1847,7 +1845,7 @@ export {
1847
1845
  zt as u,
1848
1846
  At as v,
1849
1847
  Bt as w,
1850
- Rt as x,
1848
+ Vt as x,
1851
1849
  It as y,
1852
1850
  Tt as z
1853
1851
  };