xzw 2 سال پیش
والد
کامیت
b75fded1a7
4فایلهای تغییر یافته به همراه16 افزوده شده و 14 حذف شده
  1. 4 2
      .vscode/settings.json
  2. 1 1
      rollup.config.js
  3. 1 1
      src/modules/Images360/Panorama.js
  4. 10 10
      src/modules/panoEdit/panoEditor.js

+ 4 - 2
.vscode/settings.json

@@ -6,15 +6,17 @@
 	},
 	"files.trimTrailingWhitespace": false,
 	"editor.fontSize": 28,
-	"editor.autoIndent": false,
+	"editor.autoIndent": "advanced",
 	"editor.detectIndentation": false,
 	"editor.insertSpaces": false,
 	"editor.minimap.enabled": false,
-	"editor.autoClosingBrackets": false,
+	"editor.autoClosingBrackets": "never",
 	"editor.formatOnType": false,
 	"editor.acceptSuggestionOnEnter": "off",
 	"editor.acceptSuggestionOnCommitCharacter": false,
 	"editor.mouseWheelZoom": true,
 	"editor.renderWhitespace": "all",
 	"workbench.tree.indent": 30,
+	"editor.autoClosingQuotes": "never",
+	"editor.autoSurround": "never",
 }

+ 1 - 1
rollup.config.js

@@ -10,8 +10,8 @@ const buildPaths = [
 ]
 
 const builds = []
-
 for (const dir of buildPaths) {
+console.log(`${dir}/potree/potree.js`)
 	builds.push(
 		...[
 			{

+ 1 - 1
src/modules/Images360/Panorama.js

@@ -130,7 +130,7 @@ class Panorama extends THREE.EventDispatcher{
             this.quaternion = new THREE.Quaternion()  //{w: 0, x: 0, y: 0, z: 1}
             //this.quaternion4dkk = math.convertVisionQuaternion(this.quaternion)//4dkk内使用的quaternion 
             this.visibles = o.visibles 
-            
+            this.rtkState = o.has_rtk ? o.use_rtk : null 
             
             const height = 1.4; //相机高度
             this.originFloorPosition = this.originPosition.clone()

+ 10 - 10
src/modules/panoEdit/panoEditor.js

@@ -896,7 +896,7 @@ class PanoEditor extends THREE.EventDispatcher{
         circleMats.default_rtk_on = circleMats.default_normal.clone();
         circleMats.default_rtk_on.map = texLoader.load(Potree.resourcePath+'/textures/rtk-y-n.png' )  
         circleMats.default_rtk_off = circleMats.default_normal.clone();
-        circleMats.default_rtk_on.map = texLoader.load(Potree.resourcePath+'/textures/rtk-f-n.png' )  
+        circleMats.default_rtk_off.map = texLoader.load(Potree.resourcePath+'/textures/rtk-f-n.png' )  
         circleMats.selected_normal = circleMats.default_normal.clone();
         circleMats.selected_normal.map = texLoader.load(Potree.resourcePath+'/textures/correct_s.png' ) 
         circleMats.selected_rtk_on = circleMats.default_normal.clone();
@@ -1016,7 +1016,7 @@ class PanoEditor extends THREE.EventDispatcher{
                     type : "CursorChange", action : "add",  name:"hoverPano"
                 });
             } 
-            if(this.selectedPano != pano)  pano.circle.material = circleMats['hovered' + '_'+ this.getPanoRtkState(this.selectedPano) ] 
+            if(this.selectedPano != pano)  pano.circle.material = circleMats['hovered' + '_'+ this.getPanoRtkState(pano) ] 
              
         }else if(pano && !state){//unhover
             if(this.hoveredPano != pano)return
@@ -1024,7 +1024,7 @@ class PanoEditor extends THREE.EventDispatcher{
             viewer.dispatchEvent({
                 type : "CursorChange", action : "remove",  name:"hoverPano"
             });
-            if(this.selectedPano != pano)  pano.circle.material = circleMats['default' + '_'+ this.getPanoRtkState(this.selectedPano) ] 
+            if(this.selectedPano != pano)  pano.circle.material = circleMats['default' + '_'+ this.getPanoRtkState(pano) ] 
             this.hoveredPano = null;
         }else{//unhover any
             if(this.hoveredPano){
@@ -1130,13 +1130,13 @@ class PanoEditor extends THREE.EventDispatcher{
     }
     
     getPanoRtkState(pano){
-        //'normal'  'rtk_on'  'rtk_off' 
-        return  'normal'
+        //'normal'  'rtk_on'  'rtk_off'  
+        
+        return pano.panosData.has_rtk ? pano.rtkState ? 'rtk_on' : 'rtk_off' : 'normal'
     } 
-    changePanoRtkState(state){
-        if(pano.rtkState){
-            pano.rtkState = state
-        }
+    changePanoRtkState(pano,state){ 
+        pano.rtkState = state 
+        pano.circle.material = circleMats[(this.selectedPano == pano ? 'selected' : 'default') + '_'+ this.getPanoRtkState(pano) ]
     }
     
     updateSelectGroup(){//更新选中的组
@@ -1213,7 +1213,7 @@ class PanoEditor extends THREE.EventDispatcher{
                     },
                     
                     visibles,
-                    
+                    use_rtk : !!pano.rtkState   
                     //subgroup: 0,group: 1, "id_view":..
                 })
             })