|
@@ -11796,7 +11796,7 @@ var BABYLON;
|
|
|
* Returns the current version of the framework
|
|
|
*/
|
|
|
get: function () {
|
|
|
- return "3.3.0-beta.3";
|
|
|
+ return "3.3.0-beta.4";
|
|
|
},
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
@@ -93814,7 +93814,7 @@ var BABYLON;
|
|
|
_dragBehavior.onDragObservable.add(function (event) {
|
|
|
_this.onRotationSphereDragObservable.notifyObservers({});
|
|
|
if (_this.attachedMesh) {
|
|
|
- _this.removeAndStorePivotPoint();
|
|
|
+ _this._removeAndStorePivotPoint();
|
|
|
var worldDragDirection = startingTurnDirection;
|
|
|
// Project the world right on to the drag plane
|
|
|
var toSub = event.dragPlaneNormal.scale(BABYLON.Vector3.Dot(event.dragPlaneNormal, worldDragDirection));
|
|
@@ -93848,7 +93848,7 @@ var BABYLON;
|
|
|
_this._anchorMesh.removeChild(_this.attachedMesh);
|
|
|
}
|
|
|
_this.updateBoundingBox();
|
|
|
- _this.restorePivotPoint();
|
|
|
+ _this._restorePivotPoint();
|
|
|
}
|
|
|
});
|
|
|
// Selection/deselection
|
|
@@ -93883,7 +93883,7 @@ var BABYLON;
|
|
|
_dragBehavior.onDragObservable.add(function (event) {
|
|
|
_this.onScaleBoxDragObservable.notifyObservers({});
|
|
|
if (_this.attachedMesh) {
|
|
|
- _this.removeAndStorePivotPoint();
|
|
|
+ _this._removeAndStorePivotPoint();
|
|
|
var relativeDragDistance = (event.dragDistance / _this._boundingDimensions.length()) * _this._anchorMesh.scaling.length();
|
|
|
var deltaScale = new BABYLON.Vector3(relativeDragDistance, relativeDragDistance, relativeDragDistance);
|
|
|
deltaScale.scaleInPlace(_this._scaleDragSpeed);
|
|
@@ -93909,7 +93909,7 @@ var BABYLON;
|
|
|
_this._anchorMesh.scaling.subtractInPlace(deltaScale);
|
|
|
}
|
|
|
_this._anchorMesh.removeChild(_this.attachedMesh);
|
|
|
- _this.restorePivotPoint();
|
|
|
+ _this._restorePivotPoint();
|
|
|
}
|
|
|
});
|
|
|
// Selection/deselection
|
|
@@ -93958,7 +93958,7 @@ var BABYLON;
|
|
|
_this.updateBoundingBox();
|
|
|
return _this;
|
|
|
}
|
|
|
- BoundingBoxGizmo.prototype.removeAndStorePivotPoint = function () {
|
|
|
+ BoundingBoxGizmo.prototype._removeAndStorePivotPoint = function () {
|
|
|
if (this.attachedMesh && this._pivotCached === 0) {
|
|
|
// Save old pivot and set pivot to 0,0,0
|
|
|
this.attachedMesh.getPivotPointToRef(this._oldPivotPoint);
|
|
@@ -93974,7 +93974,7 @@ var BABYLON;
|
|
|
}
|
|
|
this._pivotCached++;
|
|
|
};
|
|
|
- BoundingBoxGizmo.prototype.restorePivotPoint = function () {
|
|
|
+ BoundingBoxGizmo.prototype._restorePivotPoint = function () {
|
|
|
if (this.attachedMesh && !this._oldPivotPoint.equalsToFloats(0, 0, 0) && this._pivotCached === 1) {
|
|
|
this.attachedMesh.setPivotPoint(this._oldPivotPoint);
|
|
|
this._tmpVector.copyFromFloats(1, 1, 1);
|
|
@@ -93988,8 +93988,10 @@ var BABYLON;
|
|
|
if (value) {
|
|
|
// Reset anchor mesh to match attached mesh's scale
|
|
|
// This is needed to avoid invalid box/sphere position on first drag
|
|
|
+ this._removeAndStorePivotPoint();
|
|
|
this._anchorMesh.addChild(value);
|
|
|
this._anchorMesh.removeChild(value);
|
|
|
+ this._restorePivotPoint();
|
|
|
this.updateBoundingBox();
|
|
|
}
|
|
|
};
|
|
@@ -94013,7 +94015,7 @@ var BABYLON;
|
|
|
*/
|
|
|
BoundingBoxGizmo.prototype.updateBoundingBox = function () {
|
|
|
if (this.attachedMesh) {
|
|
|
- this.removeAndStorePivotPoint();
|
|
|
+ this._removeAndStorePivotPoint();
|
|
|
this._update();
|
|
|
// Rotate based on axis
|
|
|
if (!this.attachedMesh.rotationQuaternion) {
|
|
@@ -94104,7 +94106,7 @@ var BABYLON;
|
|
|
}
|
|
|
if (this.attachedMesh) {
|
|
|
this._existingMeshScale.copyFrom(this.attachedMesh.scaling);
|
|
|
- this.restorePivotPoint();
|
|
|
+ this._restorePivotPoint();
|
|
|
}
|
|
|
};
|
|
|
/**
|