xzw hai 10 meses
pai
achega
0c58607730

+ 1 - 0
src/custom/modules/mergeModel/MergeEditor.js

@@ -121,6 +121,7 @@ let MergeEditor = {
             
             
             this.transformControls = new TransformControls(viewer.mainViewport.camera, viewer.renderArea,{
             this.transformControls = new TransformControls(viewer.mainViewport.camera, viewer.renderArea,{
                 //dontHideWhenFaceCamera: true,
                 //dontHideWhenFaceCamera: true,
+                showRotXYZE : true
             });
             });
             //this.transformControls.space = 'local'//为了在当前方向上平移
             //this.transformControls.space = 'local'//为了在当前方向上平移
             this.transformControls.setSize(1.5)
             this.transformControls.setSize(1.5)

+ 9 - 8
src/custom/objects/tool/TransformControls.js

@@ -971,6 +971,8 @@ var TransformControlsGizmo = function (options) {
 
 
 	// shared materials
 	// shared materials
     this.hideAxis = {}, this.showAxis = {}
     this.hideAxis = {}, this.showAxis = {}
+    
+    
 	var gizmoMaterial = new THREE.MeshBasicMaterial( {
 	var gizmoMaterial = new THREE.MeshBasicMaterial( {
 		depthTest: false,
 		depthTest: false,
 		depthWrite: false,
 		depthWrite: false,
@@ -1204,13 +1206,13 @@ var TransformControlsGizmo = function (options) {
 
 
 	var pickerRotate = {
 	var pickerRotate = {
 		X: [    //xzw 由原先全弧度改为一半弧度(Math.PI),否则在背面也会hover到
 		X: [    //xzw 由原先全弧度改为一半弧度(Math.PI),否则在背面也会hover到
-			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1, 0.06, 4, 24, Math.PI ), matInvisible ), [ 0, 0, 0 ], [ 0, - Math.PI / 2, - Math.PI / 2 ]],
+			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1, 0.06, 4, 24, rotFullCircle ? Math.PI*2 : Math.PI   ), matInvisible ), [ 0, 0, 0 ], [ 0, - Math.PI / 2, - Math.PI / 2 ]],
 		],
 		],
 		Y: [
 		Y: [
-			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1, 0.06, 4, 24, Math.PI ), matInvisible ), [ 0, 0, 0 ], [ Math.PI / 2, 0, 0 ]],
+			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1, 0.06, 4, 24, rotFullCircle ? Math.PI*2 : Math.PI ), matInvisible ), [ 0, 0, 0 ], [ Math.PI / 2, 0, 0 ]],
 		],
 		],
 		Z: [
 		Z: [
-			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1, 0.06, 4, 24, Math.PI ), matInvisible ), [ 0, 0, 0 ], [ 0, 0, - Math.PI / 2 ]],
+			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1, 0.06, 4, 24, rotFullCircle ? Math.PI*2 : Math.PI  ), matInvisible ), [ 0, 0, 0 ], [ 0, 0, - Math.PI / 2 ]],
 		],
 		],
 		E: [
 		E: [
 			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1.25, 0.06, 2, 24 ), matInvisible ) ]
 			[ new THREE.Mesh( new THREE.TorusBufferGeometry( 1.25, 0.06, 2, 24 ), matInvisible ) ]
@@ -1397,10 +1399,7 @@ var TransformControlsGizmo = function (options) {
 	this.picker[ "translate" ].visible = false;
 	this.picker[ "translate" ].visible = false;
 	this.picker[ "rotate" ].visible = false;
 	this.picker[ "rotate" ].visible = false;
 	this.picker[ "scale" ].visible = false;
 	this.picker[ "scale" ].visible = false;
-
-    
-    /* options.dontHideWhenFaceCamera ||  */Potree.Utils.updateVisible(this.gizmo[ "rotate" ].children.find(e=>e.name == 'XYZE'), 'decorateCircle', true, 1, 'add')//xzw add 没有环的话不好看。但不要picker
-    
+ 
 	// updateMatrixWorld will update transformations and appearance of individual handles
 	// updateMatrixWorld will update transformations and appearance of individual handles
 
 
 	this.updateMatrixWorld = function () { //TransformControlsGizmo
 	this.updateMatrixWorld = function () { //TransformControlsGizmo
@@ -1426,7 +1425,9 @@ var TransformControlsGizmo = function (options) {
 		handles = handles.concat( this.picker[ this.mode ].children );
 		handles = handles.concat( this.picker[ this.mode ].children );
 		handles = handles.concat( this.gizmo[ this.mode ].children );
 		handles = handles.concat( this.gizmo[ this.mode ].children );
 		handles = handles.concat( this.helper[ this.mode ].children );
 		handles = handles.concat( this.helper[ this.mode ].children );
-
+        
+        Potree.Utils.updateVisible(this.gizmo[ "rotate" ].children.find(e=>e.name == 'XYZE'), 'decorateCircle', options.showRotXYZE, 1, this.showRotXYZE ? 'add' : 'cancel')//xzw add 没有环的话不好看。但不要picker
+        
 		for ( var i = 0; i < handles.length; i ++ ) {
 		for ( var i = 0; i < handles.length; i ++ ) {
 
 
 			var handle = handles[ i ];
 			var handle = handles[ i ];