@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
|
@@ -700,7 +700,7 @@ class InteractionApi {
|
|
|
700
700
|
* viewer.
|
|
701
701
|
*/
|
|
702
702
|
async rotateCamera(delta) {
|
|
703
|
-
return this.transformCamera(({ camera, viewport
|
|
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,
|
|
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,
|
|
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
|
-
*
|
|
2943
|
-
*
|
|
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
|
/**
|