@inweb/viewer-three 26.10.5 → 26.10.6

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.
@@ -33714,6 +33714,9 @@ void main() {
33714
33714
  this.orbit.object = this.viewer.camera;
33715
33715
  this.orbit.update();
33716
33716
  };
33717
+ this.optionsChange = ({ data: options }) => {
33718
+ this.orbit.zoomSpeed = Math.abs(this.orbit.zoomSpeed) * (options.reverseZoomWheel ? -1 : 1);
33719
+ };
33717
33720
  this.controlsStart = () => {
33718
33721
  this.changed = false;
33719
33722
  };
@@ -33769,6 +33772,7 @@ void main() {
33769
33772
  this.viewer.addEventListener("zoom", this.updateControls);
33770
33773
  this.viewer.addEventListener("drawviewpoint", this.updateControls);
33771
33774
  this.viewer.addEventListener("changecameramode", this.updateControlsCamera);
33775
+ this.viewer.addEventListener("optionschange", this.optionsChange);
33772
33776
  this.viewer.addEventListener("contextmenu", this.stopContextMenu);
33773
33777
  this.updateControls();
33774
33778
  }
@@ -33779,6 +33783,7 @@ void main() {
33779
33783
  this.viewer.removeEventListener("zoom", this.updateControls);
33780
33784
  this.viewer.removeEventListener("drawviewpoint", this.updateControls);
33781
33785
  this.viewer.removeEventListener("changecameramode", this.updateControlsCamera);
33786
+ this.viewer.removeEventListener("optionschange", this.optionsChange);
33782
33787
  this.viewer.removeEventListener("contextmenu", this.stopContextMenu);
33783
33788
  this.orbit.removeEventListener("start", this.controlsStart);
33784
33789
  this.orbit.removeEventListener("change", this.controlsChange);
@@ -36304,8 +36309,9 @@ void main() {
36304
36309
  });
36305
36310
  }
36306
36311
  syncHighlightColors() {
36307
- const { facesColor, facesTransparancy, facesOverlap } = this.viewer.options;
36308
- const { edgesColor, edgesVisibility, edgesOverlap } = this.viewer.options;
36312
+ const options = this.viewer.options.enableCustomHighlight ? this.viewer.options : Options.defaults();
36313
+ const { facesColor, facesTransparancy, facesOverlap } = options;
36314
+ const { edgesColor, edgesVisibility, edgesOverlap } = options;
36309
36315
  this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);
36310
36316
  this.facesMaterial.opacity = (255 - facesTransparancy) / 255;
36311
36317
  this.facesMaterial.depthTest = !facesOverlap;