Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
yomotsu committed Oct 12, 2022
1 parent ec8c00c commit 6ce33ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions dist/CameraControls.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ export declare class CameraControls extends EventDispatcher {
setFocalOffset(x: number, y: number, z: number, enableTransition?: boolean): Promise<void>;
/**
* Set orbit point without moving the camera.
* SHOULD NOT RUN DURING ANIMATIONS. `setOrbitPoint()` will immediately fix the positions.
* @param targetX
* @param targetY
* @param targetZ
Expand Down
7 changes: 5 additions & 2 deletions dist/camera-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1564,12 +1564,14 @@
}
/**
* Set orbit point without moving the camera.
* SHOULD NOT RUN DURING ANIMATIONS. `setOrbitPoint()` will immediately fix the positions.
* @param targetX
* @param targetY
* @param targetZ
* @category Methods
*/
setOrbitPoint(targetX, targetY, targetZ) {
this._camera.updateMatrixWorld();
_xColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 0);
_yColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 1);
_zColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
Expand Down Expand Up @@ -1710,9 +1712,10 @@
* @category Methods
*/
saveState() {
this._target0.copy(this._target);
this._position0.copy(this._camera.position);
this.getTarget(this._target0);
this.getPosition(this._position0);
this._zoom0 = this._zoom;
this._focalOffset0.copy(this._focalOffset);
}
/**
* Sync camera-up direction.
Expand Down
2 changes: 1 addition & 1 deletion dist/camera-controls.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions dist/camera-controls.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -1558,12 +1558,14 @@ class CameraControls extends EventDispatcher {
}
/**
* Set orbit point without moving the camera.
* SHOULD NOT RUN DURING ANIMATIONS. `setOrbitPoint()` will immediately fix the positions.
* @param targetX
* @param targetY
* @param targetZ
* @category Methods
*/
setOrbitPoint(targetX, targetY, targetZ) {
this._camera.updateMatrixWorld();
_xColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 0);
_yColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 1);
_zColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
Expand Down Expand Up @@ -1704,9 +1706,10 @@ class CameraControls extends EventDispatcher {
* @category Methods
*/
saveState() {
this._target0.copy(this._target);
this._position0.copy(this._camera.position);
this.getTarget(this._target0);
this.getPosition(this._position0);
this._zoom0 = this._zoom;
this._focalOffset0.copy(this._focalOffset);
}
/**
* Sync camera-up direction.
Expand Down

0 comments on commit 6ce33ff

Please sign in to comment.