Bläddra i källkod

加热点距镜头位置

xzw 3 år sedan
förälder
incheckning
66d6f6f9f1
9 ändrade filer med 431 tillägg och 142 borttagningar
  1. 1 1
      css/lzb.css
  2. 1 1
      css/main.css
  3. 2 1
      edit.html
  4. 188 85
      eforclient.html
  5. 98 4
      js/TransformControls.js
  6. 34 45
      js/edit.js
  7. 1 1
      js/main_2020_edit.js
  8. 2 2
      js/main_2020_show.js
  9. 104 2
      js/manage.js

+ 1 - 1
css/lzb.css

@@ -300,7 +300,7 @@ ul.MenuOptions li.chosen {
 }
 
 .toolRight .editText {
-    min-height: 200px;
+    min-height: 150px;
     line-height: 130% !important;
     padding: 10px;
     text-align: justify;

+ 1 - 1
css/main.css

@@ -7204,7 +7204,7 @@ a.hasHover.tag-link:hover {
 从 v3搬过来 */
  
 .widgets-doll-labels,
-.widgets-plan-labels {
+#otherLabels {
   overflow: hidden;
   position: absolute;
   pointer-events: none;

+ 2 - 1
edit.html

@@ -119,6 +119,7 @@
                     <div class="webgl-inside">
                         <div class="content">
                             <div id="hot"> </div>
+                            <div id="otherLabels"> </div>
                             <div class='widgets-doll-labels'> </div> 
                             
                             
@@ -1093,7 +1094,7 @@
                                             当前漫游点独立调整
                                         </label>
                                         <label class="remark">若在不同点位出现错位,请开启此开关,独立调整在特定点位的位移。</label>
-                                    
+                                        <label class="remark hide" name='dis' style='color: #888; margin-top: 10px'>与相机水平距离</label>
                                     </ul>
                                 </li>
                                 <li name='content'>

+ 188 - 85
eforclient.html

@@ -107,6 +107,10 @@
                         <span class="panoVisible"></span>
                         <label>漫游点位</label>
                     </li>
+                    <li data-name="roomLabels">
+                        <span class="hotpoint"></span>
+                        <label>房间标签</label>
+                    </li>
                 </ul>
             </div>
             <div class="toolMid">
@@ -114,8 +118,10 @@
                     <!-- 画布区域 -->
                     <div class="webgl-inside">
                         <div class="content">
-                            <div id="hot">
-                            </div>
+                            <div id="hot"> </div>
+                            <div class='widgets-doll-labels'> </div> 
+                            
+                            
                             <div id="popup">
                                 <div class="popup-content">
 
@@ -971,7 +977,25 @@
                                     </div>
                                     <div class="name">
                                         <input spellcheck="false" placeholder="标题" class="right" type="text" minlength="1" maxlength="200" placeholder="">
-                                    </div> 
+                                    </div>
+                                    <div class="itemTitle secondFontSize" >
+                                        <span>何时显示</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name='titleShowType'>
+                                        <li class="chosen" index="hover">鼠标悬浮时</li>
+                                        <li class="" index="always">一直显示</li>
+                                        <li class="" index="unvisible">不显示</li>
+                                    </ul>
+                                    <div class="itemTitle secondFontSize" >
+                                        <span>相对热点的位置</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name='titlePos'>
+                                        <li class="" index="top">上</li>
+                                        <li class="" index="bottom">下</li>
+                                        <li class="" index="left">左</li>
+                                        <li class="chosen" index="right">右</li>
+                                        <li class="" index="middle">中</li>
+                                    </ul>
                                 </li>
                                 
                                 
@@ -981,9 +1005,9 @@
                                         <span>贴图样式</span>
                                     </div>
                                     <ul class="MenuOptions innerBtn">
-                                        <li class="halfCell chosen" index="shine">闪烁</li>
-                                        <li class="halfCell" index="photo">图片</li>
-                                        <li class="halfCell" index="video">视频</li>
+                                        <li class=" chosen" index="shine">闪烁</li>
+                                        <li class="" index="photo">图片</li>
+                                        <li class="" index="video">视频</li>
                                     </ul>  
                                     <label class="remark">注:修改样式图会影响到使用该组样式的所有热点。鼠标划到样式时使用它的热点会显示边框。未被使用的样式会在保存发布后被删除。</label>
                                     <div id='shineTexSelect' class='selectList texList'> 
@@ -1053,12 +1077,12 @@
                                         </li>
                                     </ul>
                                     <ul class="MenuOptions innerBtn" name="transform">
-                                        <li class="halfCell chosen" index="translate" data-lang="">位移</li>
-                                        <li class="halfCell" index="scale" data-lang="">缩放</li> 
-                                        <li class="halfCell" index="rotate" data-lang="">旋转</li>
+                                        <li class=" chosen" index="translate" data-lang="">位移</li>
+                                        <li class="" index="scale" data-lang="">缩放</li> 
+                                        <li class="" index="rotate" data-lang="">旋转</li>
                                     </ul>
                                     <div class="buttons">
-                                        <button class="innerBtn" name="setSpace">切换为世界坐标方向</button>
+                                        <button class="innerBtn cancel" name="setSpace">切换为世界坐标方向</button>
                                         <button class="innerBtn" name="useSuitableRatio">自适应缩放比例</button> 
                                         <button class="innerBtn" name="resetRot" style='    width: 100px;'>重置旋转</button>
                                     </div>
@@ -1072,79 +1096,40 @@
                                     
                                     </ul>
                                 </li>
-                                
-                                   
-                                <li name="model" class='unable'>
-                                    <div class="itemTitle">
-                                        <span data-lang="">模型</span>
-                                    </div>
-                                    <ul class="MenuOptions innerBtn" name="modelType">
-                                        <li class="halfCell chosen" index="default" data-lang="">默认</li>
-                                        <li class="halfCell" index="user" data-lang="">自定义</li>  
-                                    </ul>
-                                    <ul>
-                                        <li name='boxDepthPanel'> 
-                                            <div class="itemTitle">
-                                                <span data-lang="">厚度</span>
-                                            </div>
-                                            <div id="boxDepth"></div>
-                                        </li>
-                                        <li name='uploadObj'> 
-                                            <div name='objPannel'>
-                                                <div id='ObjSelect' class='selectList texList text'> 
-                                                    <a class="selection"> 
-                                                    </a>
-                                                    <ul class="list  hide"></ul> 
-                                                </div> 
-                                            </div>
-                                            
-                                        </li>
-                                    </ul>    
-                                </li>                                
-                            
-                                <li name="clickEvent">
-                                    <div class="itemTitle">
-                                        <span>点击事件</span>
-                                    </div>
-                                    <ul>
-                                        <li class="editCheckbox">
-                                            <input name="playAndPause" type="checkbox" value="playAndPause" id="playAndPause">
-                                            <label for="playAndPause"></label>
-                                            <label for="playAndPause">播放/暂停</label>
-                                        </li>
-                                        <li class="editCheckbox">
-                                            <input name="examine" type="checkbox" value="examine" id="examine">
-                                            <label for="examine"></label>
-                                            <label for="examine">校准</label>
-                                        </li>
-                                        <li class="editCheckbox">
-                                            <input name="openHot"  type="checkbox" value="openHot" id="openHot">
-                                            <label for="openHot"></label>
-                                            <label for="openHot">打开热点</label>
-                                        </li>
-                                    </ul>   
-                                </li>
-                                
-                                
                                 <li name='content'>
                                     <div class="itemTitle">
                                         <span>热点内容</span>
                                     </div>
                                     <ul>
                                     <li name="intro">
-                                        <div class="itemTitle" data-size="2000">
+                                        <div class="itemTitle secondFontSize" data-size="2000">
                                             <span>简介</span>
                                         </div>
                                         <textarea placeholder="简介" class="editText" maxlength="2000"></textarea>
                                     </li>
-                                    <li name="photo">
-                                    
-                                        <div class="itemTitle" data-size="<9M">
+                                    <li name="photo"> 
+                                        <div class="itemTitle secondFontSize" data-size="<9M">
                                             <span>图片</span>
                                         </div>
                                         <div class="list edit-fun-images clearfix"></div>
+                                        
+                                        <ul class="switch clearfix thirdFontSize">
+                                            <label><input  id="addImgDesc" class="mui-switch mui-switch-animbg" type="checkbox">
+                                                开启图片描述 
+                                            </label>
+                                        </ul>
+                                       
+                                        <div class="itemTitle thirdFontSize" name='descTitle'>
+                                            <span>描述编辑器</span>
+                                            <div class="buttons"> 
+                                                <button class="innerBtn cancel" style="font-size: 10px;">应用到所有</button>
+                                            </div>
+                                        </div> 
+                                        <textarea placeholder="<=300字" class="editText" maxlength="300" style="min-height:100px"></textarea>
+                                 
+                                        
                                         <div class="upload">
-                                            <div data-type='photo'>
+                                            <div data-type='photo' >
                                                 <span>手动上传</span>
                                                 <div class="buttons">
                                                     <button class="submit innerBtn">更改</button>
@@ -1155,7 +1140,7 @@
                                         </div>
                                     </li>
                                     <li name="video">
-                                        <div class="itemTitle" data-size="MP4">
+                                        <div class="itemTitle secondFontSize" data-size="MP4">
                                             <span>视频</span>
                                         </div>
                                         <div class="list edit-fun-images clearfix"></div>
@@ -1171,7 +1156,7 @@
                                         </div>
                                     </li>
                                     <li name="audio" class='mediaUpload'>
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加音频</span>
                                             <div class="buttons">
                                                 <input type="file" id="upload-hotBgm" accept="audio/*">
@@ -1187,7 +1172,7 @@
                                         </div>
                                     </li>
                                     <li name="modelSrc" class='mediaUpload' >
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加模型链接</span>
                                         </div>
                                         <div class="list"></div>
@@ -1199,13 +1184,13 @@
                                         </div>
                                     </li>
                                     <li name="webPage"> <!-- mediaUpload -->
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加网页链接</span>
                                         </div>  
                                         <ul class="MenuOptions innerBtn" name="linkType">
-                                            <li class="halfCell chosen" index="common" data-lang="">普通</li>
-                                            <li class="halfCell" index="jumpLink" data-lang="">跳转</li>
-                                            <li class="halfCell" index="iframeDiv" data-lang="">iframe</li>
+                                            <li class=" chosen" index="common" data-lang="">普通</li>
+                                            <li class="" index="jumpLink" data-lang="">跳转</li>
+                                            <li class="" index="iframeDiv" data-lang="">iframe</li>
                                         </ul>
                                         <label class="remark">方式1须https, 方式2、3 除当前第一个链接外,其他内容将不展现。</label>
                                         <div class="list"></div>
@@ -1218,6 +1203,76 @@
                                     </li> 
                                     </ul>
                                 </li>
+                                 
+                                <li name="clickEvent">
+                                    <div class="itemTitle">
+                                        <span>点击事件</span>
+                                    </div>
+                                    <ul>
+                                        <li class="editCheckbox">
+                                            <input name="playAndPause" type="checkbox" value="playAndPause" id="playAndPause">
+                                            <label for="playAndPause"></label>
+                                            <label for="playAndPause">播放/暂停</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="examine" type="checkbox" value="examine" id="examine">
+                                            <label for="examine"></label>
+                                            <label for="examine">校准</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="openHot"  type="checkbox" value="openHot" id="openHot">
+                                            <label for="openHot"></label>
+                                            <label for="openHot">打开热点</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="fastTran"  type="checkbox" value="fastTran" id="fastTran">
+                                            <label for="fastTran"></label>
+                                            <label for="fastTran">跳转到固定方位</label>
+                                        </li>
+                                    </ul>   
+                                </li>
+                                <li name='fastTran'>
+                                    <div class="itemTitle">
+                                        <span>跳转方位</span>
+                                    </div> 
+                                    <div class="shotImg innerBtn" ></div>
+                                    <div class="buttons">
+                                        <button class="innerBtn submit ">设置</button> 
+                                    </div>
+                                    
+                                </li>
+                                  
+                                <li name="model" class='unable'>
+                                    <div class="itemTitle">
+                                        <span data-lang="">模型</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name="modelType">
+                                        <li class=" chosen" index="default" data-lang="">默认</li>
+                                        <li class="" index="user" data-lang="">自定义</li>  
+                                    </ul>
+                                    <ul>
+                                        <li name='boxDepthPanel'> 
+                                            <div class="itemTitle">
+                                                <span data-lang="">厚度</span>
+                                            </div>
+                                            <div id="boxDepth"></div>
+                                        </li>
+                                        <li name='uploadObj'> 
+                                            <div name='objPannel'>
+                                                <div id='ObjSelect' class='selectList texList text'> 
+                                                    <a class="selection"> 
+                                                    </a>
+                                                    <ul class="list  hide"></ul> 
+                                                </div> 
+                                            </div>
+                                            
+                                        </li>
+                                    </ul>    
+                                </li>                                
+                            
+                             
+                             
+                             
                              </ul>
                         </div>
                         <div class="buttons tail">
@@ -1384,12 +1439,30 @@
                                 <input id="mouseMarkerColor" type="color" />
                             </ul>
                         </li>
+                        <li data-name="floorPlanAngle">
+                            <div class="itemTitle">
+                                <span>平面图方向固定</span>
+                            </div>
+                            <ul class="MenuOptions innerBtn">
+                                <li class=" chosen" index="0">无</li>
+                                <li class="" index="1">1</li>
+                                <li class="" index="2">2</li>
+                                <li class="" index="3">3</li>
+                                <li class="" index="4">4</li>
+                            </ul>
+                        </li>
                         <li data-name="other">
                             <div class="itemTitle">
                                 <span>其他设置</span>
                             </div>
                             <ul class="other-item">
                                 <li class="editCheckbox">
+                                    <input name="newBlack"  type="checkbox" value="newBlack"
+                                        id="newBlack">
+                                    <label for="newBlack"></label>
+                                    <label for="newBlack">新版瞬间过渡</label>
+                                </li> 
+                                <li class="editCheckbox">
                                     <input name="hotListSwitch"  type="checkbox" value="hotListSwitch"
                                         id="hotListSwitch">
                                     <label for="hotListSwitch"></label>
@@ -1439,6 +1512,10 @@
                                     <label for="twoData"></label>
                                     <label for="twoData">启动二代数据 <i class="colorRed">-请慎重选择</i> </label>
                                 </li>
+                               
+                                
+                                
+                                
                             </ul>
                             <ul>
                                 <li>
@@ -1552,9 +1629,9 @@
                                         </div> 
                                         
                                         <ul id="folderTourSwitch"  class="MenuOptions innerBtn" >
-                                            <li class="halfCell" index="default" data-lang="">同外层</li>
-                                            <li class="halfCell" index="walk" data-lang="">行走</li>
-                                            <li class="halfCell chosen" index="black" data-lang="">瞬间</li>
+                                            <li class="" index="default" data-lang="">同外层</li>
+                                            <li class="" index="walk" data-lang="">行走</li>
+                                            <li class=" chosen" index="black" data-lang="">瞬间</li>
                                         </ul>
                                         
                                         
@@ -1623,9 +1700,9 @@
                                             <span>飞向该片段的过渡效果</span>
                                         </div> 
                                         <ul id="tourSwitch_Slice"  class="MenuOptions innerBtn" >
-                                            <li class="halfCell" index="default" data-lang="">同外层</li>
-                                            <li class="halfCell" index="walk" data-lang="">行走</li>
-                                            <li class="halfCell chosen" index="black" data-lang="">瞬间</li>
+                                            <li class="" index="default" data-lang="">同外层</li>
+                                            <li class="" index="walk" data-lang="">行走</li>
+                                            <li class=" chosen" index="black" data-lang="">瞬间</li>
                                         </ul>  
                                     </li>
                                     <li> 
@@ -1708,6 +1785,30 @@
                     </ul>
                 </div>
                 
+                <div class="roomLabels content hide">
+                    <ul > 
+                        <li class="addBtn"> 
+                            <div class="buttons">
+                                <button class="innerBtn" data-type="shine">添加标签</button> 
+                            </div>   
+                        </li>
+                        <li name='prop' class = 'hide'>
+                            <ul > 
+                                <li name='title'>
+                                    <div class="itemTitle" data-size="30">
+                                        <span>标题</span>
+                                    </div>
+                                    <input spellcheck="false" class="right input" type="text" minlength="1" maxlength="30" placeholder="输入文字">
+                                </li>
+                                <li name='delete'>
+                                    <div class="buttons">
+                                        <button class="innerBtn cancel" >删除</button> 
+                                    </div>   
+                                </li>
+                            </ul> 
+                        </li> 
+                    </ul>
+                </div>
                 
                 
                 
@@ -1749,18 +1850,20 @@
     </div>
 
     <script>
-
+       
+    
         var ceshi = ''
         var token = ''
      
     
         window.isEdit = true
-      
+
+
     </script>
 
     <script src="js/lib/jquery-2.1.1.min.js" class="build keep"></script>
     <script src="js/lib/player-0.0.12.min.js" class="build keep"></script>
-    <script src="js/Tween.js"></script> 
+    <script src="js/lib/Tween.js"></script> 
     <script src="js/SpecialScene.js"></script>
     <script src="js/manage.js"></script>
     <script src="js/edit.js"></script>

+ 98 - 4
js/TransformControls.js

@@ -45,6 +45,9 @@ var TransformControls = function ( camera, domElement, options ) {
 	var _plane = new TransformControlsPlane(options);
 	this.add( _plane );
 
+    /* this.linesAssistance = new TransformControlsLines(options);  //水平 垂直 辅助 
+    this.add( this.linesAssistance ); */
+
 	var scope = this;
 	this.player = options.player;//xzw add
 	this.options = options//xzw add
@@ -174,6 +177,8 @@ var TransformControls = function ( camera, domElement, options ) {
 		this.object = object;
 		this.visible = true;
 		//Config.keyCon = false;//add
+        //this.linesAssistance.setVisible(true)
+        
 		return this;
 
 	};
@@ -185,6 +190,9 @@ var TransformControls = function ( camera, domElement, options ) {
 		this.visible = false;
 		this.axis = null;
 		//Config.keyCon = true;//add
+        
+        //this.linesAssistance.setVisible(false)
+        
 		return this;
 
 	};
@@ -459,13 +467,11 @@ var TransformControls = function ( camera, domElement, options ) {
 
             //add:
              
-            /* if(EditOverlay.editing){
-                EditOverlay.updatePosition();
-            }else */ if(editTool.hotpoint.editSpot){ 
+            if(editTool.hotpoint.editSpot){ 
                 editTool.hotpoint.updateTransform('position');
             }
     
-
+            //this.linesAssistance.updateTransform(this.object)
 
 		} else if ( mode === 'scale' ) {
 
@@ -1624,6 +1630,84 @@ var TransformControlsGizmo = function (options) {
 
 };
 
+ 
+ 
+ 
+/* var TransformControlsLines = function (options) {
+    
+     Object3D.call( this)
+     
+     let label1 = new Label2D({ innerHTML:`<div>与相机水平距离</div>` , domElement:$("#otherLabels")[0] ,autoUpdate:true  })
+     let label2 = new Label2D({ innerHTML:`<div>与相机高度差</div>` , domElement:$("#otherLabels")[0] ,autoUpdate:true  })
+     
+     let css = {'opacity': 0.7, 'color': '#07fceb',  transform:'translate(-50%, -50%)'}
+     label1.elem.css(css); 
+     label2.elem.css(css)
+    
+    
+     //for(let i=0;i<2;i++){
+     //   let line = LineDraw.createLine([new THREE.Vector3, new THREE.Vector3],{color:'#07fceb', opacity:0.7 })
+     //   this.add(line)
+     //}  
+     
+     
+     this.updateTransform = function(object){
+         
+         object = object || this.parent.object;
+         
+         let A = player.position.clone();  //当前相机位置
+         let B = object.position           //物体位置
+         let C = B.clone().setY(A.y);        //物体在相机的高度的位置
+         let D = A.clone().setY(B.y);    //相机在物体的高度的位置
+         
+         //LineDraw.moveLine(this.children[0], [B, C]) // 垂直线     
+         //LineDraw.moveLine(this.children[1], [D, B]) // 水平线  
+         
+         
+         let dis1 = toPrecision(D.distanceTo(B),1)
+         let dis2 = C.y - B.y   
+         label1.elem.text('与相机水平距离: '+dis1+'米')
+         label2.elem.text('在相机之'+ (dis2>0?'下' : '上') +' :'+ toPrecision(dis2 , 1) +'米')
+         
+         label1.setPos(new THREE.Vector3().addVectors(D,B).multiplyScalar(0.5))
+         label2.setPos(new THREE.Vector3().addVectors(B,C).multiplyScalar(0.5))
+          
+     }
+     
+     this.setVisible = (v,reason)=>{
+         label1.setVisible(v, reason || 'unvisi')
+         label2.setVisible(v, reason || 'unvisi')
+         this.visible = label1.visible
+         if(this.visible){
+             this.updateTransform()
+         }
+     }
+     
+     
+   
+         this.setVisible(false)
+   
+     
+     player.on("mode.changing",(currentMode, mode, pano, duration)=>{  
+        if(mode != 'panorama'){
+            this.setVisible(false, 'isPanorama')
+        }else{
+            this.setVisible(true, 'isPanorama')
+        } 
+     })
+     
+     
+     player.on("flying.started",( )=>{  
+        this.setVisible(false, 'flying')
+     })
+     
+     player.on("flying.ended",( )=>{  
+        this.setVisible(true, 'flying')
+     })
+     
+}
+  */
+
 
 
 var TransformControlsPlane = function (options) {
@@ -1773,6 +1857,16 @@ TransformControls.init = function(THREE){
         isTransformControlsPlane: true
 
     } );
+    
+    /* TransformControlsLines.prototype = Object.assign( Object.create( Object3D.prototype ), {
+
+        constructor: TransformControlsLines,
+
+        isTransformControlsLines: true
+
+    } ); */
+    
+    
     //----------
     
     function PolyhedronBufferGeometry( vertices, indices, radius, detail ) {

+ 34 - 45
js/edit.js

@@ -1464,8 +1464,15 @@ Hotpoint.prototype.init = function() {
         this.setCameraBtn(!this.gettingCameraData)  
     })
     
-    
-    
+    {
+        let pos = new THREE.Vector3(Infinity,Infinity,Infinity)
+        player.on("view.changed",(e)=>{ 
+             if(e.cameraChanged && !pos.equals(player.position)){
+                 this.updateDis();
+                 pos.copy(player.position)
+             } 
+        })
+    }
 }
 
 
@@ -1616,11 +1623,24 @@ Hotpoint.prototype.editHot = function(hot, $li) {
         
     }
 
-
+    
+    $('#setPosForPano [name="dis"]').removeClass('hide');
+    this.updateDis()
+    
 
 }
 
-
+Hotpoint.prototype.updateDis = function(){
+    if(!this.editSpot)return
+    
+    var pos = this.editSpot.position;
+    var playerPos = player.position;
+    
+    var dis1 = pos.clone().setY(0).distanceTo(playerPos.clone().setY(0))
+    var disY = pos.y - playerPos.y
+    var dir =  disY>0 ? '上' : '下' 
+    $('#setPosForPano [name="dis"]').html(`与相机水平距离: ${toPrecision(dis1, 2)}m , <br>在相机之${dir}: ${toPrecision(Math.abs(disY), 2)}m`) 
+}
 
 Hotpoint.prototype.recoverInfo = function(hot) { //  恢復
     hot.info = hot.tempInfo;
@@ -1682,7 +1702,7 @@ Hotpoint.prototype.updateTransform = function(type){
     var on = this.panoTransformCheckBox.checked() //$('#setPosForPano input').is(':checked')
     //var name = getTransformSid()
     if(on && type == 'position'){ 
-        this.getTransformAtPano(type) 
+        this.getTransformAtPano(type)  
     }else{ 
         if(type == 'position'){
             this.editSpot.info.position.copy(this.editSpot.position)
@@ -1694,6 +1714,9 @@ Hotpoint.prototype.updateTransform = function(type){
             this.editSpot.info.scale.copy(this.editSpot.scale)
         }   
     }
+    
+    
+    type == 'position' && this.updateDis()
 }
 
 Hotpoint.prototype.updatePano = function(){
@@ -3233,6 +3256,11 @@ Hotpoint.prototype.editDone = function(){
     this.setCameraBtn(false)
     this.imgDescCheckBox.updateChoseAtUI(false)
     
+     
+    $('#setPosForPano [name="dis"]').addClass('hide');
+ 
+    
+    
 }
 
 
@@ -3446,7 +3474,7 @@ Hotpoint.prototype.saveHot = function() {
         }
         
         if(that.actionCheckBox.checked('fastTran')){
-            hot.info.cameraData = $('#hotpointDetail .shotImg.innerBtn')[0].cameraData
+            hot.info.cameraData = $('#hotpointDetail .shotImg.innerBtn')[0].cameraData  //快速跳转方位
         }else{
             delete hot.info.cameraData 
         }
@@ -5018,48 +5046,9 @@ SlideBar.prototype.setValueFromOutside = function(v) {
 
 //-----------------------------------------------------   
 
-var LineDraw = {
 
-    createLine: function(posArr, o) {
-        var e = new THREE.BufferGeometry
-          , p = new Float32Array(6);
 
-        e.addAttribute("position", new THREE.BufferAttribute(p,3));
-        //这句新旧版写法不同  旧版这样:e.addAttribute("position",Float32Array,2,3);
-        var p = e.attributes.position.array;
-        for (var i = 0; i < 2; i++) {
-            p[i * 3] = posArr[i].x;
-            p[i * 3 + 1] = posArr[i].y;
-            p[i * 3 + 2] = posArr[i].z;
-        }
-        var mat = new THREE[o.deshed ? "LineDashedMaterial" : "LineBasicMaterial"]({
-            linewidth: o.width || 1,
-            //windows无效。 似乎mac/ios上粗细有效 ? 
-            color: o.color || defaultColor,
-            transparent: o.dontAlwaysSeen ? false : true,
-            depthTest: o.dontAlwaysSeen ? true : false
-
-        })
-        var line = new THREE.Line(e,mat);
-        line.renderOrder = o.renderOrder || 4
-        //同tagStem;   //如果不加高,可能会部分被model遮住
-        return line;
 
-    }
-}
-
-var toPrecision = function(e, t) {
-    function i(e, t) {
-        var i = Math.pow(10, t);
-        return Math.round(e * i) / i
-    }
-    if (e instanceof Array) {
-        for (var n = 0; n < e.length; n++)
-            e[n] = i(e[n], t);
-        return e
-    }
-    return i(e, t)
-}
 
 var transformControls;
 var initTransformCtl = function(THREE) {

+ 1 - 1
js/main_2020_edit.js

@@ -2990,7 +2990,7 @@ function o(a, s, l) {
             dollhouseFar: 5e3,
             insideFOV: 70,
             insideFOVMax: 120,
-            insideNear: .1,
+            insideNear: 0.01,//.1,
             insideFar: 5e3,
             insideLookSpeed: .12,
             insideLookLimitUp: 40,

+ 2 - 2
js/main_2020_show.js

@@ -6939,7 +6939,7 @@ window.Modernizr = function(n, e, t) {
                   , f = $("#thumb-container").eq(0)
                   , y = f.children()
                   , I = p.children();
-                t.on("update.controls", function() {
+                t.on("update.controls", function() {//导览控制
                     var n = t.describe();
                     n.tourIsPlaying || i.isWarping() ? (je.tourControls.visible && (l.hide(),
                     c.show()),
@@ -27646,7 +27646,7 @@ window.Modernizr = function(n, e, t) {
                     this.addCoverageForNode(i.node)
                 } else{
                     this.setUploaded(i, !1);
-                    console.log('uploadTile  失败', r, s, l)
+                    //console.log('uploadTile  失败', r, s, l)
                     //failHistory[''+r+s+l] = true;
 
                 }

+ 104 - 2
js/manage.js

@@ -122,7 +122,18 @@ function watch(object, propName, initialValue){ //监听某个属性的变化
            
 
 
-
+var toPrecision = function(e, t) {
+    function i(e, t) {
+        var i = Math.pow(10, t);
+        return Math.round(e * i) / i
+    }
+    if (e instanceof Array) {
+        for (var n = 0; n < e.length; n++)
+            e[n] = i(e[n], t);
+        return e
+    }
+    return i(e, t)
+}
 
 
 var dealMap = (map)=>{//使不resize  when   image is not power of two
@@ -158,7 +169,95 @@ var getTransformSid = function(){
     return name
 } 
  
+var LineDraw = {
+
+    /* createLine: function(posArr, o) {
+        var e = new THREE.BufferGeometry
+          , p = new Float32Array(6);
+
+        e.addAttribute("position", new THREE.BufferAttribute(p,3));
+        //这句新旧版写法不同  旧版这样:e.addAttribute("position",Float32Array,2,3);
+        var p = e.attributes.position.array;
+        for (var i = 0; i < 2; i++) {
+            p[i * 3] = posArr[i].x;
+            p[i * 3 + 1] = posArr[i].y;
+            p[i * 3 + 2] = posArr[i].z;
+        }
+        var mat = new THREE[o.deshed ? "LineDashedMaterial" : "LineBasicMaterial"]({
+            linewidth: o.width || 1,
+            //windows无效。 似乎mac/ios上粗细有效 ? 
+            color: o.color || defaultColor,
+            transparent: o.dontAlwaysSeen ? false : true,
+            depthTest: o.dontAlwaysSeen ? true : false
 
+        })
+        var line = new THREE.Line(e,mat);
+        line.renderOrder = o.renderOrder || 4
+        //同tagStem;   //如果不加高,可能会部分被model遮住
+        return line;
+
+    } */
+    
+    
+    createLine: function (posArr, o={}) {
+        //多段普通线  (第二个点和第三个点之间是没有线段的, 所以不用在意线段顺序)
+        var mat
+        if(o.mat){
+            mat = o.mat
+        }else{
+            let prop = {
+                lineWidth: o.lineWidth || 1,
+                //windows无效。 似乎mac/ios上粗细有效 ? 
+                color: o.color || defaultColor,
+                transparent: o.dontAlwaysSeen ? false : true,
+                depthTest: o.dontAlwaysSeen ? true : false, 
+                opacity: o.opacity != void 0 ? o.opacity : 1,
+            }
+            if(o.deshed ){
+                prop.dashSize = o.dashSize || 0.1,
+                prop.gapSize = o.gapSize || 0.1
+            }
+            mat = new THREE[o.deshed ? "LineDashedMaterial" : "LineBasicMaterial"](prop) 
+        }
+         
+        
+        
+        var line = new THREE.LineSegments(new THREE.BufferGeometry, mat);
+		line.renderOrder = o.renderOrder || 4
+  
+        this.moveLine(line, posArr)
+        
+		return line;  
+
+	},
+    
+    
+	moveLine: function (line, posArr) {
+        if(posArr.length == 0)return
+        let position = new Float32Array(posArr.length * 3);  //[]
+       
+    
+        for (var i = 0; i < 2; i++) {
+            position[i * 3] = posArr[i].x;
+            position[i * 3 + 1] = posArr[i].y;
+            position[i * 3 + 2] = posArr[i].z;
+        }
+        line.geometry.addAttribute("position", new THREE.BufferAttribute(position,3)); 
+        //line.geometry.setAttribute('position', new THREE.Float32BufferAttribute(new Float32Array(position), 3));
+      
+		line.geometry.attributes.position.needsUpdate = true;
+		line.geometry.computeBoundingSphere();
+        /* if(line.material instanceof THREE.LineDashedMaterial){
+            line.computeLineDistances() //只有非buffer的geometry才有
+        } */
+	}  
+	,
+    
+    
+    
+    
+    
+}
 
  
 var convertTool = { 
@@ -1271,6 +1370,9 @@ function initByTHREE(THREE){
             this.elem.remove();
             this._listeners = {} 
             this.dispatchEvent({type:'dispose'})
+            let index = labels.indexOf(this)
+            index > -1 && labels.splice(index,1) 
+        
         }
          
          
@@ -1353,7 +1455,7 @@ function initByTHREE(THREE){
         
         player.on("view.changed",(e)=>{ 
              if(e.cameraChanged){
-                 //if(needUpdateZIndex){
+                 //if(needUpdateZIndex){ //如果某个label显示时需要更新index的话,加个参数
                      let label_ = labels.filter(e=>e.elem[0].style.display == 'block')
                      label_.sort((a,b)=>b.pos2d.z - a.pos2d.z)
                      label_.forEach((e,index)=>e.elem.css('z-index', index+1000));