xzw 9 месяцев назад
Родитель
Сommit
34473110df

+ 1 - 0
src/custom/mergeStartTest.js

@@ -321,6 +321,7 @@ var start = function(dom, mapDom, number, fileServer, webSite){ //t-Zvd3w0m
              
              
          
          
     let tilesetUrls = [   
     let tilesetUrls = [   
+        'https://4dkk.4dage.com/scene_view_data/SG-t-GvKLWIKfJGC/images/3dtiles/tileset.json?_=1742785956443',
         'https://4dkk.4dage.com/fusion/test/b3dm/modelId_11947/tileset.json',//json有的包含多个materials,之前会花掉,现在解决了
         'https://4dkk.4dage.com/fusion/test/b3dm/modelId_11947/tileset.json',//json有的包含多个materials,之前会花掉,现在解决了
         'https://4dkk.4dage.com/fusion/testb3dm/test001/tileset.json',  //体育中心
         'https://4dkk.4dage.com/fusion/testb3dm/test001/tileset.json',  //体育中心
       // `${Potree.resourcePath}/models/3dtiles/SG-CPwbgVaPvcY/tileset.json`,
       // `${Potree.resourcePath}/models/3dtiles/SG-CPwbgVaPvcY/tileset.json`,

+ 7 - 3
src/custom/modules/clipModel/Clip.js

@@ -719,12 +719,16 @@ var Clip = {
                     //固定文字大小和边距像素    //如果有一边过小,可能超出画面外,暂时不管这种可能
                     //固定文字大小和边距像素    //如果有一边过小,可能超出画面外,暂时不管这种可能
                     const fontsize = math.linearClamp(w, [100, 700, 8000], [12, 20, 30])
                     const fontsize = math.linearClamp(w, [100, 700, 8000], [12, 20, 30])
                     
                     
-                    const marginSelf = {//img外的margin(标尺内)
+                    /* const marginSelf = {//img外的margin(标尺内)
                         left :  ifShowRuler ? 76 : 40,
                         left :  ifShowRuler ? 76 : 40,
                         right :  ifShowRuler ? 30 : 40,
                         right :  ifShowRuler ? 30 : 40,
-                        bottom :  (70 + fontsize*2) ,/*  ifShowRuler ? (70 + fontsize*2) : (40 + fontsize*2) ,*/
+                        bottom :  (70 + fontsize*2) , 
                         top :  ifShowRuler ? 60 : 40,
                         top :  ifShowRuler ? 60 : 40,
-                    }
+                    } */
+                    const marginSelf = {//img外的margin(标尺内)
+                        left :  76 ,        right :  40, 
+                        bottom :  (70 + fontsize*2) ,   top :  60 ,
+                    }//因要求无论有无标尺比例尺都一样,所以marginSelf必须一样
                     
                     
                     //文字的边距
                     //文字的边距
                     let bottomRatioToImg = - Math.min(fontsize*2.5,   ifShowRuler ? marginSelf.bottom : marginSelf.bottom*0.8 ) / h//- (marginSelf.bottom - fontsize)/ h  //在img之下. text底部到img底部的距离
                     let bottomRatioToImg = - Math.min(fontsize*2.5,   ifShowRuler ? marginSelf.bottom : marginSelf.bottom*0.8 ) / h//- (marginSelf.bottom - fontsize)/ h  //在img之下. text底部到img底部的距离

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

@@ -693,6 +693,7 @@ let MergeEditor = {
         let bound = model.boundingBox.clone().applyMatrix4(model.matrixWorld) 
         let bound = model.boundingBox.clone().applyMatrix4(model.matrixWorld) 
         bound.getCenter(model.boundCenter)
         bound.getCenter(model.boundCenter)
         bound.getSize(model.boundSize)
         bound.getSize(model.boundSize)
+        model.bound = bound
         //model.boundingBox.getCenter(model.boundCenter).applyMatrix4(model.matrixWorld) 
         //model.boundingBox.getCenter(model.boundCenter).applyMatrix4(model.matrixWorld) 
     },
     },
     
     

+ 1 - 1
src/custom/objects/Monitor.js

@@ -93,7 +93,7 @@ export default class Monitor extends THREE.Object3D{
         
         
         // 投射体材质
         // 投射体材质
         this.normalMat = new BasicMaterial({
         this.normalMat = new BasicMaterial({
-            color: 0x00c8af,
+            color: new THREE.Color(0x00c8af),
             transparent: true,
             transparent: true,
             opacity: 0.1,
             opacity: 0.1,
             side: THREE.DoubleSide,
             side: THREE.DoubleSide,

+ 19 - 1
src/custom/three.shim.js

@@ -940,4 +940,22 @@ THREE.Triangle.getInterpolatedAttribute = function( attr, i1, i2, i3, barycoord,
 
 
     return target;
     return target;
 
 
-}
+}
+
+
+let _vector$7 = new THREE.Vector3
+THREE.InterleavedBufferAttribute.prototype.applyNormalMatrix = function( m ) {
+
+    for ( let i = 0, l = this.count; i < l; i ++ ) {
+
+      _vector$7.fromBufferAttribute( this, i );
+
+      _vector$7.applyNormalMatrix( m );
+
+      this.setXYZ( i, _vector$7.x, _vector$7.y, _vector$7.z );
+
+    }
+
+    return this;
+
+  }

+ 1 - 1
src/viewer/ExtendScene.js

@@ -30,7 +30,7 @@ class ExtendScene extends Scene{
         
         
         
         
         
         
-        
+        this.monitors = []
 
 
 	}
 	}