@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.
- package/dist/cjs/vertex-viewer.cjs.entry.js +10 -6
- package/dist/cjs/vertex-viewer.cjs.entry.js.map +1 -1
- package/dist/collection/components/viewer/viewer.js +8 -3
- package/dist/collection/components/viewer/viewer.js.map +1 -1
- package/dist/collection/lib/interactions/interactionApi.js +3 -4
- package/dist/collection/lib/interactions/interactionApi.js.map +1 -1
- package/dist/components/vertex-viewer.js +10 -6
- package/dist/components/vertex-viewer.js.map +1 -1
- package/dist/esm/vertex-viewer.entry.js +10 -6
- package/dist/esm/vertex-viewer.entry.js.map +1 -1
- package/dist/types/components/viewer/viewer.d.ts +7 -2
- package/dist/types/components.d.ts +2 -2
- package/dist/viewer/p-66580da0.entry.js +5 -0
- package/dist/viewer/p-66580da0.entry.js.map +1 -0
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +7 -7
- package/readme.md +4 -4
- package/dist/viewer/p-caaf5f09.entry.js +0 -5
- package/dist/viewer/p-caaf5f09.entry.js.map +0 -1
|
@@ -696,7 +696,7 @@ class InteractionApi {
|
|
|
696
696
|
* viewer.
|
|
697
697
|
*/
|
|
698
698
|
async rotateCamera(delta) {
|
|
699
|
-
return this.transformCamera(({ camera, viewport
|
|
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,
|
|
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,
|
|
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
|
-
*
|
|
2939
|
-
*
|
|
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
|
/**
|