Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
yomotsu committed Aug 24, 2022
1 parent b482d5a commit 8d78506
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/camera-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,8 @@
.add(planeY.multiplyScalar(this._dollyControlCoord.y * worldToScreen));
this._targetEnd.lerp(cursor, lerpRatio);
this._target.copy(this._targetEnd);
// target position may be moved beyond boundary.
this._boundary.clampPoint(this._targetEnd, this._targetEnd);
}
else if (isOrthographicCamera(this._camera)) {
const camera = this._camera;
Expand All @@ -1780,6 +1782,8 @@
const cursor = _v3C.copy(worldPosition).add(quaternion.multiplyScalar(distance));
this._targetEnd.lerp(cursor, 1 - camera.zoom / this._dollyControlAmount);
this._target.copy(this._targetEnd);
// target position may be moved beyond boundary.
this._boundary.clampPoint(this._targetEnd, this._targetEnd);
}
this._dollyControlAmount = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/camera-controls.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/camera-controls.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,8 @@ class CameraControls extends EventDispatcher {
.add(planeY.multiplyScalar(this._dollyControlCoord.y * worldToScreen));
this._targetEnd.lerp(cursor, lerpRatio);
this._target.copy(this._targetEnd);
// target position may be moved beyond boundary.
this._boundary.clampPoint(this._targetEnd, this._targetEnd);
}
else if (isOrthographicCamera(this._camera)) {
const camera = this._camera;
Expand All @@ -1774,6 +1776,8 @@ class CameraControls extends EventDispatcher {
const cursor = _v3C.copy(worldPosition).add(quaternion.multiplyScalar(distance));
this._targetEnd.lerp(cursor, 1 - camera.zoom / this._dollyControlAmount);
this._target.copy(this._targetEnd);
// target position may be moved beyond boundary.
this._boundary.clampPoint(this._targetEnd, this._targetEnd);
}
this._dollyControlAmount = 0;
}
Expand Down

0 comments on commit 8d78506

Please sign in to comment.