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