@inweb/viewer-three 26.3.3 → 26.4.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.
@@ -1627,14 +1627,14 @@ function getDefaultViewPositions() {
1627
1627
  function getModels(viewer) {
1628
1628
  return viewer.models.map((model => {
1629
1629
  var _a;
1630
- return ((_a = model.userData) === null || _a === void 0 ? void 0 : _a.handle) || "";
1630
+ return ((_a = model.userData) === null || _a === undefined ? undefined : _a.handle) || "";
1631
1631
  })).filter((handle => handle));
1632
1632
  }
1633
1633
 
1634
1634
  function getSelected(viewer) {
1635
1635
  return viewer.selected.map((object => {
1636
1636
  var _a;
1637
- return (_a = object.userData) === null || _a === void 0 ? void 0 : _a.handle;
1637
+ return (_a = object.userData) === null || _a === undefined ? undefined : _a.handle;
1638
1638
  })).filter((handle => handle));
1639
1639
  }
1640
1640
 
@@ -1802,7 +1802,7 @@ function setSelected(viewer, handles = []) {
1802
1802
  const objects = [];
1803
1803
  viewer.scene.traverseVisible((child => {
1804
1804
  var _a;
1805
- if (handleSet.has((_a = child.userData) === null || _a === void 0 ? void 0 : _a.handle)) objects.push(child);
1805
+ if (handleSet.has((_a = child.userData) === null || _a === undefined ? undefined : _a.handle)) objects.push(child);
1806
1806
  }));
1807
1807
  const selection = viewer.getComponent("SelectionComponent");
1808
1808
  if (!selection) return;
@@ -1833,7 +1833,7 @@ function zoomToObjects(viewer, handles = []) {
1833
1833
  const objects = [];
1834
1834
  viewer.scene.traverseVisible((child => {
1835
1835
  var _a;
1836
- if (handleSet.has((_a = child.userData) === null || _a === void 0 ? void 0 : _a.handle)) objects.push(child);
1836
+ if (handleSet.has((_a = child.userData) === null || _a === undefined ? undefined : _a.handle)) objects.push(child);
1837
1837
  }));
1838
1838
  const extents = objects.reduce(((result, object) => result.expandByObject(object)), new Box3);
1839
1839
  if (extents.isEmpty()) extents.copy(viewer.extents);
@@ -2220,7 +2220,7 @@ class GLTFLoadingManager extends LoadingManager {
2220
2220
  this.setURLModifier((url => {
2221
2221
  const key = decodeURI(url).replace(this.path, "").replace(this.resourcePath, "").replace(/^(\.?\/)/, "");
2222
2222
  const dataURL = this.dataURLs.get(key);
2223
- return dataURL !== null && dataURL !== void 0 ? dataURL : url;
2223
+ return dataURL !== null && dataURL !== undefined ? dataURL : url;
2224
2224
  }));
2225
2225
  }
2226
2226
  dispose() {
@@ -2340,7 +2340,7 @@ class Viewer extends EventEmitter2 {
2340
2340
  this.renderer.autoClear = false;
2341
2341
  this.renderer.render(this.helpers, this.camera);
2342
2342
  this.renderer.clippingPlanes = clippingPlanes;
2343
- (_b = (_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.updatePreview) === null || _b === void 0 ? void 0 : _b.call(_a);
2343
+ (_b = (_a = this._activeDragger) === null || _a === undefined ? undefined : _a.updatePreview) === null || _b === undefined ? undefined : _b.call(_a);
2344
2344
  const deltaTime = (time - this.renderTime) / 1e3;
2345
2345
  this.renderTime = time;
2346
2346
  this.emitEvent({
@@ -2530,7 +2530,7 @@ class Viewer extends EventEmitter2 {
2530
2530
  newDragger = draggers.createDragger(name, this);
2531
2531
  if (newDragger) {
2532
2532
  this._activeDragger = newDragger;
2533
- (_b = (_a = this._activeDragger).initialize) === null || _b === void 0 ? void 0 : _b.call(_a);
2533
+ (_b = (_a = this._activeDragger).initialize) === null || _b === undefined ? undefined : _b.call(_a);
2534
2534
  }
2535
2535
  }
2536
2536
  const canvas = this.canvas;
@@ -2643,7 +2643,7 @@ class Viewer extends EventEmitter2 {
2643
2643
  }
2644
2644
  };
2645
2645
  const setClippingPlanes = clipping_planes => {
2646
- clipping_planes === null || clipping_planes === void 0 ? void 0 : clipping_planes.forEach((clipping_plane => {
2646
+ clipping_planes === null || clipping_planes === undefined ? undefined : clipping_planes.forEach((clipping_plane => {
2647
2647
  const plane = new Plane;
2648
2648
  plane.setFromNormalAndCoplanarPoint(getVector3FromPoint3d(clipping_plane.direction), getVector3FromPoint3d(clipping_plane.location));
2649
2649
  this.renderer.clippingPlanes.push(plane);
@@ -2652,7 +2652,7 @@ class Viewer extends EventEmitter2 {
2652
2652
  const setSelection = selection => {
2653
2653
  if (selection) this.setSelected(selection.map((component => component.handle)));
2654
2654
  };
2655
- const draggerName = (_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.name;
2655
+ const draggerName = (_a = this._activeDragger) === null || _a === undefined ? undefined : _a.name;
2656
2656
  this.setActiveDragger();
2657
2657
  this.clearSlices();
2658
2658
  this.clearOverlay();
@@ -2664,7 +2664,7 @@ class Viewer extends EventEmitter2 {
2664
2664
  setClippingPlanes(viewpoint.clipping_planes);
2665
2665
  setSelection(viewpoint.selection);
2666
2666
  this._markup.setViewpoint(viewpoint);
2667
- this.target = getVector3FromPoint3d((_c = (_b = viewpoint.custom_fields) === null || _b === void 0 ? void 0 : _b.camera_target) !== null && _c !== void 0 ? _c : this.target);
2667
+ this.target = getVector3FromPoint3d((_c = (_b = viewpoint.custom_fields) === null || _b === undefined ? undefined : _b.camera_target) !== null && _c !== undefined ? _c : this.target);
2668
2668
  this.setActiveDragger(draggerName);
2669
2669
  this.emitEvent({
2670
2670
  type: "drawviewpoint",