Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
yomotsu committed Oct 3, 2021
1 parent bac8ff8 commit 1785155
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 3 additions & 4 deletions dist/camera-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@
}

var PI_2 = Math.PI * 2;
var PI_HALF = Math.PI / 2;
var FPS_60 = 60;
var PI_HALF = Math.PI / 2;

var EPSILON = 1e-5;
function approxZero(number, error) {
Expand Down Expand Up @@ -893,7 +892,7 @@
};
CameraControls.prototype.pan = function (x, y, enableTransition) {
if (enableTransition === void 0) { enableTransition = false; }
console.log('`pan` has been renamed to `truck`');
console.warn('`pan` has been renamed to `truck`');
return this.truck(x, y, enableTransition);
};
CameraControls.prototype.truck = function (x, y, enableTransition) {
Expand Down Expand Up @@ -1182,7 +1181,7 @@
};
CameraControls.prototype.update = function (delta) {
var dampingFactor = this._state === ACTION.NONE ? this.dampingFactor : this.draggingDampingFactor;
var lerpRatio = 1.0 - Math.exp(-dampingFactor * delta * FPS_60);
var lerpRatio = dampingFactor >= 1 ? 1 : dampingFactor * delta * 60;
var deltaTheta = this._sphericalEnd.theta - this._spherical.theta;
var deltaPhi = this._sphericalEnd.phi - this._spherical.phi;
var deltaRadius = this._sphericalEnd.radius - this._spherical.radius;
Expand Down
2 changes: 1 addition & 1 deletion dist/camera-controls.min.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/camera-controls.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ function isOrthographicCamera(camera) {
}

var PI_2 = Math.PI * 2;
var PI_HALF = Math.PI / 2;
var FPS_60 = 60;
var PI_HALF = Math.PI / 2;

var EPSILON = 1e-5;
function approxZero(number, error) {
Expand Down Expand Up @@ -887,7 +886,7 @@ var CameraControls = (function (_super) {
};
CameraControls.prototype.pan = function (x, y, enableTransition) {
if (enableTransition === void 0) { enableTransition = false; }
console.log('`pan` has been renamed to `truck`');
console.warn('`pan` has been renamed to `truck`');
return this.truck(x, y, enableTransition);
};
CameraControls.prototype.truck = function (x, y, enableTransition) {
Expand Down Expand Up @@ -1176,7 +1175,7 @@ var CameraControls = (function (_super) {
};
CameraControls.prototype.update = function (delta) {
var dampingFactor = this._state === ACTION.NONE ? this.dampingFactor : this.draggingDampingFactor;
var lerpRatio = 1.0 - Math.exp(-dampingFactor * delta * FPS_60);
var lerpRatio = dampingFactor >= 1 ? 1 : dampingFactor * delta * 60;
var deltaTheta = this._sphericalEnd.theta - this._spherical.theta;
var deltaPhi = this._sphericalEnd.phi - this._spherical.phi;
var deltaRadius = this._sphericalEnd.radius - this._spherical.radius;
Expand Down
1 change: 0 additions & 1 deletion dist/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export declare const PI_2: number;
export declare const PI_HALF: number;
export declare const FPS_60 = 60;

0 comments on commit 1785155

Please sign in to comment.