@vertexvis/viewer 0.23.8-canary.2 → 0.23.8

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.
@@ -700,7 +700,7 @@ class InteractionApi {
700
700
  * viewer.
701
701
  */
702
702
  async rotateCamera(delta) {
703
- return this.transformCamera(({ camera, viewport, boundingBox }) => {
703
+ return this.transformCamera(({ camera, viewport }) => {
704
704
  const upVector = bundle_esm.vector3.normalize(camera.up);
705
705
  const directionVector = bundle_esm.vector3.normalize(bundle_esm.vector3.subtract(camera.lookAt, camera.position));
706
706
  const crossX = bundle_esm.vector3.cross(upVector, directionVector);
@@ -719,12 +719,11 @@ class InteractionApi {
719
719
  });
720
720
  }
721
721
  async rotateCameraAtPoint(delta, point) {
722
- return this.transformCamera(({ camera, viewport, boundingBox, depthBuffer }) => {
722
+ return this.transformCamera(({ camera, viewport, depthBuffer }) => {
723
723
  if (this.worldRotationPoint == null) {
724
- const worldCenter = bundle_esm.boundingBox.center(boundingBox);
725
724
  this.worldRotationPoint =
726
725
  depthBuffer != null
727
- ? this.getWorldPoint(point, depthBuffer, worldCenter)
726
+ ? this.getWorldPoint(point, depthBuffer, camera.lookAt)
728
727
  : camera.lookAt;
729
728
  }
730
729
  const upVector = bundle_esm.vector3.normalize(camera.up);
@@ -2939,8 +2938,13 @@ const Viewer = class {
2939
2938
  */
2940
2939
  this.keyboardControls = true;
2941
2940
  /**
2942
- * Enables or disables the default rotation interaction being changed to
2943
- * rotate around the pointer down location.
2941
+ * Sets the rotation interaction behavior. True by default.
2942
+ *
2943
+ * When rotateAroundTapPoint is true and the user clicks on geometry, then the model will rotate
2944
+ * around the point that was clicked. When rotateAroundTapPoint is true and the user clicks
2945
+ * in empty space (not on geometry), then the model will rotate around the center of the viewport.
2946
+ *
2947
+ * When rotateAroundTapPoint is false, then the model will always rotate around the center of the viewport.
2944
2948
  */
2945
2949
  this.rotateAroundTapPoint = true;
2946
2950
  /**