浏览代码

Hot差不多修改好了

xzw 3 年之前
父节点
当前提交
f23029d199
共有 16 个文件被更改,包括 3849 次插入3004 次删除
  1. 147 42
      css/lzb.css
  2. 281 318
      edit.html
  3. 二进制
      images/icon_Google_Chrome_2011.png
  4. 二进制
      images/icon_Internet_Explorer_10.png
  5. 二进制
      images/icon_MacOSX_Safari.png
  6. 二进制
      images/icon_Mozilla_Firefox.png
  7. 3 7
      index.html
  8. 22 16
      js/TransformControls.js
  9. 2557 2095
      js/edit.js
  10. 70 7
      js/lib/OBJLoader.js
  11. 326 227
      js/main_2020_edit.js
  12. 262 210
      js/main_2020_show.js
  13. 130 60
      js/manage.js
  14. 21 6
      js/myShow-edit.js
  15. 15 3
      js/myShow.js
  16. 15 13
      js/overlay.js

+ 147 - 42
css/lzb.css

@@ -86,10 +86,11 @@ ul li {
     width: 64px;
     border-right: 1px solid black;
     padding: 10px 0;
+    overflow-y: auto;
 }
 
 .toolBottom .toolLeft ul {
-    overflow-y: auto;
+    /* overflow-y: auto; */
 }
 
 .toolBottom .toolLeft li {
@@ -360,7 +361,7 @@ ul.MenuOptions li.chosen {
 }
 
 .toolRight div.content>ul>li {
-    border-top: 1px solid #5d5d5d;
+    border-top: 1px solid #636363;
     border-bottom: 1px solid #000000;
     padding: 10px;
 }
@@ -369,7 +370,7 @@ ul.MenuOptions li.chosen {
     border-top: none;
 }
 
-.toolRight div.content>ul>li>* {
+.toolRight div.content ul>li>* {
     margin: 6px 0 12px 0;
     line-height: 32px;
     height: 100%;
@@ -425,8 +426,7 @@ ul.MenuOptions li.chosen {
     border: 2px solid #00b4ed;
 }
 
-.other-item {
-    text-align: left;
+.other-item { 
     font-size: 14px;
 }
 
@@ -438,34 +438,48 @@ ul.MenuOptions li.chosen {
 .other-item label {
     cursor: pointer;
 }
+.editCheckbox{
+    text-align:left;
+}
 
-.editCheckbox {
+
+.editCheckbox input{
     position: absolute;
     opacity: 0;
-    cursor: pointer;
+    cursor: pointer; 
 }
 
-.editCheckbox+label {
+.editCheckbox input+label {
     background-color: #fff;
     border: 1px #ccc solid;
     border-radius: 2px;
     width: 16px;
-    height: 16px;
+    height: 16px !important;
     display: inline-block;
     text-align: center;
+    position: relative;
     vertical-align: middle;
     line-height: 16px;
     cursor: pointer;
+    bottom: -2px;
+    margin-right: 6px !important;
 }
 
-.editCheckbox:checked+label {
+#hotpointDetail .editCheckbox{
+    margin-left: 54px;
+} 
+.editCheckbox input:checked+label {
     border: 0;
     background-color: #fff;
+
 }
 
-.editCheckbox:checked+label:after {
+.editCheckbox input:checked+label:after {
     content: "\2714";
     color: #00b4ed;
+    position:relative;
+    bottom: 7px;
+    /* vertical-align: middle; */
 }
 
 #tourItemList {
@@ -725,10 +739,11 @@ ul.MenuOptions li.chosen {
     letter-spacing: 1px;
     border-radius: 2px;
     /* height: 32px; */
-    height: 34px;
+    height: 34px !important;
     font-size: 14px;
 }
 
+
 .colorWrap {
     display: flex;
 }
@@ -761,6 +776,13 @@ ul.MenuOptions li.chosen {
     line-height: 14px;
     position: relative;
 }
+.toolRight li[name="content"]>ul>li .itemTitle{
+    font-size: 12px;
+}
+
+.toolRight li[name="content"]>ul>li {
+    padding-bottom:15px;
+}
 
 .toolRight .mediaUpload .itemTitle span {
     position: absolute;
@@ -791,7 +813,7 @@ ul.MenuOptions li.chosen {
     text-align: center;
 }
 
-.toolRight .music input[type="file"], .toolRight .audio input[type="file"] {
+.toolRight .mediaUpload input[type="file"], .toolRight li[name=audio] input[type="file"] {
     opacity: 0;
     width: 200%;
     height: 100%;
@@ -991,13 +1013,17 @@ ul.MenuOptions li.chosen {
 #tourList .listItem{
     width: calc(100% + 12px);
 }
+.toolRight  .listItem>*{
+    margin:0 !important;
+    line-height:40px !important;
+}
 .toolRight .hotpoint .spotList>ul>li:hover, .toolRight .hotpoint .spotList>ul>li.active {
     background: #565a5b;
 }
 
 .toolRight .listItem .icon{
     width: 33px;
-    margin-left: 10px;
+    margin-left: 10px !important;
     background-size: 70%;
     background-position-x: 0;
     background-repeat: no-repeat;
@@ -1005,7 +1031,7 @@ ul.MenuOptions li.chosen {
 }
 .toolRight .hotpoint .listItem .number{
     color:#828282;
-    margin-right:10px;
+    margin-right:10px !important;
 }
 .overlayList li .icon{
      background-image:url(../images/edit/box_video.png);
@@ -1046,9 +1072,19 @@ ul.MenuOptions li.chosen {
 .toolRight .spotList .icon {
     background-image: url(../images/edit/hotStyle_1.png);
 }
+.toolRight .spotList .icon[type='shine']{
+    background-image: url(../images/style_point.png);
+}
+.toolRight .spotList .icon[type='photo']{
+    background-image: url(../images/edit/image.png);
+}
+.toolRight .spotList .icon[type='video']{
+    background-image: url(../images/edit/box_video.png);
+    background-size: 107%;
+    background-position: -5px center;
+}
 
  
-
 .toolRight .secondary .content {
     height: calc(100% - 104px);
     border-bottom: 1px solid #000000;
@@ -1119,6 +1155,7 @@ ul.MenuOptions li.chosen {
     background-position: center 49%;
     background-size: 15% 15%;
     background-repeat: no-repeat;
+    margin: 0 !important;
 }
 
 #userUploadStyle .upload>div{
@@ -1150,7 +1187,7 @@ ul.MenuOptions li.chosen {
 }
 
 .buttons button:nth-child(2) {
-    margin-left: 10px;
+    /* margin-left: 10px; */
 }
 
 
@@ -1196,7 +1233,7 @@ ul.MenuOptions li.chosen {
     cursor: pointer;
     position: absolute;
     width: 100%;
-    height: 100%;
+    height: 100% !important;
     top: 0;
     left: 0;
     opacity: 0;
@@ -1663,7 +1700,7 @@ ul.MenuOptions li.chosen {
 .slider .BarTxt .scrollBarTxt {
     width: 40px;
     text-align: center;
-    height: 24px;
+    height: 24px !important;
     padding: 4px 0;
     text-align: center;
     color: #fff;
@@ -1742,29 +1779,42 @@ ul.MenuOptions li.chosen {
 }
  	
 				
-#spotTexSelect ul.hotTexUpload{
-    display: flex;
+#shineTexSelect ul.hotTexUpload{
+    display: flex; margin:0;
 }
- 
-#spotTexSelect .upload{ 
-    border-radius: 2px;
-    
+.selectList.texList li{
+    display:flex
+} 
+.selectList.texList .upload{ 
+    border-radius: 2px; 
     position: relative;
 }
-#spotTexSelect .list .upload{ 
+.selectList.texList .list .upload{
     width: 70px;
-    height: 70px !important;    
+    height: 70px !important;
 }
-#spotTexSelect .uploaded:not(:hover){
+.selectList.texList.text .list .upload{ 
+    height: 100% !important;  
+    width: 150px;
+    margin:0;
+}
+.selectList.texList.text .list :first-child .upload{
+    
+}
+.selectList.texList .uploaded:not(:hover){
     border: 1px solid transparent;
 }
-#spotTexSelect .upload>div{
+.selectList.texList .upload>div{
    background-color:transparent;  
 }
-#spotTexSelect .uploaded>div   {
+#shineTexSelect .uploaded>div   {
     background-size:cover;
+    margin: 0;
 }
-#spotTexSelect .upload .del{
+.selectList.texList .uploaded>div   {
+    background-size:contain;
+}
+.selectList.texList .upload .del{
     width:20px;
     background-color: #c77a7a;
     height: 20px;
@@ -1777,7 +1827,7 @@ ul.MenuOptions li.chosen {
     display:none;
 	z-index:9999;
 } 
-#spotTexSelect  .upload .del:before{ 
+.selectList.texList .upload .del:before{ 
 	content:'X';
 	font-size:12px;
 	font-family:"iconfont" !important; 
@@ -1787,12 +1837,30 @@ ul.MenuOptions li.chosen {
 	right:-6px;
 	
 }
-#spotTexSelect  .upload.uploaded:hover .del{
+.selectList.texList  li:not(.forbitEdit):not(.cannotDelete)  .upload.uploaded:hover .del{
     display:block; 
 }
-
-
-
+.selectList.texList .showCount{
+    display: block; 
+    color:#aeaeae; 
+    white-space:break-spaces; 
+    line-height:25px ;
+    
+}
+#shineTexSelect .showCount{
+    width:40px;
+    margin-left:10px;
+}
+#photoTexSelect .showCount{
+    width:70px;
+    margin:25px;
+}
+.selectList.texList.text .showCount{
+    width:50px;
+    margin-left:10px;
+    line-height:20px
+}
+ 
 
 .cad-setting {
     text-align: left;
@@ -1847,9 +1915,14 @@ ul.MenuOptions li.chosen {
     overflow: visible;
     background: #151515;
 }
-#spotTexSelect{
-    height: 50px;
+.selectList.texList{
+    height: 50px !important;
+}
+#photoTexSelect{
+    height: 130px !important;
 }
+
+
 .selectList .selection {
     display: block;
     position: relative;
@@ -1883,7 +1956,12 @@ ul.MenuOptions li.chosen {
 .selectList .selection.focus {
     color: #fff;
 }
-
+.selectList.texList.text .selection{
+    line-height: 46px;
+    font-size:14px;
+    padding:0 10px;
+     
+}
 .selectList>ul {
     position: absolute;
     border: 1px solid #737373;
@@ -1908,9 +1986,23 @@ ul.MenuOptions li.chosen {
     white-space: nowrap;
     margin: 0px;
 }
+.selectList.text ul>li  {
+    height:50px;
+    
+}
+.selectList.text ul>li:not(:first-child) div.upload>div{
+    line-height:50px;
+    background:none;
+    padding: 0 10px;
+    overflow: hidden;text-overflow: ellipsis; 
+}
+.selectList.text ul>li:first-child div.upload>div{
+    background-size:7% 20%;
+}
+
 
 .selectList ul>li.selected {
-    background: #242424;
+    background: #333333;
 }
 .selectList ul>li:hover {
     background: #2d2d2d;
@@ -1923,18 +2015,31 @@ ul.MenuOptions li.chosen {
     height: 45px !important;
     margin:1px;
 }
-
+#photoTexSelect .selection .uploaded{
+    width: 126px !important;
+    height: 126px !important;
+    margin:1px;
+    background-size:100% 100%;
+}
 
 .toolRight #gifInfoEdit{
     text-align : left; 
 }
 .toolRight #gifInfoEdit input {
     width: 49px;
-    height:25px;
+    height:25px !important;
     margin:0 4px;
     padding: 0 1px;
     text-align: center;
 }
 .toolRight #gifInfoEdit span {
     margin:0 3px;  
+}
+
+
+.toolRight .hr{
+    /* height:1px; */
+    /* background: #4c4c4c; */
+    margin: 17px 0px;
+    border-bottom: 1px dotted #404040;
 }

+ 281 - 318
edit.html

@@ -45,7 +45,7 @@
                 <div class="bounce2"></div>
                 <div class="bounce3"></div>
             </div>
-            <div class="text">请等待...</div>
+            <div class="text">请稍侯...</div>
         </div>
         
         <div class="resultBox hide"><!--提示框 --> 
@@ -77,7 +77,7 @@
                     </li>
                     <li data-name="hotpoint">
                         <span class="hotpoint"></span>
-                        <label>热点编辑</label>
+                        <label>热点</label>
                     </li>
                     <li data-name="music">
                         <span class="music"></span>
@@ -91,10 +91,10 @@
                         <span class="VREditIcon VR"></span>
                         <label>VR</label>
                     </li>
-                    <li data-name="overlay">
+                    <!-- <li data-name="overlay">
                         <span class="overlay"></span>
                         <label>展览</label>
-                    </li>
+                    </li> -->
                     <li data-name="panoVisible">
                         <span class="panoVisible"></span>
                         <label>漫游可行</label>
@@ -912,40 +912,35 @@
                     
                 </div>
             </div>
-            <div class="toolRight">
+            <div class="toolRight"> 
                 <div class="hotpoint content hide">
                     <ul>
-                        <li class="addSpot">
+                        <li class="addBtn"> 
                             <div class="buttons">
-                                <button class="innerBtn" id="addHotSpots">添加热点</button>
-                            </div>
-                        </li>
-                        <!-- <li class="describ noBorderbott">
-                            <label class="remark">通过添加热点,您可以进一步装饰您的场景;例如:说明文字、图片、音频、视频等。</label>
-                        </li> -->
-                        <li class="tourSelectWarp hotListSwitch">
-                            <div class="itemTitle hotListSwitchTitle">
-                                <span>热点列表</span>
-                            </div>
-                            <ul id="hotListSwitch" class="switch clearfix hotStyle-item colorWrap">
+                                <button class="innerBtn" data-type="shine">添加热点</button>
+                                <button class="innerBtn" data-type="photo">添加展览</button>
+                            </div> 
+                        </li>  
+                        <li> 
+                            <ul id="wireframeSwitch" class="switch clearfix   ">
                                 <label><input class="mui-switch mui-switch-animbg" type="checkbox">
-                                    启用热点列表
+                                    打开模型线框(临时)
                                 </label>
                             </ul>
-                        </li>
-                        <li class="tourSelectWarp hotListSwitch">
                             <div class="itemTitle">
-                                <span>热点大小 (初始值为1)</span>
+                                <span>热点默认大小 (初始值为1)</span>
                             </div>
                             <ul id="hotIconScale" class="clearfix hotStyle-item colorWrap">
                                 <input class="" type="number" placeholder="请输入热点大小比例" value="1" max="100" min="0.1"
                                     step="0.1">
                             </ul>
                         </li>
-                        <li>
+                        <li id="hotVisible">
                             <div class="buttons">
-                                <button class="innerBtn cancel" id="hotVisible">热点可视</button>
-                            </div>
+                                <button class="innerBtn cancel" >可视</button>
+                            </div> 
+                            <label class="remark hide" >注:修改热点贴图样式或位置大小后,可视性会被自动重新计算。 </label>
+                             
                         </li>
                         <li class="spotList">
                             <div class="itemTitle">
@@ -956,35 +951,93 @@
                     </ul>
                     <div id="hotpointDetail" class="editDetail secondary atRight">
                         <div class="itemTitle head">
-                            <span>热点添加</span>
+                            <span>属性</span>
                             <a class="close"></a>
                         </div>
                         <div class="content">
                             <ul>
-                                <li class="info">
+                                <li name="info">
                                     <div class="itemTitle" data-size="50" id="project-name1">
                                         <span>标题</span>
                                     </div>
-                                    <!-- <span class="redPoint" id="project-name2" data-size="15">标题</span> -->
                                     <div class="name">
-                                        <input spellcheck="false" placeholder="热点的标题" class="right" type="text"
-                                            minlength="1" maxlength="50" placeholder="">
-                                    </div><!-- 必填,限15字 ??-->
-                                    <div class="itemTitle" data-size="800">
-                                        <span>简介</span>
+                                        <input spellcheck="false" placeholder="标题" class="right" type="text" minlength="1" maxlength="50" placeholder="">
+                                    </div> 
+                                </li>
+                                
+                                
+                                
+                                <li name="style" class='unable' > 
+                                    <div class="itemTitle" data-size="正在加载贴图,请稍候">
+                                        <span>贴图样式</span>
                                     </div>
-                                    <textarea placeholder="热点的简介" class="editText" maxlength="800"></textarea>
-
-
-
+                                    <ul class="MenuOptions innerBtn">
+                                        <li class="halfCell chosen" index="shine">闪烁</li>
+                                        <li class="halfCell" index="photo">图片</li>
+                                        <li class="halfCell" index="video">视频</li>
+                                    </ul>  
+                                    <label class="remark">注:修改样式图会影响到使用该组样式的所有热点。鼠标划到样式时使用它的热点会显示边框。未被使用的样式会在保存发布后被删除。</label>
+                                    <div id='shineTexSelect' class='selectList texList'> 
+                                        <a class="selection">
+                                            <ul class="hotTexUpload">
+                                                <li class="uploaded upload hide">
+                                                    <div></div>
+                                                </li>
+                                                <li class="uploaded upload hide">
+                                                    <div></div>
+                                                </li>
+                                            </ul>
+                                        </a>
+                                        <ul class="list  hide"></ul> 
+                                    </div>
+                                    
+                                    <div id='photoTexSelect' class='selectList texList hide'> 
+                                        <a class="selection"> 
+                                            <div class="uploaded hide">
+                                                
+                                            </div>  
+                                        </a>
+                                        <ul class="list  hide"></ul> 
+                                    </div>
+                                    
+                                    <div id='videoTexSelect' class='selectList texList text hide'> 
+                                        <a class="selection">  
+                                        </a>
+                                        <ul class="list  hide"></ul> 
+                                    </div> 
+                                     
+                                    <div id="gifEdit" style="display: block;  margin: 26px 0 10px 0;"> 
+                                        <div class='hr'></div>
+                                        <ul id="gifSwitch" class="switch clearfix hotStyle-item colorWrap"  >
+                                            <label style= " margin: 0px 0 10px 0;"><input class="mui-switch mui-switch-animbg" type="checkbox">
+                                                是否开启动画
+                                            </label> 
+                                        </ul> 
+                                        <div id="gifInfoEdit" style="display:none">
+                                            横向 <input id="gifXCount"> 帧 (帧宽<span id="gifCellWidth"></span>px)<br>
+                                            纵向 <input id="gifYCount"> 帧 (帧高<span id="gifCellHeight"></span>px)<br>
+                                            末尾空缺 <input id="voidCount"> 帧 <br>
+                                            
+                                            共<span id="gifFrameCount">1</span>帧,总宽<span id="gifImgWidth">2048</span>px, 总高<span id="gifImgHeight">2048</span>px<br>
+                                            时长 <input id="gifDuration"> 秒( 帧率 <input id="gifFps" style=""> )<br>
+                                            
+                                            <!-- <input  class="editCheckbox" type="checkbox" value="loadlogo" id="loopGif"></input> -->
+                                            <label class="remark"  style='margin: 10px 0 10px 0;'>注:1 精灵贴图的排列顺序为从左到右、从上到下。   2 图片最长边尽量不大于2048px,因部分手机gpu性能有限。 </label>
+                                        </div>
+                                        
+                                        
+                                    </div>
+                                    
+                                    
                                 </li>
-                                <li class="setPos">
-                                    <div class="itemTitle">
-                                        <span>位置</span>
+                                
+                                <li name="setPos">
+                                    <div class="itemTitle" >
+                                        <span>位置大小</span>
                                     </div>
                                     <ul>
-                                        <li>
-                                            <input name="isSprite" class="editCheckbox" type="checkbox" value="isSprite"
+                                        <li class="editCheckbox">
+                                            <input name="isSprite"  type="checkbox" value="isSprite"
                                                 id="isSprite">
                                             <label for="isSprite"></label>
                                             <label for="isSprite">恒朝向相机 </label>
@@ -992,186 +1045,171 @@
                                     </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="scale" data-lang="">缩放</li> 
                                         <li class="halfCell" index="rotate" data-lang="">旋转</li>
                                     </ul>
-                                    
-                                    
-                                    <ul id="setHotPosForPano" class="switch " style="margin-top:28px">
+                                    <div class="buttons">
+                                        <button class="innerBtn" name="setSpace">切换为世界坐标方向</button>
+                                        <button class="innerBtn" name="useSuitableRatio">自适应缩放比例</button> 
+                                        <button class="innerBtn" name="resetRot" style='    width: 100px;'>重置旋转</button>
+                                    </div>
+                                      
+                                   
+                                    <ul id="setPosForPano" class="switch " style="margin-top:18px">
                                         <label><input class="mui-switch mui-switch-animbg" type="checkbox">
                                             当前漫游点独立调整
                                         </label>
-                                        <label class="remark">如在其他点位出现错位,请开启此开关,独立调整在特定点位的位移/缩放/旋转。</label>
+                                        <label class="remark">若在不同点位出现错位,请开启此开关,独立调整在特定点位的位移。</label>
                                     
                                     </ul>
                                 </li>
-                                <li class="style">
+                                
+                                   
+                                <li name="model" class='unable'>
                                     <div class="itemTitle">
-                                        <span>样式</span>
+                                        <span data-lang="">模型</span>
                                     </div>
-                                    <ul class="MenuOptions innerBtn">
-                                        <li class="halfCell chosen" index="default">默认</li>
-                                        <li class="halfCell" index="user">自定义</li>
+                                    <ul class="MenuOptions innerBtn" name="modelType">
+                                        <li class="halfCell chosen" index="default" data-lang="">默认</li>
+                                        <li class="halfCell" index="user" data-lang="">自定义</li>  
                                     </ul>
-                                    <!-- <div id="userUploadStyle" class="hide">
-                                        <ul>
-                                            <li class="upload ">
-                                                <div> </div><a class="del"></a>
-                                            </li>
-                                            <li class="upload hide">
-                                                <div> </div><a class="del"></a>
-                                            </li>
-                                        </ul>
-                                    </div> -->
-                                    <label class="remark">注:修改样式图会影响到使用该组样式的所有热点。使用该样式的热点会在鼠标划到该样式时显示名称标签。无热点使用的样式会在保存发布后被删除。</label>
-                                    <div id='spotTexSelect' class='selectList'>
-                                    
-                                        <a class="selection">
-                                            <ul class="hotTexUpload">
-                                                <li class="uploaded upload hide">
-                                                    <div></div>
-                                                </li>
-                                                <li class="uploaded upload hide">
-                                                    <div></div>
-                                                </li>
-                                            </ul>
-                                        </a>
-                                        <ul class="list  hide"></ul> 
-                                    </div>
-                                    
-                                </li>
-                                <li class="scale">
+                                    <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 class="MenuOptions innerBtn">
-                                        <li class="halfCell chosen" index="default">默认</li>
-                                        <li class="halfCell" index="user">自定义</li>
-                                    </ul>
-                                    <div id="userHotScale" class="hide">
-                                        <ul id="hotIconScale_2" class="clearfix hotStyle-item colorWrap">
-                                            <input class="" type="number" placeholder="请输入热点大小比例" value="1" max="100" min="0.1" step="0.1">
-                                        </ul>
+                                        <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 class="photo">
-                                    <div class="itemTitle" data-size="<9M">
-                                        <span>图片</span>
+                                
+                                
+                                <li name='content'>
+                                    <div class="itemTitle">
+                                        <span>热点内容</span>
                                     </div>
-                                    <div class="list edit-fun-images clearfix"></div>
-                                    <div class="upload">
-                                        <div data-type='photo'>
-                                            <span>手动上传</span>
-                                            <div class="buttons">
-                                                <button class="submit innerBtn">更改</button>
+                                    <ul>
+                                    <li name="intro">
+                                        <div class="itemTitle" data-size="800">
+                                            <span>简介</span>
+                                        </div>
+                                        <textarea placeholder="简介" class="editText" maxlength="800"></textarea>
+                                    </li>
+                                    <li name="photo">
+                                    
+                                        <div class="itemTitle" data-size="<9M">
+                                            <span>图片</span>
+                                        </div>
+                                        <div class="list edit-fun-images clearfix"></div>
+                                        <div class="upload">
+                                            <div data-type='photo'>
+                                                <span>手动上传</span>
+                                                <div class="buttons">
+                                                    <button class="submit innerBtn">更改</button>
+                                                </div>
+                                                <input type="file" accept="image/*">
                                             </div>
-                                            <input type="file" accept="image/*">
+                                            <a class="del"></a>
                                         </div>
-                                        <a class="del"></a>
-                                    </div>
-                                </li>
-                                <li class="video">
-                                    <div class="itemTitle" data-size="MP4">
-                                        <span>视频</span>
-                                    </div>
-                                    <div class="list edit-fun-images clearfix"></div>
-                                    <div class="upload">
-                                        <div data-type='video'>
-                                            <span>手动上传</span>
+                                    </li>
+                                    <li name="video">
+                                        <div class="itemTitle" data-size="MP4">
+                                            <span>视频</span>
+                                        </div>
+                                        <div class="list edit-fun-images clearfix"></div>
+                                        <div class="upload">
+                                            <div data-type='video'>
+                                                <span>手动上传</span>
+                                                <div class="buttons">
+                                                    <button class="submit innerBtn">更改</button>
+                                                </div>
+                                                <input type="file" accept="video/*">
+                                            </div>
+                                            <a class="del"></a>
+                                        </div>
+                                    </li>
+                                    <li name="audio" class='mediaUpload'>
+                                        <div class="itemTitle">
+                                            <span>添加音频</span>
                                             <div class="buttons">
-                                                <button class="submit innerBtn">更改</button>
+                                                <input type="file" id="upload-hotBgm" accept="audio/*">
+                                                <button class="innerBtn submit">上传</button>
                                             </div>
-                                            <input type="file" accept="video/*">
                                         </div>
-                                        <a class="del"></a>
-                                    </div>
-                                </li>
-                                <li class="audio mediaUpload">
-                                    <div class="itemTitle">
-                                        <span>添加音频</span>
-                                        <div class="buttons">
-                                            <input type="file" id="upload-hotBgm" accept="audio/*">
-                                            <button class="innerBtn submit">上传</button>
+                                        <div class="playBox hide" data-type='music'>
+                                            <div><a target="_blank"></a></div>
+                                            <div>
+                                                <span id="hotBgName" class="title">background</span>
+                                                <span class="delete">删除</span>
+                                            </div>
                                         </div>
-                                    </div>
-                                    <div class="playBox hide" data-type='music'>
-                                        <div><a target="_blank"></a></div>
-                                        <div>
-                                            <span id="hotBgName" class="title">background</span>
-                                            <span class="delete">删除</span>
+                                    </li>
+                                    <li name="modelSrc" class='mediaUpload' >
+                                        <div class="itemTitle">
+                                            <span>添加模型链接</span>
                                         </div>
-                                    </div>
-                                </li>
-                                <li class="model mediaUpload">
-                                    <div class="itemTitle">
-                                        <span>添加模型</span>
-                                    </div>
-                                    <div class="list"></div>
-                                    <div class="linkBtns">
-                                        <div class="buttons">
-                                            <button class="innerBtn submit add">新增</button>
-                                            <button class="innerBtn submit delete">删除</button>
+                                        <div class="list"></div>
+                                        <div class="linkBtns">
+                                            <div class="buttons">
+                                                <button class="innerBtn submit add">新增</button>
+                                                <button class="innerBtn submit delete">删除</button>
+                                            </div>
                                         </div>
-                                    </div>
-                                </li>
-                                <li class="webPage mediaUpload">
-                                    <div class="itemTitle">
-                                        <span>添加网页</span>
-                                    </div>
-
-                                    <!-- <ul>
-                                        <li>
-                                            <input name="linkOutside" class="editCheckbox" type="checkbox" value="linkOutside" id="linkOutside"></input>
-                                            <label for="linkOutside"></label>
-                                            <label for="linkOutside">在新窗口打开(其他内容将失效) </label>
-                                        </li>
-                                    </ul>   
-                                    -->
-
-                                    <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>
-                                    </ul>
-                                    <label class="remark">方式1须https, 方式2、3 除当前第一个链接外,其他内容将不展现。</label>
-                                    <div class="list"></div>
-                                    <div class="linkBtns">
-                                        <div class="buttons">
-                                            <button class="innerBtn submit add">新增</button>
-                                            <button class="innerBtn submit delete">删除</button>
+                                    </li>
+                                    <li name="webPage"> <!-- mediaUpload -->
+                                        <div class="itemTitle">
+                                            <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>
+                                        </ul>
+                                        <label class="remark">方式1须https, 方式2、3 除当前第一个链接外,其他内容将不展现。</label>
+                                        <div class="list"></div>
+                                        <div class="linkBtns">
+                                            <div class="buttons">
+                                                <button class="innerBtn submit add">新增</button>
+                                                <button class="innerBtn submit delete">删除</button>
+                                            </div>
                                         </div>
-                                    </div>
-                                </li>
-                                <li class="">
-                                    <div class="itemTitle">
-                                        <span>动作类型</span>
-                                    </div>
-                                    
-                                    <ul class="MenuOptions innerBtn" name="actionType">
-                                        <li class="halfCell chosen" index="common" data-lang="" style='height: 63px; line-height:61px'>默认</li>
-                                        <li class="halfCell" index="noAction" data-lang="">不打开<br>不校准</li>
-                                        <li class="halfCell" index="dontExam" data-lang="">只打开<br>不校准</li>
+                                    </li> 
                                     </ul>
-                                    
-                                    
-                                    
-                                    <!-- <ul>
-                                        <li>
-                                            <input name="noAction" class="editCheckbox" type="checkbox" value="noAction"
-                                                id="noAction">
-                                            <label for="noAction"></label>
-                                            <label for="noAction">仅用于指示(不打开也不飞近)</label>
-                                        </li>
-                                        <li>
-                                            <input name="noAction" class="editCheckbox" type="checkbox" value="noAction"
-                                                id="noAction">
-                                            <label for="noAction"></label>
-                                            <label for="noAction">仅打开(不校准飞近)</label>
-                                        </li>
-                                        
-                                    </ul> -->
                                 </li>
-                            </ul>
+                             </ul>
                         </div>
                         <div class="buttons tail">
                             <button class="submit innerBtn">完成</button>
@@ -1181,6 +1219,16 @@
                     </div>
                 </div>
 
+
+
+            
+
+
+
+
+
+
+
                 <div class="screen content hide">
                     <ul>
                         <li>
@@ -1196,8 +1244,8 @@
                     <ul>
                         <li data-name="other">
                             <ul class="other-item">
-                                <li>
-                                    <input name="show-cad" class="editCheckbox" type="checkbox">
+                                <li class="editCheckbox">
+                                    <input name="show-cad" type="checkbox">
                                     <label for="show-cad"></label>
                                     <label for="show-cad">开启小地图 </label>
                                 </li>
@@ -1294,7 +1342,7 @@
                                     </div>
                                     <input type="file" accept="image/*">
                                 </div>
-                                <a class="del hasHover"></a>
+                                <a class="del "></a>
                             </div>
                         </li>
                         <li data-name="hotStyle">
@@ -1308,20 +1356,9 @@
                                 <li style="background-image: url(images/edit/hotStyle_2.png);"
                                     data-val='{"default":"images/point2.png","higt":"images/point2_light.png"}'>
                                 </li>  
-                                <!-- <li class="addSpot customizeHotStyle" >
-                                    <div class="list edit-fun-images clearfix"></div>
-                                    <div class="upload" id="SpotStyle">
-                                        <div data-type='photo'> 
-                                            <div class="buttons">
-                                                <button class="submit innerBtn">更改</button>
-                                            </div>
-                                            <input type="file" accept="image/*">
-                                        </div>
-                                        <a class="del"></a>
-                                    </div>
-                                </li>  -->
+                                 
                             </ul>
-                        </li>
+                        </li> 
                         <li data-name="floorMarkerColor">
                             <div class="itemTitle">
                                 <span>当前位置/导览路线</span>
@@ -1343,46 +1380,52 @@
                                 <span>其他设置</span>
                             </div>
                             <ul class="other-item">
-                                <li>
-                                    <input name="loadlogo" class="editCheckbox" type="checkbox" value="loadlogo"
+                                <li class="editCheckbox">
+                                    <input name="hotListSwitch"  type="checkbox" value="hotListSwitch"
+                                        id="hotListSwitch">
+                                    <label for="hotListSwitch"></label>
+                                    <label for="hotListSwitch">启用热点列表 </label>
+                                </li>
+                                <li class="editCheckbox">
+                                    <input name="loadlogo"  type="checkbox" value="loadlogo"
                                         id="loadlogo">
                                     <label for="loadlogo"></label>
                                     <label for="loadlogo">隐藏公司logo </label>
                                 </li>
-                                <li>
-                                    <input name="hotImgScale" class="editCheckbox" type="checkbox" value="hotImgScale"
+                                <li class="editCheckbox">
+                                    <input name="hotImgScale"  type="checkbox" value="hotImgScale"
                                         id="hotImgScale">
                                     <label for="hotImgScale"></label>
                                     <label for="hotImgScale">热点图片放大 </label>
                                 </li>
-                                <li>
-                                    <input name="hideFloorMarker" class="editCheckbox" type="checkbox"
+                                <li class="editCheckbox">
+                                    <input name="hideFloorMarker"  type="checkbox"
                                         value="hideFloorMarker" id="hideFloorMarker">
                                     <label for="hideFloorMarker"></label>
                                     <label for="hideFloorMarker">隐藏地面marker标记 </label>
                                 </li>
-                                <li>
-                                    <input name="hideMouseMarker" class="editCheckbox" type="checkbox"
+                                <li class="editCheckbox">
+                                    <input name="hideMouseMarker"  type="checkbox"
                                         value="hideMouseMarker" id="hideMouseMarker">
                                     <label for="hideMouseMarker"></label>
                                     <label for="hideMouseMarker">隐藏鼠标标记 </label>
                                 </li>
-                                <li>
-                                    <input name="showingLabels" class="editCheckbox" type="checkbox"
+                                <li class="editCheckbox">
+                                    <input name="showingLabels"  type="checkbox"
                                         value="showingLabels" id="showingLabels">
                                     <label for="showingLabels"></label>
                                     <label for="showingLabels">加载俯视图区域标签</label>
                                 </li>
                                 
                                 
-                                <li>
-                                    <input name="g_specialScene" class="editCheckbox" type="checkbox"
+                                <li class="editCheckbox">
+                                    <input name="g_specialScene"  type="checkbox"
                                         value="g_specialScene" id="g_specialScene">
                                     <label for="g_specialScene"></label>
                                     <label for="g_specialScene">特殊大场景 <i class="colorRed">-请慎重选择</i> </label>
                                 </li>
-                                <li>
-                                    <input name="twoData" class="editCheckbox" type="checkbox" value="twoData"
+                                <li class="editCheckbox">
+                                    <input name="twoData"  type="checkbox" value="twoData"
                                         id="twoData">
                                     <label for="twoData"></label>
                                     <label for="twoData">启动二代数据 <i class="colorRed">-请慎重选择</i> </label>
@@ -1401,7 +1444,7 @@
 
                 <div class="music content hide">
                     <ul>
-                        <li class="audio mediaUpload">
+                        <li name='audio' class=" mediaUpload">
                             <div class="itemTitle">
                                 <span>背景音乐</span>
                                 <div class="buttons">
@@ -1410,7 +1453,7 @@
                                 </div>
                             </div>
                             <div class="playBox hide" data-type='music'>
-                                <div><a target="_blank" id="query-bgm"></a></div>
+                                <div><a target="_blank"></a></div>
                                 <div>
                                     <span class="title">2015录音.MP3</span>
                                     <span class="delete">删除</span>
@@ -1462,7 +1505,7 @@
                         <div id="tourFolderEdit" class="secondary  editDetail  atRight">
                             <div class="itemTitle head">
                                 <span>导览编辑</span>
-                                <!-- <a class="close"></a> -->
+                                <a class="close"></a>
                             </div>
                             <div class="content">
                                 <ul>
@@ -1518,7 +1561,8 @@
                                 </ul>
                             </div>
                             <div class="buttons tail">
-                                <button class="tourSubmit submit innerBtn">完成</button> 
+                                <button class="submit innerBtn">完成</button> 
+                                <button class="cancel innerBtn">取消</button>
                             </div> 
                         </div>
                     
@@ -1533,7 +1577,7 @@
                         <div id="tourItemEdit" class="secondary  editDetail  atRight">
                             <div class="itemTitle head">
                                 <span>片段编辑</span>
-                                <!-- <a class="close"></a> -->
+                                <a class="close"></a> 
                             </div>
                             <div class="content">
                                 <ul>
@@ -1545,7 +1589,7 @@
                                             <input spellcheck="false" placeholder="导览的名称" class="right" type="text" minlength="1" maxlength="15" placeholder="" data-oper=tour-input>
                                         </div><!-- 必填,限15字 ??-->
                                     </li>
-                                    <li class="audio mediaUpload">
+                                    <li name='audio' class=" mediaUpload">
                                         <div class="itemTitle itemMargin">
                                             <span>添加音频</span>
                                             <div class="buttons">
@@ -1581,7 +1625,8 @@
                                 </ul>
                             </div>
                             <div class="buttons tail">
-                                <button class="tourSubmit submit innerBtn">完成</button> 
+                                <button class="submit innerBtn">完成</button> 
+                                <button class="cancel innerBtn">取消</button>
                             </div> 
                         </div> 
                         
@@ -1651,91 +1696,8 @@
                             </ul>
                         </li>
                     </ul>
-                </div>
-
-                <div id="overlayProp" class="secondary atRight ">
-                    <div class="itemTitle head">
-                        <span data-lang="">展览属性</span>
-                        <a class="close"></a>
-                    </div>
-                    <div class="content">
-                        <ul>
-                            <li id="overlayUpload">
-                                <div class="itemTitle">
-                                    <span data-lang="">预览</span>
-                                    <div class="buttons" name="upload">
-                                        <button class="innerBtn" data-lang="">上传视频</button>
-                                    </div>
-                                </div>
-                                <div class="preview"><span class="text">支持MP4、MOV等,<20M</span> <span
-                                        attr-type="height"></span><span attr-type="width"></span></div>
-                                <div class="buttons" name="useImgRatio">
-                                    <button class="innerBtn" data-lang="">恢复原始比例</button>
-                                </div>
-                                <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>
-                                </ul>
-                                <ul id='setOverlayPosForPano' class="switch" style="margin-top:28px">
-                                    <label><input class="mui-switch mui-switch-animbg" type="checkbox">
-                                        当前漫游点独立调整
-                                    </label>
-                                    <label class="remark">如在其他点位出现错位,请开启此开关,独立调整在特定点位的位移/缩放/旋转。</label>
-                                </ul>
-                                
-                            </li>
-                            <li id="gifEdit">
-                                <div class="itemTitle">
-                                    <span data-lang="">设置动画</span> 
-                                </div>
-                                
-                                <ul id="gifSwitch" class="switch clearfix hotStyle-item colorWrap">
-                                    <label><input class="mui-switch mui-switch-animbg" type="checkbox">
-                                        是否开启
-                                    </label> 
-                                </ul>
-                                
-                                <div id="gifInfoEdit" style='display:none'>
-                                    横向 <input id="gifXCount"></input> 帧 ( 宽<input id="gifCellWidth">px )<br>
-                                    纵向 <input id="gifYCount"></input> 帧 ( 高<input id="gifCellHeight">px )<br>
-                                    末尾空缺 <input id="voidCount"></input> 帧 <br>
-                                    
-                                    共<span id='gifFrameCount'></span>帧,总宽<span id='gifImgWidth'></span>px, 总高<span id='gifImgHeight'></span>px<br>
-                                    时长 <input id="gifDuration"></input> 秒( 帧率 <input id="gifFps" style=></input> )<br>
-                                    
-                                    <!-- <input  class="editCheckbox" type="checkbox" value="loadlogo" id="loopGif"></input> -->
-                                </div>
-                                
-                                <label class="remark">注:1 精灵贴图的排列顺序为从左到右、从上到下。   2 图片最长边尽量不大于2048px,因部分手机gpu性能有限。 </label>
-                                
-                            </li>
-
-                            <li>
-                                <div class="itemTitle">
-                                    <span data-lang="">厚度</span>
-                                </div>
-                                <div id="videoDepth"></div>
-                            </li>
-                            
-                            <li id='overlayModel'>
-                                <div class="itemTitle">
-                                    <span data-lang="">替换展板模型</span>
-                                </div>
-                                <div class="buttons" name="upload">
-                                    <button class="innerBtn" data-lang="">上传模型  (obj,<500k)</button>
-                                </div>
-                            </li>
-                            
-                            
-                        </ul>
-                    </div>
-                    <div class="buttons tail">
-                        <button class="submit innerBtn" data-lang="">完成</button>
-                        <button class="delete cancel innerBtn" data-lang="">删除</button>
-                    </div>
-                </div>
-
+                </div> 
+                
             </div>
             <div data-label="video">
                 <div class="fun-view-video">
@@ -1744,6 +1706,7 @@
                 </div>
             </div>
         </div>
+        
         <div class="edit-loading hide">
             <div class="square-move">
                 <i class="move"></i>
@@ -1844,7 +1807,7 @@
     <script src="js/SpecialScene.js"></script>
     <script src="js/manage.js"></script>
     <script src="js/edit.js"></script>
-    <script src="js/overlay.js"></script>
+    <script src="js/Hot.js"></script>
     <script src="js/TransformControls.js"></script>
     <script src="js/lib/OBJLoader.js"></script>
     <script src="js/main_2020_edit.js"></script>

二进制
images/icon_Google_Chrome_2011.png


二进制
images/icon_Internet_Explorer_10.png


二进制
images/icon_MacOSX_Safari.png


二进制
images/icon_Mozilla_Firefox.png


+ 3 - 7
index.html

@@ -832,15 +832,11 @@
     <!-- <script src="js/app-preheater.js?v=2.25.6-0-gd87e5b1"></script> -->
     <script src="js/myShow.js"></script>
     <script src="js/SpecialScene.js"></script>
-    <script src="js/manage.js"></script>
-    
+    <script src="js/manage.js"></script> 
     <!-- <script src="js/stats.min.js"></script> -->
-    <script src="js/overlay.js"></script>
-     
-    
-    
+    <script src="js/Hot.js"></script>  
     <script src="js/main_2020_show.js"></script>
-    
+    <script src="js/lib/OBJLoader.js"></script>
     <script src="/CAD/bundle.js"></script>
 
 

+ 22 - 16
js/TransformControls.js

@@ -459,9 +459,9 @@ var TransformControls = function ( camera, domElement, options ) {
 
             //add:
              
-            if(EditOverlay.editing){
+            /* if(EditOverlay.editing){
                 EditOverlay.updatePosition();
-            }else if(editTool.hotpoint.editSpot){ 
+            }else */ if(editTool.hotpoint.editSpot){ 
                 editTool.hotpoint.updateTransform('position');
             }
     
@@ -538,10 +538,13 @@ var TransformControls = function ( camera, domElement, options ) {
             
             
            
-            if(EditOverlay.editing){
+            /* if(EditOverlay.editing){
                 EditOverlay.updateScale(); 
-            } 
-
+            }  */
+            if(editTool.hotpoint.editSpot){ 
+                editTool.hotpoint.updateTransform('scale');
+            }
+    
 
 
 		} else if ( mode === 'rotate' ) {
@@ -604,12 +607,15 @@ var TransformControls = function ( camera, domElement, options ) {
             //add:
             
             
-           
+          /*  
             if(EditOverlay.editing){
                 EditOverlay.updateQua(); 
-            }else if(editTool.hotpoint.editSpot){
+            }  */
+            
+            if(editTool.hotpoint.editSpot){
                 editTool.hotpoint.updateTransform('quaternion');
-            }
+            } 
+            
 		}
 
 		this.dispatchEvent( changeEvent );
@@ -1035,11 +1041,11 @@ var TransformControlsGizmo = function (options) {
 			[ new Mesh( scaleHandleGeometry, matGreen ), [ 0, 0.8, 0 ]],
 			[ new Line( lineGeometry, matLineGreen ), null, [ 0, 0, Math.PI / 2 ], [ 0.8, 1, 1 ]]
 		],
-		/*Z: [
+		Z: [
 			[ new Mesh( scaleHandleGeometry, matBlue ), [ 0, 0, 0.8 ], [ Math.PI / 2, 0, 0 ]],
 			[ new Line( lineGeometry, matLineBlue ), null, [ 0, - Math.PI / 2, 0 ], [ 0.8, 1, 1 ]]
 		],
-		 XY: [
+		/* XY: [
 			[ new Mesh( scaleHandleGeometry, matYellowTransparent ), [ 0.85, 0.85, 0 ], null, [ 2, 2, 0.2 ]],
 			[ new Line( lineGeometry, matLineYellow ), [ 0.855, 0.98, 0 ], null, [ 0.125, 1, 1 ]],
 			[ new Line( lineGeometry, matLineYellow ), [ 0.98, 0.855, 0 ], [ 0, 0, Math.PI / 2 ], [ 0.125, 1, 1 ]]
@@ -1053,10 +1059,10 @@ var TransformControlsGizmo = function (options) {
 			[ new Mesh( scaleHandleGeometry, matMagentaTransparent ), [ 0.85, 0, 0.85 ], null, [ 2, 0.2, 2 ]],
 			[ new Line( lineGeometry, matLineMagenta ), [ 0.855, 0, 0.98 ], null, [ 0.125, 1, 1 ]],
 			[ new Line( lineGeometry, matLineMagenta ), [ 0.98, 0, 0.855 ], [ 0, - Math.PI / 2, 0 ], [ 0.125, 1, 1 ]]
-		], */
+		], 
 		XYZX: [
 			[ new Mesh( new BoxBufferGeometry( 0.125, 0.125, 0.125 ), matWhiteTransparent.clone() ), [ 1.1, 0, 0 ]],
-		],
+		],*/
 		XYZY: [
 			[ new Mesh( new BoxBufferGeometry( 0.125, 0.125, 0.125 ), matWhiteTransparent.clone() ), [ 0, 1.1, 0 ]],
 		]/* ,
@@ -1075,10 +1081,10 @@ var TransformControlsGizmo = function (options) {
 		Y: [
 			[ new Mesh( new CylinderBufferGeometry( 0.2, 0, 0.8, 4, 1, false ), matInvisible ), [ 0, 0.5, 0 ]]
 		],
-		/* Z: [
+		Z: [
 			[ new Mesh( new CylinderBufferGeometry( 0.2, 0, 0.8, 4, 1, false ), matInvisible ), [ 0, 0, 0.5 ], [ Math.PI / 2, 0, 0 ]]
 		],
-		XY: [
+		/* XY: [
 			[ new Mesh( scaleHandleGeometry, matInvisible ), [ 0.85, 0.85, 0 ], null, [ 3, 3, 0.2 ]],
 		],
 		YZ: [
@@ -1086,10 +1092,10 @@ var TransformControlsGizmo = function (options) {
 		],
 		XZ: [
 			[ new Mesh( scaleHandleGeometry, matInvisible ), [ 0.85, 0, 0.85 ], null, [ 3, 0.2, 3 ]],
-		], */
+		], 
 		XYZX: [
 			[ new Mesh( new BoxBufferGeometry( 0.2, 0.2, 0.2 ), matInvisible ), [ 1.1, 0, 0 ]],
-		],
+		],*/
 		XYZY: [
 			[ new Mesh( new BoxBufferGeometry( 0.2, 0.2, 0.2 ), matInvisible ), [ 0, 1.1, 0 ]],
 		]/* ,

文件差异内容过多而无法显示
+ 2557 - 2095
js/edit.js


+ 70 - 7
js/lib/OBJLoader.js

@@ -1,6 +1,9 @@
  
 
 var getObjLoader = function(){
+    THREE.Cache.enabled = true  //add 记录获取过的obj
+    
+    
     
     var BufferAttribute = THREE.BufferAttribute
    
@@ -211,7 +214,7 @@ var getObjLoader = function(){
 
 			if ( cached !== undefined ) {
 
-				scope.manager.itemStart( url );
+				/* scope.manager.itemStart( url );
 
 				setTimeout( function () {
 
@@ -219,9 +222,14 @@ var getObjLoader = function(){
 
 					scope.manager.itemEnd( url );
 
-				}, 0 );
-
-				return cached;
+				}, 0 ); 
+                return cached;
+                
+                */ 
+                //改 直接返回obj
+                if ( onLoad ) onLoad( cached.clone() );
+                return cached.clone()
+				
 
 			}
 
@@ -352,7 +360,7 @@ var getObjLoader = function(){
 
 					var response = this.response;
 
-					THREE.Cache.add( url, response );
+					//THREE.Cache.add( url, response );
 
 					var callbacks = loading[ url ];
 
@@ -886,8 +894,12 @@ THREE.OBJLoader = ( function () {
 			var loader = new FileLoader( scope.manager );
 			loader.setPath( this.path );
 			loader.load( url, function ( text ) {
-
-				onLoad( scope.parse( text ) );
+                if(text instanceof THREE.Object3D)onLoad(text) //add 返回cache中的obj
+				else{
+                    var object = scope.parse( text )
+                    THREE.Cache.add( url, object );
+                    onLoad( object );
+                }
 
 			}, onProgress, onError );
 
@@ -1299,6 +1311,57 @@ THREE.OBJLoader = ( function () {
 
 	};
 
+
+
+
+    THREE.Box3Helper = function( box, hex ) {
+
+        this.type = 'Box3Helper';
+
+        this.box = box;
+
+        var color = ( hex !== undefined ) ? hex : 0xffff00;
+
+        var indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );
+
+        var positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ];
+
+        var geometry = new THREE.BufferGeometry();
+
+        geometry.setIndex( new THREE.BufferAttribute( indices, 1 ) );
+
+        geometry.addAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
+
+        THREE.LineSegments.call( this, geometry, new THREE.LineBasicMaterial( { color: color } ) );
+
+        this.geometry.computeBoundingSphere();
+
+    }
+
+    THREE.Box3Helper.prototype = Object.create( THREE.LineSegments.prototype );
+    THREE.Box3Helper.prototype.constructor = THREE.Box3Helper; 
+    THREE.Box3Helper.prototype.updateMatrixWorld = function ( force ) {
+
+        var box = this.box;
+
+        //if ( box.isEmpty() ) return;
+
+        box.center( this.position );
+
+        box.size( this.scale );
+
+        this.scale.multiplyScalar( 0.5 );
+
+        THREE.Object3D.prototype.updateMatrixWorld.call( this, force );
+
+    };
+    THREE.Box3Helper.prototype.clone = function() {
+        return new this.constructor(this.box, this.material.color)//.copy(this)
+    }
+
+
+
+
 	return OBJLoader;
 
 } )();

文件差异内容过多而无法显示
+ 326 - 227
js/main_2020_edit.js


+ 262 - 210
js/main_2020_show.js

@@ -10,7 +10,7 @@ window.easing = null
 window.lerp = null
 window.transitions = null
 window.browser = null
-window.momentTourBlackNewType =  number == 'TEST'//true
+window.momentTourBlackNewType = 0//=  number == 'TEST'//true
 
 g_playAudio = null
 
@@ -3396,7 +3396,7 @@ window.Modernizr = function(n, e, t) {
             insideFar: 5e3,
             insideLookSpeed: .12,
             insideLookLimitUp: 40,
-            insideLookLimitDown: -40,
+            insideLookLimitDown: -90,//-40,
             orthoNear: 1,
             orthoFar: 5e3,
             orthoBase: 10,
@@ -4346,7 +4346,7 @@ window.Modernizr = function(n, e, t) {
                 return this.enabled && !this.locked
             }
             ,
-            n.prototype.lookAt = function(e) {
+            /* n.prototype.lookAt = function(e) {
                 var t = this.camera.position.clone().sub(e)
                   , i = Math.atan(t.z / t.x);
                 i += t.x < 0 ? Math.PI : 0,
@@ -4356,6 +4356,20 @@ window.Modernizr = function(n, e, t) {
                   , o = Math.atan(t.y / n);
                 this.lat = -r.Math.radToDeg(o)
             }
+             */
+            
+            n.prototype.lookAt = function(aim, dir) {
+                var t = dir || this.camera.position.clone().sub(aim); //aim所指点的笛卡尔坐标系
+ 
+                var i = Math.atan(t.z / t.x);
+                i += t.x < 0 ? Math.PI : 0;
+                i += t.x > 0 && t.z < 0 ? 2 * Math.PI : 0;
+                this.lon = r.Math.radToDeg(i) + 180;
+                var n = Math.sqrt(t.x * t.x + t.z * t.z),
+                    o = Math.atan(t.y / n);
+                this.lat = -r.Math.radToDeg(o);
+            }
+
             ,
             n.prototype.startRotationFrom = function(e, t) {
                 l.convertScreenPositionToNDC(e, t, this.pointer),
@@ -5064,9 +5078,9 @@ window.Modernizr = function(n, e, t) {
                     if (r.isPano()) {
                     
                         //var s = 0 === this.destinationItem || e ? u.BLACK : this.nextWarpStyle;
-                        //var walk = window.MP_PREFETCHED_MODELDATA.black ? 'black' : 'walk';
+                        //var walk = window.DATA.black ? 'black' : 'walk';
                      
-                        var s = this.getMomentTour(this.destinationItem)   //window.MP_PREFETCHED_MODELDATA.momentTour || "walk";
+                        var s = this.getMomentTour(this.destinationItem)   //window.DATA.momentTour || "walk";
                         a1 = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, v.Show, m.Slow,  s, true, i, this.actionComplete.bind(this)),
                         o = this.arrivedAtDestination.bind(this, !0)
                     
@@ -5338,7 +5352,7 @@ window.Modernizr = function(n, e, t) {
             }
             ,
             n.prototype.getMomentTour = function(destinationItem) {//add
-                var wholeMomentTour = window.MP_PREFETCHED_MODELDATA.momentTour || "walk"; //最外层
+                var wholeMomentTour = window.DATA.momentTour || "walk"; //最外层
                  
                 if(!destinationItem) return wholeMomentTour
                 else{
@@ -6652,7 +6666,7 @@ window.Modernizr = function(n, e, t) {
                    BorderRadius(topRadius.bottom,topRadius.top);
                 }
                 //判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
-                if(window.MP_PREFETCHED_MODELDATA.model.special || window.MP_PREFETCHED_MODELDATA.special){
+                if(window.DATA.model.special || window.DATA.special){
                     window.specialScene && specialScene.special().afterImplement();
                 }
 
@@ -7053,7 +7067,7 @@ window.Modernizr = function(n, e, t) {
                 }),
                 m(e, t),
                 A(e, t),
-                e.data.enable_social_sharing && e.data.is_public && Q.share.enabled && (Ce.init(MP_PREFETCHED_MODELDATA.name/* e.data.name */),
+                e.data.enable_social_sharing && e.data.is_public && Q.share.enabled && (Ce.init(window.DATA.name/* e.data.name */),
                 Ce.on(Me.OPENED, function() {
                     var e = document.getElementById("share-modal");
                     return function() {
@@ -7638,7 +7652,7 @@ window.Modernizr = function(n, e, t) {
             });
 
             /***********************方奕卓 热点列表事件监听 ************************/
-            if(window.MP_PREFETCHED_MODELDATA.showHotListSta) {
+            if(window.DATA.showHotListSta) {
                 $('#hotList').css('display', '');
                 $('#hotList').on('click',function(e){
                     l(e);
@@ -9022,7 +9036,7 @@ window.Modernizr = function(n, e, t) {
               , D = !1
               , N = {
                 populate: function(e) {
-                    if (n(MP_PREFETCHED_MODELDATA.name, e.coBrand)) {
+                    if (n(window.DATA.name, e.coBrand)) {
                         if (r(e.description),
                         o(e.contactName, e.phone, e.email, e.formatted_contact_phone),
                         a(e.address),
@@ -14687,7 +14701,7 @@ window.Modernizr = function(n, e, t) {
                 
                 }catch(e){console.log(e) }
                      
-				window.MP_PREFETCHED_MODELDATA = data; 
+				window.DATA = data; 
                 data.model.summary = data.summary
                 data.model.name = data.name
                 for(let i in data){
@@ -15088,18 +15102,18 @@ window.Modernizr = function(n, e, t) {
                 }
                 
                 //czj 判断someData 有没有hoticon字段 修改热点的样式
-                if (window.MP_PREFETCHED_MODELDATA.hoticon){
+                if (window.DATA.hoticon){
                     
                     g_HotImage = {
-                        point: window.MP_PREFETCHED_MODELDATA.hoticon.default || "https://super.4dage.com/images/4dagePoint2.png",
-                        point2: window.MP_PREFETCHED_MODELDATA.hoticon.higt || "https://super.4dage.com/images/4dagePoint.png"
+                        point: window.DATA.hoticon.default || "https://super.4dage.com/images/4dagePoint2.png",
+                        point2: window.DATA.hoticon.higt || "https://super.4dage.com/images/4dagePoint.png"
                     } ;
                 }
                 //czj 判断someData 有没有backgroundMusic 添加音乐
-                if (window.MP_PREFETCHED_MODELDATA.backgroundMusic) {
-                    if(window.isLocal) g_bgAudio.src = manage.dealURL(window.MP_PREFETCHED_MODELDATA.backgroundMusic) ;
-                    //else g_bgAudio.src = window.MP_PREFETCHED_MODELDATA.backgroundMusic.substr(0,4)=="http" ? window.MP_PREFETCHED_MODELDATA.backgroundMusic : "//" + window.MP_PREFETCHED_MODELDATA.backgroundMusic;
-                    else g_bgAudio.src = window.MP_PREFETCHED_MODELDATA.backgroundMusic
+                if (window.DATA.backgroundMusic) {
+                    if(window.isLocal) g_bgAudio.src = manage.dealURL(window.DATA.backgroundMusic) ;
+                    //else g_bgAudio.src = window.DATA.backgroundMusic.substr(0,4)=="http" ? window.DATA.backgroundMusic : "//" + window.DATA.backgroundMusic;
+                    else g_bgAudio.src = window.DATA.backgroundMusic
                     
                     $("#volume").show();
                 }else if (g_version === "one"){
@@ -15108,7 +15122,7 @@ window.Modernizr = function(n, e, t) {
                 }
 
                 //隐藏公司logo
-                if(window.MP_PREFETCHED_MODELDATA.loadlogo){
+                if(window.DATA.loadlogo){
                     showLogo();
                 }
 
@@ -15987,7 +16001,7 @@ window.Modernizr = function(n, e, t) {
                 transparent: !0
             })
             var sprite = new r.Mesh( geometry, shaderMaterial );
-            var hotIconScale = parseFloat(this.infoAttribute.hotIconScale || window.MP_PREFETCHED_MODELDATA.hotIconScale);
+            var hotIconScale = parseFloat(this.infoAttribute.hotIconScale || window.DATA.hotIconScale);
 			sprite.dynamic = true; 
 			sprite.position.copy(this.position);
             sprite.quaternion.copy(this.quaternion)
@@ -16296,7 +16310,7 @@ window.Modernizr = function(n, e, t) {
 		},
 	
         //判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
-        // if(window.MP_PREFETCHED_MODELDATA.special){
+        // if(window.DATA.special){
         //     specialScene.special().beforeImplement();
         // }
         
@@ -17977,7 +17991,7 @@ window.Modernizr = function(n, e, t) {
                 this.supportedModes[c.TRANSITIONING] = !0,
                 this.supportsTiles = this.configureTiling(),
                 // this.supportsVR = t.is_vr,
-                this.supportsVR = window.MP_PREFETCHED_MODELDATA.supportsVR || false//true;   // 方奕卓 VR功能可配置
+                this.supportsVR = window.DATA.supportsVR || false//true;   // 方奕卓 VR功能可配置
                 this.mode = c.DOLLHOUSE,
                 this.size = null,
                 this.center = null,
@@ -18056,7 +18070,7 @@ window.Modernizr = function(n, e, t) {
               , R = e("../exception/BasicException")
               , P = (e("../constants")
             ,e("events").EventEmitter)
-			,Hot = e("hot")
+			//,Hot = e("hot")
               , O = new g(i);
             n.prototype = Object.create(o.Object3D.prototype),
             b.extend(n, P),
@@ -18192,25 +18206,28 @@ window.Modernizr = function(n, e, t) {
 				})  
             },
             
-            n.prototype.createHotItem = function(data, hots) {
+            n.prototype.createHotItem = function() {
                 var docFragment = document.createDocumentFragment();
-                var keyAry = Object.keys(data);
-                for(var i = 0; i < keyAry.length; i++){
-                    var li = document.createElement('li');
-                    var span = document.createElement('span');
-                    span.innerHTML = data[keyAry[i]].title || data[keyAry[i]].infoAttribute.title   || '热点';
-                   // console.log(span.innerHTML);
-                    li.hot = hots[keyAry[i]];   // 列表每一项对应一个热点
-                    li.appendChild(span);
-                    docFragment.appendChild(li);
-                }
+                
+                this.hotGroup.children.forEach(hot=>{
+                    if(hot.texType == 'shine'){
+                        var li = document.createElement('li');
+                        var span = document.createElement('span');
+                        span.innerHTML = hot.info.title || '热点';
+                        // console.log(span.innerHTML);
+                        li.hot = hot;   // 列表每一项对应一个热点
+                        li.appendChild(span);
+                        docFragment.appendChild(li);
+                    }
+                })
+                  
                 var ul = document.querySelector('#hotListContent ul');
                 ul.appendChild(docFragment);
-                console.log(docFragment);
+                 
             }
 				
 
-            n.prototype.loadOverlays = function(overlays){
+           /*  n.prototype.loadOverlays = function(overlays){
                 var overlays = window.data2 && window.data2.overlays  
                   
                 
@@ -18221,55 +18238,43 @@ window.Modernizr = function(n, e, t) {
                 
                 Overlay.load()
             }
-            
+             */
                 
 			n.prototype.loadhots = function() {//xzw 
-                var e = $.Deferred(); 
+                initHot(this)
+                var r = $.Deferred(); 
                 var t = g_Prefix+"data/" + this.sid + "/data2.js" +'?'+ randomTime().getTime();
-                
-                
-
+                 
                 return a.get(t, {
                     responseType: "json",
                     auth: this.isPublic ? null : f.authorizationHeader
-                }).done(function(t) {
-                    window.data2 = t;
+                }).done(function(e) {
+                    window.data2 = e;
                     
-                    if(!t){
+                    if(!e){
                         console.error("data2 is null") 
                     }else{  
-                        g_data2 = hotMatcher(t);
-                        this.hotsCount = 0;
-                        /* for(var i in t.hots){
-                            this.hotsCount ++;
-                            this.hots[i] = new Hot(i, t.hots[i], this);  
-                            t.hots[i].infoAttribute || (t.hots[i].infoAttribute = {})
-                            this.hots[i].initStyleImg(t.hots[i].infoAttribute);
-                        };
-                        window.hotData = t.hots 
-                        t.hots && this.createHotItem(t.hots, this.hots); */
-                        
-                        
+                        g_data2 = hotMatcher(e);
+                        this.hotsCount = 0; 
                         
                         //因为热点保存后在hots里的顺序会被修改,所以使用order来记录顺序,这里要重排序:
-                        window.hotData = {}
-                        if(t.hots){
-                            var sids = Object.keys(t.hots).sort((a,b)=>{return t.hots[a].order - t.hots[b].order});
-                            
+                        if(e.hots){  
+                            var sids = Object.keys(e.hots).sort((a,b)=>{return e.hots[a].order - e.hots[b].order});
                             sids.forEach((sid)=>{
-                                this.hotsCount++,
-                                this.hots[sid] = new Hot(sid,t.hots[sid] ,this);
-                                t.hots[sid].infoAttribute || (t.hots[sid].infoAttribute = {})
-                                this.hots[sid].initStyleImg(t.hots[sid].infoAttribute);
-                                window.hotData[sid] = t.hots[sid];
-                            }) 
-                        } 
-                        this.createHotItem(window.hotData, this.hots);
-                        
-                        
-                        
-                        
+                                e.hots[sid].sid = sid
+                                new Hot(e.hots[sid], e.hots[sid].version != 'multi' && "byHot" )
+                            })
+                        }
                         
+                        if(e.overlays){
+                            e.overlays.forEach((info)=>{ 
+                                //if(info.file.includes('m/data/762/edit/20210312_112357584.mp4') )return;
+                                new Hot(info, 'byOverlay')  
+                            })
+                        } 
+                        this.createHotItem( ); 
+                        Hot.startLoad()  
+                         
                         
                         g_index = w.valueFromHash("m");
                         /* if(t.tourAudio){
@@ -18280,9 +18285,7 @@ window.Modernizr = function(n, e, t) {
                                 ev.initEvent("tourAudioEnded",true,true);
                                 window.dispatchEvent(ev);
                             });
-                        }; */
-                        
-                        
+                        }; */ 
                         
                     }
                     /***************************方奕卓 请求data.js数据, 用于初始化热点列表 ****************************/
@@ -18302,13 +18305,13 @@ window.Modernizr = function(n, e, t) {
                         console.log('Data.js is empty');
                         dataJsPromise.resolve();
                     })  */
-                    e.resolve();
+                    r.resolve();
                 }.bind(this)).fail(function() {
                     console.log('没有热点');
                     
-                    e.resolve()
+                    r.resolve()
                 }),
-                e
+                r
             }
 			,
             n.prototype.loadPanos = function() {
@@ -18524,28 +18527,32 @@ window.Modernizr = function(n, e, t) {
                 
                 //add----- 
                 { 
-                    let maxCount = browser.isMobile() ? 4000 : 10000
+                    let maxCount = browser.isMobile() ? 200000 : 400000    
                     
-                    let c = this.panos.list.length * this.colliders.length
-                    if(c < maxCount){
-                        for(let i in this.hots){
-                            this.hots[i].setVisiblePanos(this.hots[i].visibleData);
-                        }
-                    }else{//防止加载时间过长,分批计算
+                    let noVisiHots = this.hotGroup.children.filter(e=>!e.info.visiblePanos && e.info.texType != 'shine') //只看非热点的,否则数据太多
+                    let visiHots = this.hotGroup.children.filter(e=>e.info.visiblePanos)
+                    let c = this.panos.list.length * this.colliders.length * noVisiHots.length
+                    if(c > maxCount){ //防止加载时间过长,分批计算
+                          
                         console.log('hot分批setVisiblePanos')
-                        let hotsId = Object.keys(this.hots)
-                        if(hotsId.length){
-                            let i = 0
+                          
+                        Hot.visiPanosCountSlice = Math.ceil(maxCount / this.colliders.length / noVisiHots.length)
+                        Hot.visiEveryDurSlice = browser.isMobile() ? 25 : 16;
+                        let dur = Math.ceil(this.panos.list.length / Hot.visiPanosCountSlice)  * Hot.visiEveryDurSlice 
+                        console.log(Hot.visiPanosCountSlice, Hot.visiEveryDurSlice, dur, Math.round(dur*noVisiHots.length))
+                        
+                        if(noVisiHots.length){ 
+                            let i = 0 
                             let hotVisiInterval = setInterval(()=>{
-                                this.hots[hotsId[i]].setVisiblePanos(this.hots[hotsId[i]].visibleData);
+                                noVisiHots[i].setVisiblePanos(noVisiHots[i].info.visiblePanos);
                                 i++;
-                                if(i>=hotsId.length){
+                                if(i>=noVisiHots.length){
                                     clearInterval(hotVisiInterval)
                                 }
-                            }, Math.round( browser.isMobile() ? c/200 : c/500)) 
+                            }, dur) 
                         }
-                    } 
-
+                    }
+                    
                     
                 }
                 //---------   
@@ -18696,7 +18703,7 @@ window.Modernizr = function(n, e, t) {
                 var e = $.Deferred();
                 //加载俯视图的标签  注释这个备注就会加载
                 //原先是labels, 改为showLabels,因为之前的somedata写的labels都是true
-                window.MP_PREFETCHED_MODELDATA.showingLabels ? this.showingLabels = true : '';
+                window.DATA.showingLabels ? this.showingLabels = true : '';
                 if (!this.showingLabels)  
                     return e.resolve(); 
                 // var t = this.options.urlBase + "/api/v1/jsonstore/model/labels/" + this.sid;
@@ -19415,7 +19422,7 @@ window.Modernizr = function(n, e, t) {
                 this.skyboxMesh.updateMatrix(),
                 this.skyboxMesh.updateMatrixWorld(),
                 this.marker = null,
-                this.showFloorMarker = !window.MP_PREFETCHED_MODELDATA.hideFloorMarker;
+                this.showFloorMarker = !window.DATA.hideFloorMarker;
                 this.isAligned() && (this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
                     map: w,
                     side: r.DoubleSide,
@@ -20049,7 +20056,7 @@ window.Modernizr = function(n, e, t) {
             t.map.value = d,
             t.opacity.value = 0,
             t.color.value.set(o.reticuleColor),
-            t.showMouseMarker = !window.MP_PREFETCHED_MODELDATA.hideMouseMarker;
+            t.showMouseMarker = !window.DATA.hideMouseMarker;
             r.Mesh.call(this, new r.PlaneBufferGeometry(.4,.4,1,1), new r.RawShaderMaterial({
                 side: r.DoubleSide,
                 depthWrite: !1,
@@ -21179,15 +21186,24 @@ window.Modernizr = function(n, e, t) {
                 this.burnsDir = Math.sign(n.y)
             }
             ,
-            n.prototype.stepWarpPath = function(e, t) {
+            n.prototype.stepWarpPath = function(firstPos, e ) {
                 var i = this.playerControls.cameras[a.PANORAMA];
-                if (!this.warpPathPoints)
+                var n = this.warpPathPoints ? this.warpPathPoints[0] : firstPos
+                if (!n){
                     return i.position.copy(this.warpDestPano.position),
                     !0;
-                var n = this.warpPathPoints[0]
-                  , o = this.warpDestPano.position;
-
-                if (null !== this.nodes && this.cameraHull.length > 1) {
+                }
+                /* if (!this.warpPathPoints)
+                    return i.position.copy(this.warpDestPano.position),
+                    !0;
+                var n = this.warpPathPoints[0] */
+                
+                
+                
+                var o = this.warpDestPano.position;
+                /* console.log(firstPos)
+                console.log(o) */
+                if (null !== this.nodes && this.cameraHull && this.cameraHull.length > 1) {
                     var s = new r.Vector3;
                     e < .5 ? s.copy(this.cameraHull[1]).sub(n).normalize().multiplyScalar(c.warp.softPushDist * e).add(n) : s.copy(this.cameraHull[this.cameraHull.length - 2]).sub(o).normalize().multiplyScalar(c.warp.softPushDist * c.warp.softPushEnd * (1 - e)).add(o),
                     i.position.copy(s)
@@ -21374,7 +21390,12 @@ window.Modernizr = function(n, e, t) {
             n.prototype.warpTravel_BLACK = function(e, t, i, n) {
                 var r = e || 0;
                 void 0 !== t && null !== t || (t = c.warp.teleportTime)
-                
+                //add
+                var done = ()=>{ 
+                    Hot.updateVisibles([this.player.currentPano]) //更新热点显示
+                    this.player.transitionPos({type:"beforeFlytopano", pano:this.player.currentPano, dur:100})//add 
+                   
+                }
                 
                 if(momentTourBlackNewType){
                     player.sceneRenderer.effects.transitionMaskPass.start(player.sceneRenderer)
@@ -21387,14 +21408,18 @@ window.Modernizr = function(n, e, t) {
                         player.sceneRenderer.effects.transitionMaskPass.stop()
                         
                         this.wrapupWarpShadingOnly(n, i);
+                        done()
                     },t)
                      
                 }else{
                     var o = function() {
                         this.wrapupWarpShadingOnly(n, i);
+                        
+                        done()
                     }
                     .bind(this);
-                    p.start(this.stepWarpPath.bind(this), t, o, r, d[c.warp.blendEasing], "stepMotion")
+                    var firstPos = this.player.position.clone()//add
+                    p.start(this.stepWarpPath.bind(this, firstPos), t, o, r, d[c.warp.blendEasing], "stepMotion")
                 }
                 
                 this.warpCommonParameters(t, r, !1, i)
@@ -21890,7 +21915,7 @@ window.Modernizr = function(n, e, t) {
               , D = e("./constants")
               , N = e("./util/common")
               , B = e("./util/cameraLight")
-			  , Hot = e('hot')
+			  //, Hot = e('hot')
               , F = new o(i)
               , V = Object.freeze({
                 FlyToPano: y.getUniqueId(),
@@ -22455,10 +22480,7 @@ window.Modernizr = function(n, e, t) {
                 m.convertScreenPositionToNDC(e, t, this.mouseAtMouseDown),
                 this.mouseCouldBeClickToMove = !0,
                 this.mouseDown = !0;
-                if (this.mouseCouldBeClickToMove) {
-                    //window.DownInterface && new DownInterface().state(this,Hot);
-                    window.Hotpoint && new Hotpoint().state(this,Hot);
-                } 
+                 
             }
             ,
 			
@@ -22554,9 +22576,7 @@ window.Modernizr = function(n, e, t) {
             ,
             n.prototype.start = function(e) {
                  //-------------------
-                window.initOverlay(r)
-                this.model.loadOverlays() 
-                 
+                
                 //-------------------
                 
                 
@@ -22611,7 +22631,7 @@ window.Modernizr = function(n, e, t) {
                 //add
                 this.transitionPos({type:"beforeFlytopano", pano:this.currentPano, dur:0})
                 this.updateHotVisible()
-                Overlay.updateVisibles([this.currentPano])
+                Hot.updateVisibles([this.currentPano])
                 
                 return this.mode = u.PANORAMA,
                 e.floor.enter(this.mode),
@@ -22795,18 +22815,16 @@ window.Modernizr = function(n, e, t) {
                     }
 
                     if(e.cameraChanged){
-                        //this.controlVideosPlay()
+                         
                         
+                       
+                    }
+                    if(e.cameraChanged2){ 
                         for(var i in this.model.hots){
-                            this.model.hots[i].update(this.camera)
-                        } 
-                        if(this.mode == 'panorama')this.overlayGroup.children.forEach(overlay=>{
-                            overlay.update()
-                        })
+                            this.model.hots[i].update(this)
+                        }   
                         
                     }
-                
-
                     this.model.supportsTiles && (this.updateTileDownloader(t),
                     this.updatePanoRenderer(t)),
                     this.updatePreRendering(t),
@@ -23030,9 +23048,9 @@ window.Modernizr = function(n, e, t) {
                     var t = a && this.mouse.equals(this.previousState.mouse) && this.model.allFloorsVisible === this.previousState.allFloorsVisible   /* && this.getLabelScaleFactor() === this.previousState.labelScaleFactor */ && this.model.currentFloor === this.previousState.currentFloor  && null === this.nextPano ;
                     e.cameraChanged = !a;
                     
-                   /*  if(!t){//主要判断相机是否旋转
+                    if(e.cameraChanged){//
                         e.cameraChanged2 = !MathLight.closeTo(this.quaternion, this.previousState.quaternion, 3) || !MathLight.closeTo(this.position, this.previousState.position, 4)  
-                    }else e.cameraChanged2 = false */
+                    }else e.cameraChanged2 = false 
                     
                     
                     e.allFloorsVisible = this.model.allFloorsVisible !== this.previousState.allFloorsVisible,
@@ -23071,10 +23089,44 @@ window.Modernizr = function(n, e, t) {
                   , t = this.isOutsideMode() && this.cameraControls.controls[this.mode].isEngaged()
                   , i = y.getById(V.LookTransition)
                   , n = !(e || t || this.isTouchEvent || i.length && i[0].running);
-                //this.tagManager.intersecttag(this.mouse, n, this.camera) || (this.intersect = this.getMouseIntersect(),//--MP
-                this.intersect = this.getMouseIntersect(); //xzw change
+                
+                {//clear:
+                    if(this.intersectHot) this.intersectHot.hideTitle()
+                    this.intersectHot = null
+                    $("#player").css("cursor", "")
+                }
+                
+                var deal = ()=>{
+                    if(this.intersect && this.intersect.object.visible ){  
+                        if("hotSprite" == this.intersect.object.type){ 
+                            this.intersectHot = this.intersect.object
+                            while(!(this.intersectHot instanceof Hot)){
+                                this.intersectHot = this.intersectHot.parent
+                            } 
+                            $(`.toolRight .spotList ul li[data-spid=${this.intersectHot.sid}]`).addClass("active") 
+                            this.intersectHot.showTitle()  
+                        }  
+                    } 
+                }
+                
+               
+                if(this.model.hotGroup){
+                    
+                    var hots = this.model.hotGroup.children.filter(e=> e.info.actionType.examine || e.info.actionType.openHot )
+                   
+                     
+                    this.intersect = this.getMouseIntersect(null, hots.concat(this.model.colliders));
+                    if(this.intersect){
+                        deal()
+                        this.intersectHot && $("#player").css("cursor", "pointer");
+                        return; 
+                    }
+                }  
+            
+                
+                
+                this.intersect = this.getMouseIntersect(),
                 this.intersect && this.updateClosestPano(this.intersect),
-                // this.intersect && console.log(this.intersect.point),
                 this.closestPano || this.closestPanoInDirection(this.getMouseDirection()) ? (this.reticule.updatePosition(this.position, this.intersect),
                 f.navigation.panoScores && !f.navigation.mouseDirection && this.closestPanoInDirection(this.getDirection())) : this.reticule.hide() 
             }
@@ -23171,51 +23223,22 @@ window.Modernizr = function(n, e, t) {
                 t = t || this.model.floors.reduce(function(e, t) {
                     return t.hidden ? e : e.concat(t.collider.children)
                 }, this.mode === u.PANORAMA ? this.panoMarkers : []);
-				for(var i in this.model.hots){
-					t.push(this.model.hots[i].mesh);
-				}
-                
-                this.overlayGroup && (t = t.concat(this.overlayGroup.children.filter(e=>e.overlayType == "video"))); 
-
+				  
                 
                 var i = new r.Vector3(e.x,e.y,-1).unproject(this.camera);
                 this.raycaster.set(i, this.getMouseDirection(e)); 
                 var n = this.raycaster.intersectObjects(t, true);//add true
-                // n[0] && console.log(n[0].point);
-                if(g_HotStatus=="add"){
-                    var points = this.raycaster.intersectObjects(window.player.model.chunks);
-                    console.log(points[0]);
-                    points.length >= 1? ($('#player').css('cursor', 'cell'),window.hotPointPos = points[0].point): ($('#player').css('cursor', 'not-allowed'), window.hotPointsPos = false)
-                }
-				this.intersectHot && this.intersectHot.hideTitle() 
-                if (0 === n.length){
-					this.intersectHot = null;  //add
-					if(g_HotStatus!="add") $("#player").css("cursor","");
-					return null;  
-				}
-                    
-                var o = n[0];
-				if(o.object.type == "hotSprite"){ //add
-					this.intersectHot =  o.object.belongHot; 
-                    this.intersectHot.showTitle() 
-					this.intersectHot.actionType == 'noAction' || $("#player").css("cursor","pointer");
-					return;
-				}
                 
-				this.intersectHot = null;
-                
-                var intersect = this.hoverOverlay(this.overlayGroup && o && o.object.parent.parent == this.overlayGroup && o.object)
-                
-				if(!intersect && g_HotStatus!="add") $("#player").css("cursor","");	
-                if (o.face) {
-                    o.normal = o.face.normal.applyQuaternion(o.object.quaternion);
-                    var a = this.position.clone().sub(o.point);
-                    a.dot(o.normal) < 0 && o.normal.negate(),
+                     
+                var o = n[0];
+				
+                if(o){
+                    o.face && (o.normal = o.face.normal.applyQuaternion(o.object.quaternion),
+                    this.position.clone().sub(o.point).dot(o.normal) < 0 && o.normal.negate(),
                     this.currentPano ? o.onFloor = o.point.y < this.position.y - .5 * this.currentPano.height : o.onFloor = o.point.y < this.position.y - .5,
-                    o.horizontal = o.normal.y > .8
+                    o.horizontal = .8 < o.normal.y);
+                    return o 
                 }
-                // console.log(o.point);
-                return o
             }
             ,
             n.prototype.updateClosestPano = function(e) {
@@ -23494,7 +23517,7 @@ window.Modernizr = function(n, e, t) {
                      //---------before fly--------------- add
                     this.updateHotVisible(i); //更新热点显示
                     this.transitionPos({type:"beforeFlytopano", pano:i, dur:I})//add 
-                    Overlay.updateVisibles([this.currentPano, i])
+                    Hot.updateVisibles([this.currentPano, i])
                     
                     //地标变化
                     if(this.model.floorLogos){
@@ -23542,7 +23565,7 @@ window.Modernizr = function(n, e, t) {
                             }
                             
                              
-                            Overlay.updateVisibles([this.currentPano])//add
+                            Hot.updateVisibles([this.currentPano])//add
                         }
                     }
                     .bind(this), 0, B, "camFly", V.FlyToPano)
@@ -23553,11 +23576,12 @@ window.Modernizr = function(n, e, t) {
                 
             }
             n.prototype.blackToPano = function(o={}) {//add 瞬间过渡
-                o.panoId = "8bc9156b288d48459e4e0f74d7051ef1"
+                //o.panoId = "8bc9156b288d48459e4e0f74d7051ef1"
+                if(this.flying || this.isWarping() )return;
+                
                 let oldPos = this.position.clone();
                 let oldPano = this.currentPano
                 let pano = o.pano || this.model.panos.index[o.panoId] 
-                 
 
                 this.path.warpDestPano = pano
  
@@ -23565,11 +23589,16 @@ window.Modernizr = function(n, e, t) {
                     this.waitingToWarp = !1,
                     this.blackToPano(o)
                 }
+                
                 if (this.checkAndWaitForPanoLoad(pano, "high", "low", this.basePanoSize, retry))
                     return void (this.waitingToWarp = !0)
+                
+                this.emit("pano.chosen", oldPano, pano)
                  
-                this.emit("pano.chosen", oldPano, pano),
-
+                /*  if(window.momentTourBlackNewType == 1) { */
+                    
+                
+                this.flying = true
  
                 this.path.warpDestHeroLoc = {  
                     panoId : o.panoId,
@@ -23584,6 +23613,10 @@ window.Modernizr = function(n, e, t) {
                     pano.enter() 
                     this.currentPano = pano
                     this.emit("flying.ended", pano.position, oldPos, pano, oldPano) 
+                    this.flying = false
+                    
+                    
+                    
                 } )
                 
             }
@@ -23625,32 +23658,18 @@ window.Modernizr = function(n, e, t) {
                     return s
                 }
                 var sid = o.pano != void 0 ? o.pano.id : "outside";
-                this.overlayGroup.children.forEach(overlay=>{ 
-                    var panoData = overlay.transformAtPanos[sid]
-                    var useCustom = !panoData
-                    //if(overlay.usingTransformData || !useCustom){
-                        var pos = useCustom ? overlay.posCustom : panoData.pos;
-                        var qua = useCustom ? overlay.quaCustom : panoData.qua;
-                        var scale = useCustom ? overlay.getScaleBySize(overlay.widthCustom, overlay.heightCustom) :  
-                                    overlay.getScaleBySize(panoData.width , panoData.height)
-                            scale = new THREE.Vector3(scale.x, scale.y, overlay.scale.z)        
-                        begin(overlay, pos, qua, scale  )
-                    //}
-                    overlay.usingTransformData = !useCustom
-                })
+                 
             
                 for(let i in this.model.hots){//是否判断visible?
                     var hot = this.model.hots[i];
-                    var panoData = hot.transformAtPanos[sid];
+                    var panoData = hot.info.transformAtPanos[sid];
                     var useCustom = !panoData
                     
                     //if(hot.usingTransformData || !useCustom){
-                        var pos = useCustom ? hot.position : panoData.pos;
-                        var qua = hot.isSprite ? null : (useCustom  ? hot.quaternion : panoData.qua);
-                        begin(hot.mesh, pos, qua  )
+                        var pos = useCustom ? hot.info.position : panoData.pos;
+                        begin(hot, pos/* , qua */  )
                     //}
-                    hot.usingTransformData = !useCustom;
-                }
+                 }
             
             }
             
@@ -24121,10 +24140,10 @@ window.Modernizr = function(n, e, t) {
                     )
                     
                     if(this.mode == u.PANORAMA){ 
-                        Overlay.updateVisibles([this.currentPano])
+                        Hot.updateVisibles([this.currentPano])
                     }else{ 
-                        Overlay.updateVisibles(true)
-                        this.overlayGroup.children.forEach(overlay=>{
+                        Hot.updateVisibles(true)
+                        this.model.hotGroup.children.forEach(overlay=>{
                             if(overlay.animateInfo){ 
                                 GifTexDeal.start(overlay.animation)
                             }
@@ -26803,7 +26822,7 @@ window.Modernizr = function(n, e, t) {
             hideFloorDuration: 300,
             hideFloorDelay: 0,
             reticuleOpacityTransitionTime: 250,
-            reticuleColor: window.MP_PREFETCHED_MODELDATA.mouseMarkerColor || s.newBlue,    // 方奕卓 配置鼠标标志颜色
+            reticuleColor: window.DATA.mouseMarkerColor || s.newBlue,    // 方奕卓 配置鼠标标志颜色
             markerOpacityTransitionTime: 500,
             guiAnimationSpeed: 250,
             highlightAnimationDuration: 500,
@@ -26959,7 +26978,7 @@ window.Modernizr = function(n, e, t) {
                 }
             },
             path: {
-                color: window.MP_PREFETCHED_MODELDATA.floorMarkerColor || s.newBlue,   // 方奕卓 配置导览标志颜色
+                color: window.DATA.floorMarkerColor || s.newBlue,   // 方奕卓 配置导览标志颜色
                 colorUp: s._desat(s.newBlue, .5),
                 colorDown: s._darken(s.newBlue, .35),
                 opacity: .5,
@@ -27175,7 +27194,7 @@ window.Modernizr = function(n, e, t) {
         p.path.meshFree && (p.path.typ = l.WALK),
         p.zoom.max = p.zoom.overridemax || p.zoom.max,
         p.zoom.min = p.zoom.overridemin || p.zoom.min,
-        t.exports = p
+        window._settings  = t.exports = p
     }
     , {
         "./constants": 8,
@@ -30153,7 +30172,7 @@ window.Modernizr = function(n, e, t) {
                 },
                 get: function(e) {
                     //return this.urlContainer.get(e)
-					return window.MP_PREFETCHED_MODELDATA.files.templates[0].replace("{{filename}}", e)
+					return window.DATA.files.templates[0].replace("{{filename}}", e)
                 }
             },
             t.exports = a
@@ -30700,14 +30719,14 @@ window.Modernizr = function(n, e, t) {
               , u = new c(i);
             window.URL = window.URL || window.webkitURL,
             window.MP_REQUEST_CACHE = window.MP_REQUEST_CACHE || {},
-            window.MP_PREFETCHED_MODELDATA = window.MP_PREFETCHED_MODELDATA || {} 
+            window.DATA = window.DATA || {} 
             /* setTimeout(function() {//MP-- xzw delete
                 window.MP_REQUEST_CACHE = null,
-                window.MP_PREFETCHED_MODELDATA = {}
+                window.DATA = {}
             }, 6e4),
             window.onpageshow = function(e) {
                 e.persisted && (window.MP_REQUEST_CACHE = null,
-                window.MP_PREFETCHED_MODELDATA = {})
+                window.DATA = {})
             } */
             ,
             t.exports = {
@@ -30720,7 +30739,7 @@ window.Modernizr = function(n, e, t) {
                             return n
                     }
                     var o;
-                    return o = t.prefetchFrom && window.MP_PREFETCHED_MODELDATA[t.prefetchFrom] ? $.when(window.MP_PREFETCHED_MODELDATA[t.prefetchFrom]) : r("GET", e, t),
+                    return o = t.prefetchFrom && window.DATA[t.prefetchFrom] ? $.when(window.DATA[t.prefetchFrom]) : r("GET", e, t),
                     i && l(e, t, o),
                     o
                 },
@@ -30990,8 +31009,8 @@ window.Modernizr = function(n, e, t) {
                     return i;
                 if (e.heroImage)
                     i = o(e, t);
-                else if (window.MP_PREFETCHED_MODELDATA.camera_start) {
-                    var n = window.MP_PREFETCHED_MODELDATA.camera_start;
+                else if (window.DATA.camera_start) {
+                    var n = window.DATA.camera_start;
                     try {
                         Object.keys(n).length > 0 && !l.isEmptyQuaternion(n.camera.quaternion) && (i.mode = h.convertWorkshopModeInt(n.mode),
                         i.position = n.camera.position,
@@ -31104,6 +31123,17 @@ window.Modernizr = function(n, e, t) {
             getVFOVFromHFOV: a
         }
         window.MathLight = t.exports
+        
+        
+        MathLight.closeTo = function(e1,e2, precision){//xzw add   判断e1,e2是否接近
+            var prec = Math.pow(10,  - (precision || 4));
+            var s1 = Math.abs(e1.x - e2.x) < prec && Math.abs(e1.y - e2.y) < prec && Math.abs(e1.z - e2.z) < prec
+            if(e1.w){
+                return s1 && Math.abs(e1.w - e2.w) < prec
+            }else return s1
+        }
+                
+        
     }
     , {
         "./MathLight": 176
@@ -31236,10 +31266,10 @@ window.Modernizr = function(n, e, t) {
             }
             ,
             
-            getVisiblePano : function(positions = [], options={}){//add
+            getVisiblePano : function(positions = [], panos, options={}){//add
                 var visiblePanos = []; 
                
-                var panos = options.panos ||  player.model.panos.list;
+               
                 options.posAtPanos = options.posAtPanos  || {}//在不同漫游点的positions
                 panos.forEach((pano)=>{
                     if(!pano.isAligned())return;
@@ -31254,7 +31284,7 @@ window.Modernizr = function(n, e, t) {
                         var o = ray.intersectObjects(options.model || player.model.colliders, true);
                     
                         if (!o || !o.length){ //只要有一点可见,就算整体可见
-                            visiblePanos.push(pano );
+                            visiblePanos.push(pano.id);
                             break;
                         }
                     }    
@@ -31777,8 +31807,16 @@ window.Modernizr = function(n, e, t) {
                     trueSide : pos.z<1, //trueSide为false时,即使在屏幕范围内可见,也是反方向的另一个不可以被渲染的点   参见Tag.update
                     inSight : inSight	//在屏幕范围内可见
                 };
+            },
+            getDirByLonLat: function(lon, lat) {
+                var dir = new THREE.Vector3();
+                var phi = THREE.Math.degToRad(90 - lat);
+                var theta = THREE.Math.degToRad(lon);
+                dir.x = Math.sin(phi) * Math.cos(theta);
+                dir.y = Math.cos(phi);
+                dir.z = Math.sin(phi) * Math.sin(theta);
+                return dir.negate();
             } 
-         
             
         }
         window.math = t.exports
@@ -32002,7 +32040,7 @@ window.Modernizr = function(n, e, t) {
                     }
                 }(),
                 modelDataPromisesTiles: function(e) {
-                    var vision_version = e.vision_version || window.MP_PREFETCHED_MODELDATA.vision_version
+                    var vision_version = e.vision_version || window.DATA.vision_version
                     if (vision_version)
                         try {
                             return l.visionVersionToInt(vision_version) >= l.visionVersionToInt(r.visionTilingStartVersion)
@@ -58720,7 +58758,7 @@ window.Modernizr = function(n, e, t) {
         i.THREE = n) : this.THREE = n
         
         window.THREE = n
-        
+        getObjLoader()
     }
     , {}]
 }, {}, [116]);
@@ -58899,6 +58937,20 @@ function initTransitionPass(THREE){
    
     导览缩放的几处: 1 搜索smoothZoomFovTo  2 flightStepWalk里
    
+    {
+        //到导览中某个点位(假设点位不重复)
    
-
- */
+        var id = 73
+        var p = player.model.heroLocations.find(e=>e.heroLocations && e.heroLocations.find(e=>e.panoId == id))
+        var i = player.model.heroLocations.indexOf(p)
+        var p1 = p.heroLocations.find(e=>e.panoId == id)
+        var j = p.heroLocations.indexOf(p1)
+        player.director.goToHighlight([i,j])
+    }
+    
+    
+    
+    
+    
+ */
+ 

+ 130 - 60
js/manage.js

@@ -116,7 +116,9 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     var play = function(){
         //if(window.tourAudioSta) return;
          
-        this.switchBgmState(true)
+        if(this.bgmShouldPlay){
+            this.switchBgmState(true)
+        }
         
         document.removeEventListener("touchstart",play);
         document.removeEventListener("click",play);
@@ -156,6 +158,7 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
 }   
 Manage.prototype.switchBgmState = function(state){
     if(!g_bgAudio || !g_bgAudio.src) return;
+    this.bgmShouldPlay = state
     
     var played = function(){
         console.log('begin play bgm');
@@ -343,6 +346,15 @@ Manage.prototype.dealURL = function(src, type){
     
 }
 
+
+Manage.prototype.removeSrcPostMark = function(url){//去除texture.load时自动加上的'?'
+    var index = url.indexOf('?')
+    if(index>-1){
+        return url.slice(0, index)
+    }else return url 
+}
+
+
 Manage.prototype.showInfo = function (o) { // ({result:true, title:"发布成功"}); 
 	 
 	var box = $(".resultBox");
@@ -470,107 +482,120 @@ function hotMatcher(data={}){
 var GifTexDeal = {
     
     animateObjects : [], 
-     
+    animateTexs : [] ,
     addAnimation : function(texture, owner, info, id){
+        /* if(this.animateObjects.find(e=> 
+            e.texture == texture && !ifSame(info, e.info) 
+        )) */ 
+        
+        var animation
+        var tex = this.animateTexs.find(e=>e.texture == texture)
+        if(tex){
+            animation = tex
+        }else{
+            animation = {texture,info }
+            this.animateTexs.push(animation)
+            this.setRepeart(animation)
+        }
+        
         var object = {
-            texture,
-            owner,
-            info,
-            id 
+            animation, //默认相同的texture对应的info是一样的, 对应一个animation
+            owner,        
         }
-        this.setRepeart(object)
+         
         this.animateObjects.push(object)
         return object
     },
+    
+    
     remove : function(object){
         var index = this.animateObjects.indexOf(object) 
         if(index>-1){
-            this.stop(object)
-            object.texture.repeat.set(1,1) 
+            
+            if(!this.animateObjects.find(e=>e.animation == object.animation)){
+                let i = this.animateTexs.indexOf(object.animation)
+                this.animateTexs.splice(i, 1)
+                object.animation.texture.repeat.set(1,1) 
+            }
+            
+            this.stop(object) 
             this.animateObjects.splice(index, 1)
         }
     },
-    setRepeart : function(object){
-        object.texture.repeat.set(1/object.info.cellXcount, 1/object.info.cellYcount)
+    setRepeart : function(animation){
+        animation.texture.repeat.set(1/animation.info.cellXcount, 1/animation.info.cellYcount)
     },
     start: function(object){ 
-        /* var b = this
-          , offset = this.cursor.material.map.offset
-          , f = function(a) {
-            return Math.floor(17 * a) / 17   //对应17个精灵图片段
-        };
-        b.canStartAnimation = !1,
-        this.cursorAnimate = new TWEEN.Tween(offset).to({
-            x: 1    //100%
-        }, 1e3).onStart(function() {
-            b.canStartAnimation = !1
-        }).onStop(function() {
-            b.canStartAnimation = !0,
-            this.x = 0,
-            offset.x = 0
-        }).onUpdate(function() {}).onComplete(function() {
-            done(),
-            offset.x = 0,
-            setTimeout(function() {
-                b.canStartAnimation = !0
-            }, 1500)
-        }),
-        this.cursorAnimate.easing(f),
-        this.cursorAnimate.start()
- */ 
-          
-        if(!object || object.started)return;
-        var count = object.info.cellXcount * object.info.cellYcount - (object.info.voidCount || 0)
+         
+        if(!object || object.started )return;
+        object.started = true
+        if(object.animation.started)return;
+        object.animation.started = true
+        
+        var info = object.animation.info
+        var count = info.cellXcount * info.cellYcount - (info.voidCount || 0)
      
-        if(count <= 1 )return;
+        if(count <= 1)return;
         
         transitions.start( (progress)=>{
             var index = Math.floor(count * progress);
-            var indexX =  index % object.info.cellXcount
-            var indexY =  object.info.cellYcount - Math.floor(index / object.info.cellXcount ) - 1;  //uv.offset.y是从下到上的
-            object.texture.offset.x = indexX / object.info.cellXcount;
-            object.texture.offset.y = indexY / object.info.cellYcount;
+            var indexX =  index % info.cellXcount
+            var indexY =  info.cellYcount - Math.floor(index /info.cellXcount ) - 1;  //uv.offset.y是从下到上的
+            object.animation.texture.offset.x = indexX / info.cellXcount;
+            object.animation.texture.offset.y = indexY / info.cellYcount;
             
             //console.log(object.id + " : "+ object.texture.offset.toArray())
-        } , object.info.duration, ()=>{//done
+        } , info.duration * (-1), null,/* ()=>{//done  (-1):循环
             object.started = false
             object.texture.offset.x = 0;
             object.texture.offset.y = 0;
             this.start(object)
-        }, 0 ,null, object.id, "gif_"+object.id); 
+        }, */ 0 ,null, object.id, "gif_"+object.animation.texture.id); 
 
-        object.started = true
+        
 
     },
     
-    startAnimations : function(o={}){
-        this.animateObjects.forEach(e=>{this.start(e)})
-
-    }
-    ,
+    
     stop: function(object){ 
         if(!object || !object.started)return;
-        transitions.cancelById("gif_"+object.id);
-        object.texture.offset.set(0,0)    
         object.started = false
+        //只有该object对应的texture对应的所有object都停止了,才能真的停止动画:
+        if(this.animateObjects.find(e=>e.animation == object.animation && e.started)) return;
+        
+         
+        transitions.cancelById("gif_"+object.animation.texture.id);
+        object.animation.texture.offset.set(0,0)
+        object.animation.started = false     
+        
     }
 }
 
-var CloneObject = function(copyObj, result, isSimpleCopy) {
+var CloneObject = function(copyObj, result, isSimpleCopy, extraReplace) {
     //isSimpleCopy只复制最外层
     //复制json		result的可能:普通数字或字符串、普通数组、复杂对象
-    if(!copyObj)return null
+    if(!copyObj)return copyObj //0 null undefined ''
     result = result || {};
     if (copyObj instanceof Array) {
-        if (copyObj[0]instanceof Object) {
+        /*  if (copyObj[0]instanceof Object) {
             //不支持含有 [[Object]] 这样二级数组里面还是复杂数据的,普通和复杂的数据混合可能也不支持
             console.error("不支持含有 [[Object]] 这样二级数组里面还是复杂数据的...")
+        }  
+        
+        return copyObj.slice(0);*/ //如果是数组,直接复制返回(排除数组内是object 
+        return copyObj.map(e=>{
+            if(e instanceof Object){
+                return CloneObject(e)
+            }else return e 
+        })
+       
+    }else{
+        if(copyObj.clone instanceof Function ){ //解决一部分
+            return copyObj.clone()
         }
-        return copyObj.slice(0);
-        //如果是数组,直接复制返回(排除数组内是object
     }
     for (var key in copyObj) {
-        if (copyObj[key]instanceof Object && !isSimpleCopy)
+        if (copyObj[key] instanceof Object && !isSimpleCopy)
             result[key] = CloneObject(copyObj[key]);
         else
             result[key] = copyObj[key];
@@ -579,7 +604,52 @@ var CloneObject = function(copyObj, result, isSimpleCopy) {
     return result;
 }
 ;
-
+var ifSame = function(object1, object2){
+    if(object1 == object2  )return true // 0 != undefined  , 0 == ''
+    else if(!object1 || !object2) return false
+    else if(object1.constructor != object2.constructor){
+        return false
+    }else if(object1 instanceof Array ) {
+        if(object1.length != object2.length)return false;
+        var _object2 = object2.slice(0);
+        
+        for(let i=0;i<object1.length;i++){ 
+            var u = _object2.find(e=>ifSame(object1[i], e));
+            if(u == void 0 && !_object2.includes(u) && !object1.includes(u))return false;
+            else{
+                let index = _object2.indexOf(u);
+                _object2.splice(index,1);
+            }
+        }
+        
+        return true
+    }else if(object1.equals instanceof Function ){//复杂数据仅支持这种,其他的可能卡住?
+        
+        return object1.equals(object2)
+          
+    }else if(typeof object1 == 'number' ||  typeof object1 == 'string'){
+        if(isNaN(object1) && isNaN(object2))return true
+        else return object1 == object2
+        
+    }else if(typeof object1 == "object"){
+        var keys1 = Object.keys(object1)
+        var keys2 = Object.keys(object2)
+        if(!ifSame(keys1,keys2))return false;
+        
+        for(let i in object1){
+            var same = ifSame(object1[i], object2[i]);
+            if(!same)return false
+        }
+        return true
+    }else{
+        console.log('isSame出现例外')
+    }
+    
+    
+    
+    
+    
+}
 
 
 

+ 21 - 6
js/myShow-edit.js

@@ -59,12 +59,27 @@ var g_weixinObj = {
 	"desc": "四维时代提供技术支持",
 }
 
-var settings = {
-    isEdit:true,
-    overlay:{
-		width:1, height:0.5, depth:0.02
-	} 
-    
+const settings = { //不可修改
+    isEdit:true, 
+    //defaultOverlaySize : [1,0.6],//绝对长宽高
+    hotClickEvent:{
+        video:{
+            playAndPause:true,
+            examine:false,
+            openHot:false 
+        },
+        photo:{
+            examine:false,
+            openHot:false 
+        },
+        shine:{
+            examine:true,
+            openHot:true  
+        }
+    }
+   /*  hot:{
+        width:0.1, height:0.1
+    } */
     
     
 }

+ 15 - 3
js/myShow.js

@@ -60,9 +60,21 @@ var g_weixinObj = {
 }
 
 var settings = {
-    overlay:{
-		width:1, height:0.5, depth:0.02
-	} ,
+    hotClickEvent:{
+        video:{
+            playAndPause:true,
+            examine:false,
+            openHot:false 
+        },
+        photo:{
+            examine:false,
+            openHot:false 
+        },
+        shine:{
+            examine:true,
+            openHot:true  
+        }
+    },
     //dontExamHot:true  
     transparentBg: false,
     bgImg:  null 

+ 15 - 13
js/overlay.js

@@ -6,8 +6,8 @@ MathLight.DEGREES_PER_RADIAN = 180 / Math.PI;
  
 
 var initOverlay = function(THREE) {
-    var _planeGeometry = new THREE.PlaneGeometry(settings.overlay.width,settings.overlay.height,1,1)
-    var _boxGeometry = new THREE.BoxBufferGeometry(settings.overlay.width,settings.overlay.height,settings.overlay.depth)
+    var _planeGeometry = new THREE.PlaneGeometry(settings.defaultOverlaySize[0],settings.defaultOverlaySize[1],1,1)
+    var _boxGeometry = new THREE.BoxBufferGeometry(settings.defaultOverlaySize[0],settings.defaultOverlaySize[1],settings.overlay.depth)
     //ie的mesh 加了polygonOffset也是会重叠。所以去掉前面的face:  (但是突然ie又播放不了videoTexture)
     var newIndex = [..._boxGeometry.index.array]
     newIndex.splice(4 * 6, 6)
@@ -113,9 +113,9 @@ var initOverlay = function(THREE) {
             plane.material.color = new THREE.Color(1,1,1)
         }
         if (info.width == void 0)
-            info.width = settings.overlay.width;
+            info.width = settings.defaultOverlaySize[0];
         if (info.height == void 0)
-            info.height = settings.overlay.height;
+            info.height = settings.defaultOverlaySize[1];
         this.setFromInfo(info)
         this.fileSrc = info.file
 
@@ -246,14 +246,14 @@ var initOverlay = function(THREE) {
 
     Overlay.prototype.getSizeByScale = function() {
         return {
-            width: settings.overlay.width * this.scale.x,
-            height: settings.overlay.height * this.scale.y
+            width: settings.defaultOverlaySize[0] * this.scale.x,
+            height: settings.defaultOverlaySize[1] * this.scale.y
         }
     }
     Overlay.prototype.getScaleBySize = function(width, height) {
         return {
-            x: width / settings.overlay.width,
-            y: height / settings.overlay.height,
+            x: width / settings.defaultOverlaySize[0],
+            y: height / settings.defaultOverlaySize[1],
         }
     }
 
@@ -282,7 +282,9 @@ var initOverlay = function(THREE) {
         }
 
     }
+    
 
+    //如果被遮挡,即使设置了可见也是看不见的。也许可以开启一个 模型遮挡选项,关闭后会根据检测到的可见性完全显示,防止边角被遮盖。
     Overlay.prototype.getVisiblePanos = function() {//在不同点还不一样
         var depth = this.scale.z * settings.overlay.depth;
         var getPos = function(position, quaternion, width, height){//每个overlay位置对应5个坐标,plane中心和四个角的位置
@@ -387,14 +389,14 @@ var initOverlay = function(THREE) {
         if(player.mode == 'panorama'){
             var position = this.plane.getWorldPosition()
             var pos2d = math.getPos2d(position, player.camera, $("#player")[0])
-            if(pos2d.trueSide && pos2d.inSight){
+            if(pos2d.trueSide && pos2d.inSight){  //或许可以改为非trueSide 就直接不可见 
                 return true
             }else{ 
                 var cornerPoint = [
-                    new THREE.Vector3(-settings.overlay.width/2, settings.overlay.height/2, 0),
-                    new THREE.Vector3(settings.overlay.width/2, settings.overlay.height/2, 0),
-                    new THREE.Vector3(settings.overlay.width/2, -settings.overlay.height/2, 0),
-                    new THREE.Vector3(-settings.overlay.width/2, -settings.overlay.height/2, 0),
+                    new THREE.Vector3(-settings.defaultOverlaySize[0]/2, settings.defaultOverlaySize[1]/2, 0),
+                    new THREE.Vector3(settings.defaultOverlaySize[0]/2, settings.defaultOverlaySize[1]/2, 0),
+                    new THREE.Vector3(settings.defaultOverlaySize[0]/2, -settings.defaultOverlaySize[1]/2, 0),
+                    new THREE.Vector3(-settings.defaultOverlaySize[0]/2, -settings.defaultOverlaySize[1]/2, 0),
                 ];            
                 for(var i=0;i<4;i++){//只要有一点可见就算看见
                     cornerPoint[i].applyMatrix4(this.plane.matrixWorld);