|
@@ -11969,7 +11969,7 @@ var BABYLON;
|
|
* Returns the current version of the framework
|
|
* Returns the current version of the framework
|
|
*/
|
|
*/
|
|
get: function () {
|
|
get: function () {
|
|
- return "3.3.0-beta.6";
|
|
|
|
|
|
+ return "3.3.0-rc.0";
|
|
},
|
|
},
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
@@ -47748,7 +47748,9 @@ var BABYLON;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (this.keysReset.indexOf(keyCode) !== -1) {
|
|
else if (this.keysReset.indexOf(keyCode) !== -1) {
|
|
- camera.restoreState();
|
|
|
|
|
|
+ if (camera.useInputToRestoreState) {
|
|
|
|
+ camera.restoreState();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -47993,7 +47995,9 @@ var BABYLON;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (p.type === BABYLON.PointerEventTypes.POINTERDOUBLETAP) {
|
|
else if (p.type === BABYLON.PointerEventTypes.POINTERDOUBLETAP) {
|
|
- _this.camera.restoreState();
|
|
|
|
|
|
+ if (_this.camera.useInputToRestoreState) {
|
|
|
|
+ _this.camera.restoreState();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else if (p.type === BABYLON.PointerEventTypes.POINTERUP && srcElement) {
|
|
else if (p.type === BABYLON.PointerEventTypes.POINTERUP && srcElement) {
|
|
try {
|
|
try {
|
|
@@ -48446,6 +48450,10 @@ var BABYLON;
|
|
* If false the camera can not arrive upside down.
|
|
* If false the camera can not arrive upside down.
|
|
*/
|
|
*/
|
|
_this.allowUpsideDown = true;
|
|
_this.allowUpsideDown = true;
|
|
|
|
+ /**
|
|
|
|
+ * Define if double tap/click is used to restore the previously saved state of the camera.
|
|
|
|
+ */
|
|
|
|
+ _this.useInputToRestoreState = true;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_this._viewMatrix = new BABYLON.Matrix();
|
|
_this._viewMatrix = new BABYLON.Matrix();
|
|
/**
|
|
/**
|
|
@@ -49320,6 +49328,9 @@ var BABYLON;
|
|
__decorate([
|
|
__decorate([
|
|
BABYLON.serialize()
|
|
BABYLON.serialize()
|
|
], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
|
|
], ArcRotateCamera.prototype, "allowUpsideDown", void 0);
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize()
|
|
|
|
+ ], ArcRotateCamera.prototype, "useInputToRestoreState", void 0);
|
|
return ArcRotateCamera;
|
|
return ArcRotateCamera;
|
|
}(BABYLON.TargetCamera));
|
|
}(BABYLON.TargetCamera));
|
|
BABYLON.ArcRotateCamera = ArcRotateCamera;
|
|
BABYLON.ArcRotateCamera = ArcRotateCamera;
|
|
@@ -108285,6 +108296,11 @@ var BABYLON;
|
|
this._elevationReturnWaitTime = 1000;
|
|
this._elevationReturnWaitTime = 1000;
|
|
this._zoomStopsAnimation = false;
|
|
this._zoomStopsAnimation = false;
|
|
this._framingTime = 1500;
|
|
this._framingTime = 1500;
|
|
|
|
+ /**
|
|
|
|
+ * Define if the behavior should automatically change the configured
|
|
|
|
+ * camera limits and sensibilities.
|
|
|
|
+ */
|
|
|
|
+ this.autoCorrectCameraLimitsAndSensibility = true;
|
|
this._isPointerDown = false;
|
|
this._isPointerDown = false;
|
|
this._lastInteractionTime = -Infinity;
|
|
this._lastInteractionTime = -Infinity;
|
|
// Framing control
|
|
// Framing control
|
|
@@ -108580,19 +108596,23 @@ var BABYLON;
|
|
var radius = 0;
|
|
var radius = 0;
|
|
if (this._mode === FramingBehavior.FitFrustumSidesMode) {
|
|
if (this._mode === FramingBehavior.FitFrustumSidesMode) {
|
|
var position = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
|
|
var position = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
|
|
- this._attachedCamera.lowerRadiusLimit = radiusWorld.length() + this._attachedCamera.minZ;
|
|
|
|
|
|
+ if (this.autoCorrectCameraLimitsAndSensibility) {
|
|
|
|
+ this._attachedCamera.lowerRadiusLimit = radiusWorld.length() + this._attachedCamera.minZ;
|
|
|
|
+ }
|
|
radius = position;
|
|
radius = position;
|
|
}
|
|
}
|
|
else if (this._mode === FramingBehavior.IgnoreBoundsSizeMode) {
|
|
else if (this._mode === FramingBehavior.IgnoreBoundsSizeMode) {
|
|
radius = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
|
|
radius = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
|
|
- if (this._attachedCamera.lowerRadiusLimit === null) {
|
|
|
|
|
|
+ if (this.autoCorrectCameraLimitsAndSensibility && this._attachedCamera.lowerRadiusLimit === null) {
|
|
this._attachedCamera.lowerRadiusLimit = this._attachedCamera.minZ;
|
|
this._attachedCamera.lowerRadiusLimit = this._attachedCamera.minZ;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// Set sensibilities
|
|
// Set sensibilities
|
|
- var extend = maximumWorld.subtract(minimumWorld).length();
|
|
|
|
- this._attachedCamera.panningSensibility = 5000 / extend;
|
|
|
|
- this._attachedCamera.wheelPrecision = 100 / radius;
|
|
|
|
|
|
+ if (this.autoCorrectCameraLimitsAndSensibility) {
|
|
|
|
+ var extend = maximumWorld.subtract(minimumWorld).length();
|
|
|
|
+ this._attachedCamera.panningSensibility = 5000 / extend;
|
|
|
|
+ this._attachedCamera.wheelPrecision = 100 / radius;
|
|
|
|
+ }
|
|
// transition to new radius
|
|
// transition to new radius
|
|
if (!this._radiusTransition) {
|
|
if (!this._radiusTransition) {
|
|
this._radiusTransition = BABYLON.Animation.CreateAnimation("radius", BABYLON.Animation.ANIMATIONTYPE_FLOAT, 60, FramingBehavior.EasingFunction);
|
|
this._radiusTransition = BABYLON.Animation.CreateAnimation("radius", BABYLON.Animation.ANIMATIONTYPE_FLOAT, 60, FramingBehavior.EasingFunction);
|