|
@@ -11,7 +11,8 @@
|
|
public upperBetaLimit = Math.PI;
|
|
public upperBetaLimit = Math.PI;
|
|
public lowerRadiusLimit = null;
|
|
public lowerRadiusLimit = null;
|
|
public upperRadiusLimit = null;
|
|
public upperRadiusLimit = null;
|
|
- public angularSensibility = 1000.0;
|
|
|
|
|
|
+ public angularSensibilityX = 1000.0;
|
|
|
|
+ public angularSensibilityY = 1000.0;
|
|
public wheelPrecision = 3.0;
|
|
public wheelPrecision = 3.0;
|
|
public pinchPrecision = 2.0;
|
|
public pinchPrecision = 2.0;
|
|
public panningSensibility: number = 50.0;
|
|
public panningSensibility: number = 50.0;
|
|
@@ -171,8 +172,8 @@
|
|
} else {
|
|
} else {
|
|
var offsetX = evt.clientX - cacheSoloPointer.x;
|
|
var offsetX = evt.clientX - cacheSoloPointer.x;
|
|
var offsetY = evt.clientY - cacheSoloPointer.y;
|
|
var offsetY = evt.clientY - cacheSoloPointer.y;
|
|
- this.inertialAlphaOffset -= offsetX / this.angularSensibility;
|
|
|
|
- this.inertialBetaOffset -= offsetY / this.angularSensibility;
|
|
|
|
|
|
+ this.inertialAlphaOffset -= offsetX / this.angularSensibilityX;
|
|
|
|
+ this.inertialBetaOffset -= offsetY / this.angularSensibilityY;
|
|
}
|
|
}
|
|
cacheSoloPointer.x = evt.clientX;
|
|
cacheSoloPointer.x = evt.clientX;
|
|
cacheSoloPointer.y = evt.clientY;
|
|
cacheSoloPointer.y = evt.clientY;
|
|
@@ -192,7 +193,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
if (pinchSquaredDistance !== previousPinchDistance) {
|
|
if (pinchSquaredDistance !== previousPinchDistance) {
|
|
- this.inertialRadiusOffset += (pinchSquaredDistance - previousPinchDistance) / (this.pinchPrecision * this.wheelPrecision * this.angularSensibility * direction);
|
|
|
|
|
|
+ this.inertialRadiusOffset += (pinchSquaredDistance - previousPinchDistance) / (this.pinchPrecision * this.wheelPrecision * ((this.angularSensibilityX+this.angularSensibilityY)/2) * direction);
|
|
previousPinchDistance = pinchSquaredDistance;
|
|
previousPinchDistance = pinchSquaredDistance;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
@@ -213,8 +214,8 @@
|
|
var offsetX = evt.movementX || evt.mozMovementX || evt.webkitMovementX || evt.msMovementX || 0;
|
|
var offsetX = evt.movementX || evt.mozMovementX || evt.webkitMovementX || evt.msMovementX || 0;
|
|
var offsetY = evt.movementY || evt.mozMovementY || evt.webkitMovementY || evt.msMovementY || 0;
|
|
var offsetY = evt.movementY || evt.mozMovementY || evt.webkitMovementY || evt.msMovementY || 0;
|
|
|
|
|
|
- this.inertialAlphaOffset -= offsetX / this.angularSensibility;
|
|
|
|
- this.inertialBetaOffset -= offsetY / this.angularSensibility;
|
|
|
|
|
|
+ this.inertialAlphaOffset -= offsetX / this.angularSensibilityX;
|
|
|
|
+ this.inertialBetaOffset -= offsetY / this.angularSensibilityY;
|
|
|
|
|
|
if (!noPreventDefault) {
|
|
if (!noPreventDefault) {
|
|
evt.preventDefault();
|
|
evt.preventDefault();
|