|
@@ -63832,7 +63832,7 @@ void main() {
|
|
|
}
|
|
|
model.dispatchEvent('transformChanged');
|
|
|
});
|
|
|
- model.addEventListener("orientation_changed", maintainBtmZAndCenter );
|
|
|
+ model.addEventListener("rotation_changed", maintainBtmZAndCenter );
|
|
|
model.addEventListener("scale_changed", maintainBtmZAndCenter );
|
|
|
|
|
|
|
|
@@ -115338,6 +115338,9 @@ ENDSEC
|
|
|
this.object.updateMatrixWorld();
|
|
|
this.object.parent.matrixWorld.decompose( parentPosition, parentQuaternion, parentScale );
|
|
|
this.object.matrixWorld.decompose( worldPosition, worldQuaternion, worldScale );
|
|
|
+ //add 使坐标轴在boundingBox中心
|
|
|
+ boundingBox && this.object.boundingBox.getCenter(worldPosition).applyMatrix4(this.object.matrixWorld);
|
|
|
+
|
|
|
|
|
|
parentQuaternionInv.copy( parentQuaternion ).invert();
|
|
|
worldQuaternionInv.copy( worldQuaternion ).invert();
|
|
@@ -115429,6 +115432,8 @@ ENDSEC
|
|
|
scaleStart.copy( this.object.scale );
|
|
|
|
|
|
this.object.matrixWorld.decompose( worldPositionStart, worldQuaternionStart, worldScaleStart );
|
|
|
+ //add: 使坐标轴在boundingBox中心
|
|
|
+ boundingBox && this.object.boundingBox.getCenter(worldPositionStart).applyMatrix4(this.object.matrixWorld);
|
|
|
|
|
|
pointStart.copy( planeIntersect.point ).sub( worldPositionStart );
|
|
|
|
|
@@ -116835,7 +116840,7 @@ ENDSEC
|
|
|
|
|
|
this.updateMatrixWorld = function () {
|
|
|
|
|
|
- var space = this.space;
|
|
|
+ var space = this.space;
|
|
|
|
|
|
this.position.copy( this.worldPosition );
|
|
|
|
|
@@ -116937,6 +116942,23 @@ ENDSEC
|
|
|
|
|
|
} );
|
|
|
|
|
|
+ /*
|
|
|
+ 备注:
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //这里虽然 使坐标轴在boundingBox中心
|
|
|
+ boundingBox && this.object.boundingBox.getCenter(worldPosition).applyMatrix4(this.object.matrixWorld);
|
|
|
+
|
|
|
+ 但是旋转中心并不是这个坐标轴显示的位置,需要再执行 MergeEditor.maintainBoundXY()才能维持在这个中心
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ */
|
|
|
+
|
|
|
const texLoader$7 = new TextureLoader();
|
|
|
texLoader$7.crossOrigin = "anonymous";
|
|
|
|
|
@@ -117011,7 +117033,7 @@ ENDSEC
|
|
|
}
|
|
|
|
|
|
viewer.setControls(viewer.orbitControls);
|
|
|
- viewer.mainViewport.view.fixZWhenPan = true;
|
|
|
+ //viewer.mainViewport.view.fixZWhenPan = true
|
|
|
|
|
|
|
|
|
|