xzw 2 년 전
부모
커밋
fec2e1d554
10개의 변경된 파일5425개의 추가작업 그리고 1077개의 파일을 삭제
  1. 192 37
      css/lzb.css
  2. 257 5
      css/main.css
  3. 227 100
      edit.html
  4. 233 99
      eforclient.html
  5. 355 158
      js/Hot.js
  6. 119 14
      js/TransformControls.js
  7. 780 133
      js/edit.js
  8. 376 121
      js/main_2020_edit.js
  9. 2077 349
      js/main_2020_show.js
  10. 809 61
      js/manage.js

+ 192 - 37
css/lzb.css

@@ -207,7 +207,7 @@ ul li {
     /* overflow-x: hidden; */
 }
 
-.toolRight div.content>ul>li {
+.toolRight div.content>ul>li:not(.group-widget) {
     border-top: 1px solid #5d5d5d;
     border-bottom: 1px solid #000000;
     padding: 10px;
@@ -221,9 +221,7 @@ ul li {
     border-top: none;
 }
 
-.toolRight div.content>ul>li>*:first-child {
-    margin: 3px 0 13px 0;
-}
+ 
 
 .itemMargin {
     margin: 10px auto !important;
@@ -258,12 +256,18 @@ ul.MenuOptions li {
     transition: color 0.1s;
     width: 100%;
     transition: background-color 0.3s;
+    border-right: 1px solid #303030;
+}
+ul.MenuOptions li:last-child{
+    border-right: none;
 }
-
 ul.MenuOptions li.chosen {
     background-color: #00a2d4;
 }
 
+
+
+
 .toolRight div.content {
     border-color: #737373;
     width: calc(100% + 18px);
@@ -294,7 +298,7 @@ ul.MenuOptions li.chosen {
 }
 
 .toolRight .editText {
-    min-height: 200px !important;
+    min-height: 150px;
     line-height: 130% !important;
     padding: 10px;
     text-align: justify;
@@ -348,7 +352,7 @@ ul.MenuOptions li.chosen {
     left: 100%;
 }
 
-.toolRight div.content>ul>li {
+.toolRight div.content>ul>li:not(.group-widget) {
     border-top: 1px solid #636363;
     border-bottom: 1px solid #000000;
     padding: 15px 10px;
@@ -358,8 +362,8 @@ ul.MenuOptions li.chosen {
     border-top: none;
 }
 
-.toolRight div.content ul>li>* {
-    margin: 6px 0 12px 0;
+.toolRight div.content ul>li:not(.group-widget)>*,   .group-widget .inner>.widget-wrapper>*{
+    margin: 7px 0 12px 0;
     line-height: 32px;
     height: 100%;
 }
@@ -372,6 +376,10 @@ ul.MenuOptions li.chosen {
     border: none;
     cursor: pointer;
 }
+.buttons.tail button, .buttons.bigger button{
+    height:34px;
+    font-size: 14px;
+}
 
 .toolRight .addSpot button, .toolRight .addTour button {
     /* position: fixed;
@@ -747,7 +755,7 @@ ul.MenuOptions li.chosen {
 }
 
 .toolRight .mediaUpload .itemTitle {
-    height: 32px;
+    height: 32px !important; 
 }
 
 .toolRight .itemTitle::before {
@@ -755,21 +763,35 @@ ul.MenuOptions li.chosen {
     right: 0px;
     top: 2px;
     content: ""attr(data-size)"";
-    color: #7b7b7b;
+    color: #7b7b7b; font-size: 14px;
 }
 
 .toolRight .itemTitle {
-    font-size: 16px;
+    font-size: 17px;
     display: flex;
     line-height: 16px;
     position: relative;
+    
 }
-.toolRight li[name="content"]>ul>li .itemTitle{
-    font-size: 12px;
+
+.toolRight .itemTitle:not(:first-child) {
+    margin: 13px 0 2px 0 !important;
 }
 
-.toolRight li[name="content"]>ul>li {
-    padding-bottom:15px;
+
+.toolRight .secondFontSize{
+    font-size: 15px;
+    line-height: 14px;
+}
+.toolRight .thirdFontSize{
+    font-size: 13px;
+    line-height: 12px;
+}
+.toolRight li[name="content"] .widget-wrapper>ul>li {
+    background: #212121;
+    padding: 8px 5px 8px 10px;
+    margin: 18px 0;
+    border-radius: 2px;
 }
 
 .toolRight .mediaUpload .itemTitle span {
@@ -794,7 +816,7 @@ ul.MenuOptions li.chosen {
 
 .innerBtn {
     border-radius: 17px;
-    height: 34px;
+    height: 30px;
     line-height: 34px;
     background-color: rgba(0, 0, 0, 0.3);
     border-color: rgba(0, 0, 0, 0.3);
@@ -968,8 +990,8 @@ ul.MenuOptions li.chosen {
     bottom: -2px;
 }
 
-.toolRight .screen .shotImg {
-    height: 108px;
+.toolRight  .shotImg {
+    height: 108px !important;
     border-radius: 5px;
     cursor: pointer;
     line-height: 105px;
@@ -1071,6 +1093,11 @@ ul.MenuOptions li.chosen {
     background-size: 107%;
     background-position: -5px center;
 }
+.toolRight .roomLabels  [name="list"] .icon{
+    background-image: url(../images/hotlist.png);
+    background-size: 45%;
+}
+
 
  
 .toolRight .secondary .content {
@@ -1087,6 +1114,7 @@ ul.MenuOptions li.chosen {
 .buttons {
     display: flex;
     justify-content: center;
+    margin: 5px 0;
 }
 
 .toolRight .secondary .itemTitle.head a.close {
@@ -1164,7 +1192,7 @@ ul.MenuOptions li.chosen {
 .toolRight .secondary .buttons.tail {
     height: 65px;
     width: 100%;
-    padding: 15px 10px;
+    padding: 9px 10px;
     border-top: 1px solid #5d5d5d !important;
 }
 
@@ -1173,9 +1201,13 @@ ul.MenuOptions li.chosen {
     color: #00b4ed;
     background-color: transparent;
 }
-
+.buttons button.delete {
+    border: 1px solid #b93636 !important;
+    color: #b93636;
+    background-color: transparent;
+}
 .buttons button:nth-child(2) {
-    /* margin-left: 10px; */
+    margin-left: 10px;
 }
 
 
@@ -1215,6 +1247,10 @@ ul.MenuOptions li.chosen {
 }
 .toolRight  .itemTitle button, .toolRight .remark  button{
     padding:0 20px;
+    height: 28px;
+    margin-top: -3px;
+    font-size:14px;
+    
 } 
 
 .toolRight .upload input {
@@ -1260,44 +1296,53 @@ ul.MenuOptions li.chosen {
 .edit-fun-images>div {
     vertical-align: top;
     float: left;
-    margin: 5px;
+    margin:0 6px 6px 0;
     position: relative;
 }
 
 .edit-fun-images a {
-    width: 96px;
-    height: 96px;
-    border: 1px dashed #fff;
+    width: 92px;
+    height: 92px;
+    border: 1px solid #353535;
     color: #fff;
     text-align: center;
     position: relative;
     display: block;
     line-height: 90px;
-    font-size: 30px;
     font-weight: 300;
     box-sizing: content-box;
 }
 
-.edit-fun-images a.result>span::after {
+/* .edit-fun-images a.result>span::after {
     content: '+'
-}
+} */
 
 .edit-fun-images a.result>span {
     position: absolute;
-    right: -4px;
-    top: -4px;
+    right: 0px;
+    top: 0px;
     width: 20px;
     height: 20px;
     line-height: 20px;
-    transform: rotateZ(45deg);
-    background: #c77a7a;
-    border-radius: 50%;
+    /* transform: rotateZ(45deg); */
+    background-color: #000000c2;
+    /* border-radius: 50%; */
     z-index:1000;
+    background-image: url("../images/phone_step_01.png");
+    background-size: 52%;
+    background-repeat: no-repeat;
+    background-position: center;
+}
+.edit-fun-images a.result>span:hover{
+    background-color: #f13737c2;
 }
-
 .edit-fun-images a.result>img {
     max-width: 100%;
     max-height: 100%;
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    transform: translate(-50%, -50%);
 }
 
 .edit-fun-images a .play-video{
@@ -1328,7 +1373,36 @@ ul.MenuOptions li.chosen {
     z-index: 1;
     cursor: pointer;
 }
+.edit-fun-images .mediaItem .descBtn {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    color: #e0e0e0;
+    height: 30px;
+    background: #3a3a3ab0;
+    display:none;
+    z-index: 100;
+    line-height: 30px;
+}
+.edit-fun-images .mediaItem .descBtn:hover{
+    color: #fff;
+}  
+.edit-fun-images .mediaItem .descBtn.hasDesc{
+    background:#000000e0;
+}
+
+.edit-fun-images .mediaItem .descBtn.chosen{
+    border: 1px dashed #fff;
+}
+   
 
+.edit-fun-images.hasDescBtn .descBtn{
+    display:block;
+    cursor:pointer;
+    
+}    
+  
 /* loading */
 
 .edit-loading {
@@ -1341,7 +1415,7 @@ ul.MenuOptions li.chosen {
     background: rgba(0, 0, 0, 0.6);
     top: 0;
     left: 0;
-    z-index: 101;
+    z-index: 10001;
 }
 
 .square-move {
@@ -2030,4 +2104,85 @@ ul.MenuOptions li.chosen {
     /* background: #4c4c4c; */
     margin: 17px 0px;
     border-bottom: 1px dotted #404040;
-}
+}
+
+
+
+/* from 4dmodel: */
+ .layout-widget{
+	display:-webkit-box;
+	display:-webkit-flex;
+	display:-ms-flexbox;
+	display:flex;
+	-webkit-box-orient:vertical;
+	-webkit-box-direction:normal;
+	-webkit-flex-direction:column;
+	-ms-flex-direction:column;
+	flex-direction:column;
+	height:inherit;
+}
+.widget-wrapper>.header{
+	background: #616161;
+	position:relative;
+	height:32px;
+	border-top: 1px solid #18232e;
+	border-bottom: 1px solid #18232e;
+	padding-left: 10px;
+	font-size:12px;
+	line-height:29px;
+	color: #ffffff;
+	opacity:1;
+	cursor:pointer;
+	transition: color 0.1s;
+	text-align:left;
+}
+
+.widget-wrapper>.header:before{
+	content: "\f0d7";
+	display: block;
+    position: absolute;
+    left: 0;
+    right: 0;
+    width: 20px;
+    height: 29px;
+    font-family: FontAwesome;
+    text-align: center;
+    line-height: 29px;
+}
+.widget-wrapper>.header.closed:before{
+	content: "\f0da";
+}
+
+
+.inner>.widget-wrapper{
+	position:relative;
+	margin: 13px 0 19px 0;
+}
+
+
+ .group-widget > .widget-wrapper > .header .pic{
+	position:absolute;
+	top:6px;
+}
+ .group-widget > .widget-wrapper > .header a{
+    margin-left: 12px;
+    font-size: 14px;
+    letter-spacing: 3px;
+    /* font-weight: 700; */
+     
+}
+.group-widget > .widget-wrapper > .inner {
+    padding: 0px 13px;
+    overflow: visible;
+    max-height: 1000px;
+    transition:all 0.2s;	/* 透明度和高度 */
+}
+
+[name="content"] .group-widget > .widget-wrapper > .inner {
+    max-height: 2800px;
+}
+
+.group-widget > .widget-wrapper > .inner.closed{
+	max-height:0;
+	overflow: hidden;
+}

+ 257 - 5
css/main.css

@@ -7100,7 +7100,7 @@ a.hasHover.tag-link:hover {
 	width: 100%;
 	height: 100%;
     pointer-events:none; 
-	z-index: 101; 
+	/* z-index: 101;  */
 }
 #hot>div{
     position: absolute;
@@ -7112,13 +7112,34 @@ a.hasHover.tag-link:hover {
     user-select: none;
     border-radius: 5px;
     background-color: rgba(34, 34, 34, 0.3);
-    display:none;
-    padding:10px;
-    transform:translate(20px, -50%);
+    /* display:none; */
+    padding:10px; 
     max-width:400px;
     letter-spacing:1px;
     line-height:20px
-}    
+} 
+
+#hot>div[pos='right']{
+    transform:translate(20px, -50%);
+}
+
+#hot>div[pos='top']{
+    transform:translate(-50%, calc(-100% - 20px));
+}
+
+#hot>div[pos='middle']{
+    transform:translate(-50%, -50%);
+}
+
+#hot>div[pos='bottom']{
+    transform:translate(-50%, 20px);
+}
+
+#hot>div[pos='left']{
+    transform:translate(calc(-100% - 20px), -50%);
+}
+
+   
 .resultBox{
     font-family: "Microsoft YaHei";
     position: absolute;
@@ -7170,3 +7191,234 @@ a.hasHover.tag-link:hover {
         opacity: 0;
     }
 }
+
+
+
+
+
+
+
+
+
+/* 
+从 v3搬过来 */
+ 
+.widgets-doll-labels,
+#otherLabels {
+  overflow: hidden;
+  position: absolute;
+  pointer-events: none;
+  top: 0;
+  left: 0;
+  bottom: 0;
+  right: 0;
+}
+.widgets-doll-labels .room-label {
+  position: absolute;
+  width: 0;
+  height: 0;
+  /*  display: none; */
+  -webkit-transform: translateZ(0);
+  transform: translateZ(0);
+  -webkit-animation: room-label 0.3s ease 0.1s;
+  animation: room-label 0.3s ease 0.1s;
+  -webkit-animation-fill-mode: both;
+  animation-fill-mode: both;
+  cursor: pointer;
+}
+/* .widgets-doll-labels .room-label.visible {
+    display: block
+} */
+.widgets-doll-labels .room-label:not(.noLine):after {
+  content: "";
+  display: block;
+  position: absolute;
+  width: 4px;
+  height: 68px;
+  background-image: url("../images/labelline.svg");
+  background-size: contain;
+  background-repeat: no-repeat;
+  bottom: 0;
+  left: 50%;
+  -webkit-transform: translate(-50%);
+  transform: translate(-50%);
+  transition: all 0.3s;
+}
+.widgets-doll-labels .room-label a {
+  display: block;
+  position: absolute;
+  line-height: 22px;
+  top: -66px;
+  transform: translate(-50%, -100%);
+  text-align: center;
+  white-space: nowrap;
+  font-size: 14px;
+  font-style: normal;
+  pointer-events: auto;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  background: rgba(210, 210, 210, 0.7);
+  border: 1px solid rgba(255, 255, 255, 0.4);
+  border-radius: 3px;
+  text-shadow: 0px 1px 3px #000000;
+  min-height: 24px;
+  
+    
+}
+.widgets-doll-labels .room-label a:hover {
+    color:#fff;
+}
+
+.widgets-doll-labels .room-label.selected a{
+    background: rgb(57 72 255 / 88%);
+    border: 2px solid rgb(0 255 231);
+    border-radius: 3px;
+    text-shadow: 0px 1px 3px #04e79ecc;
+    
+}    
+.widgets-doll-labels.noLine .room-label a{
+    top: 0; 
+    transform: translate(-50%, -50%);
+    
+}
+
+.widgets-doll-labels.noLine .room-label:after {  /* 从dollhouse转到floorplan */
+    height:0;
+    bottom:-68px;
+} 
+
+.widgets-doll-labels .room-label a::before {
+  content: "";
+  position: absolute;
+  left: -1px;
+  top: -1px;
+  width: 10px;
+  height: 10px;
+  background-image: url(../images/doll_label_corner.svg);
+  background-repeat: no-repeat;
+  background-position: top left;
+}
+.widgets-doll-labels.noCorner .room-label a::before {
+    background-image:none;
+}
+
+.widgets-doll-labels .room-label a::after {
+  content: "";
+  position: absolute;
+  left: -1px;
+  bottom: -1px;
+  width: 10px;
+  height: 10px;
+  background-image: url(../images/doll_label_corner.svg);
+  background-repeat: no-repeat;
+  background-position: top left;
+  transform: rotate(270deg);
+}
+.widgets-doll-labels.noCorner .room-label a::after {
+    background-image: none
+}
+
+
+.widgets-doll-labels .room-label a > p {
+  margin: 0;
+  padding: 6px 14px;
+  width: 100%;
+  height: 100%;
+  line-height: 1.5;
+}
+.widgets-doll-labels .room-label a > p::before {
+  content: "";
+  position: absolute;
+  right: -1px;
+  top: -1px;
+  width: 10px;
+  height: 10px;
+  background-image: url(../images/doll_label_corner.svg);
+  background-repeat: no-repeat;
+  background-position: top left;
+  transform: rotate(90deg);
+}
+.widgets-doll-labels.noCorner .room-label a > p::before {
+    background-image: none;
+}
+
+.widgets-doll-labels .room-label a > p::after {
+  content: "";
+  position: absolute;
+  right: -1px;
+  bottom: -1px;
+  width: 10px;
+  height: 10px;
+  background-image: url(../images/doll_label_corner.svg);
+  background-repeat: no-repeat;
+  background-position: top left;
+  transform: rotate(180deg);
+}
+.widgets-doll-labels.noCorner .room-label a > p::after {
+    background-image: none;
+}
+.widgets-doll-labels .room-label.noLine a {
+  top: 16px;
+}
+.widgets-doll-labels .room-label a span {
+  white-space: nowrap;
+  user-select: none;
+}
+.widgets-doll-labels .room-label.with-entrance:after {
+  display: none;
+}
+.widgets-doll-labels .room-label.with-entrance a {
+  top: 50%;
+  width: 38.5px;
+  height: 15.75px;
+  background-size: 38.5px 15.75px;
+  -webkit-transform: translate(-50%, -50%);
+  transform: translate(-50%, -50%);
+}
+.widgets-doll-labels .room-label.with-entrance a span {
+  margin-left: -0.875px;
+  margin-top: -0.875px;
+}
+.widgets-plan-labels .room-label {
+  position: absolute;
+  -webkit-animation: room-label 0.3s ease 0.1s;
+  animation: room-label 0.3s ease 0.1s;
+  -webkit-animation-fill-mode: both;
+  animation-fill-mode: both;
+}
+.widgets-plan-labels .room-label a {
+  display: block;
+  position: absolute;
+  /* width: 38.5px; */
+  line-height: 24px;
+  /* top: -99px; */
+  /* left: 50%; */
+  -webkit-transform: translate(-50%);
+  transform: translate(-50%, -50%);
+  text-align: center;
+  white-space: nowrap;
+  font-size: 14px;
+  font-style: normal;
+  /* pointer-events: auto */
+  /*text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); */
+}
+@-webkit-keyframes room-label {
+  0% {
+    opacity: 0;
+    margin-top: 8.75px;
+  }
+  to {
+    opacity: 1;
+    margin-top: 0;
+  }
+}
+@keyframes room-label {
+  0% {
+    opacity: 0;
+    margin-top: 8.75px;
+  }
+  to {
+    opacity: 1;
+    margin-top: 0;
+  }
+} 

+ 227 - 100
edit.html

@@ -107,6 +107,10 @@
                         <span class="panoVisible"></span>
                         <label>漫游点位</label>
                     </li>
+                    <li data-name="roomLabels">
+                        <span class="hotpoint"></span>
+                        <label>房间标签</label>
+                    </li>
                 </ul>
             </div>
             <div class="toolMid">
@@ -114,8 +118,11 @@
                     <!-- 画布区域 -->
                     <div class="webgl-inside">
                         <div class="content">
-                            <div id="hot">
-                            </div>
+                            <div id="hot"> </div>
+                            <div id="otherLabels"> </div>
+                            <div class='widgets-doll-labels'> </div> 
+                            
+                            
                             <div id="popup">
                                 <div class="popup-content">
 
@@ -916,7 +923,7 @@
                 <div class="hotpoint content hide">
                     <ul>
                         <li class="addBtn"> 
-                            <div class="buttons">
+                            <div class="buttons bigger">
                                 <button class="innerBtn" data-type="shine">添加热点</button>
                                 <button class="innerBtn" data-type="photo">添加展览</button>
                             </div> 
@@ -929,12 +936,18 @@
                             </ul>
                             
                             <div class="itemTitle">
-                                <span>热点默认大小 (初始值为1)</span>
+                                <span>调整大小(闪烁类型)</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>
+                              
+                            <!-- <input class="" type="number" placeholder="请输入热点大小比例" value="1" max="100" min="0.1"
+                                step="0.1"> -->
+                            <div name='adjustSize' class="buttons " style="font-size: 20px;">
+                                <button class="innerBtn cancel" index='-'>-</button>
+                                <button class="innerBtn cancel" index='+'>+</button>
+                            </div>    
+                                    
+                                    
+                            
                             
                             <ul class="switch clearfix   ">
                                 <label><input  id="autoAdjustHotScale" class="mui-switch mui-switch-animbg" type="checkbox">
@@ -971,7 +984,25 @@
                                     </div>
                                     <div class="name">
                                         <input spellcheck="false" placeholder="标题" class="right" type="text" minlength="1" maxlength="200" placeholder="">
-                                    </div> 
+                                    </div>
+                                    <div class="itemTitle secondFontSize" >
+                                        <span>何时显示</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name='titleShowType'>
+                                        <li class="chosen" index="hover">鼠标悬浮时</li>
+                                        <li class="" index="always">一直显示</li>
+                                        <li class="" index="unvisible">不显示</li>
+                                    </ul>
+                                    <div class="itemTitle secondFontSize" >
+                                        <span>相对热点的位置</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name='titlePos'>
+                                        <li class="" index="top">上</li>
+                                        <li class="" index="bottom">下</li>
+                                        <li class="" index="left">左</li>
+                                        <li class="chosen" index="right">右</li>
+                                        <li class="" index="middle">中</li>
+                                    </ul>
                                 </li>
                                 
                                 
@@ -981,11 +1012,11 @@
                                         <span>贴图样式</span>
                                     </div>
                                     <ul class="MenuOptions innerBtn">
-                                        <li class="halfCell chosen" index="shine">闪烁</li>
-                                        <li class="halfCell" index="photo">图片</li>
-                                        <li class="halfCell" index="video">视频</li>
+                                        <li class=" chosen" index="shine">闪烁</li>
+                                        <li class="" index="photo">图片</li>
+                                        <li class="" index="video">视频</li>
                                     </ul>  
-                                    <label class="remark">注:修改样式图会影响到使用该组样式的所有热点。鼠标划到样式时使用它的热点会显示边框。未被使用的样式会在保存发布后被删除。</label>
+                                    <label class="remark">注:1 视频数据速率尽量低于2000kbps。 2 修改样式图会影响到使用它的所有热点,鼠标划到样式时这些热点会显示边框。3 未被使用的样式会在保存发布后被删除。</label>
                                     <div id='shineTexSelect' class='selectList texList'> 
                                         <a class="selection">
                                             <ul class="hotTexUpload">
@@ -1053,12 +1084,12 @@
                                         </li>
                                     </ul>
                                     <ul class="MenuOptions innerBtn" name="transform">
-                                        <li class="halfCell chosen" index="translate" data-lang="">位移</li>
-                                        <li class="halfCell" index="scale" data-lang="">缩放</li> 
-                                        <li class="halfCell" index="rotate" data-lang="">旋转</li>
+                                        <li class=" chosen" index="translate" data-lang="">位移</li>
+                                        <li class="" index="scale" data-lang="">缩放</li> 
+                                        <li class="" index="rotate" data-lang="">旋转</li>
                                     </ul>
                                     <div class="buttons">
-                                        <button class="innerBtn" name="setSpace">切换为世界坐标方向</button>
+                                        <button class="innerBtn cancel" name="setSpace">切换为世界坐标方向</button>
                                         <button class="innerBtn" name="useSuitableRatio">自适应缩放比例</button> 
                                         <button class="innerBtn" name="resetRot" style='    width: 100px;'>重置旋转</button>
                                     </div>
@@ -1069,82 +1100,48 @@
                                             当前漫游点独立调整
                                         </label>
                                         <label class="remark">若在不同点位出现错位,请开启此开关,独立调整在特定点位的位移。</label>
-                                    
+                                        <label class="remark hide" name='dis' style='color: #888; margin-top: 10px'>与相机水平距离</label>
                                     </ul>
                                 </li>
-                                
-                                   
-                                <li name="model" class='unable'>
-                                    <div class="itemTitle">
-                                        <span data-lang="">模型</span>
-                                    </div>
-                                    <ul class="MenuOptions innerBtn" name="modelType">
-                                        <li class="halfCell chosen" index="default" data-lang="">默认</li>
-                                        <li class="halfCell" index="user" data-lang="">自定义</li>  
-                                    </ul>
-                                    <ul>
-                                        <li name='boxDepthPanel'> 
-                                            <div class="itemTitle">
-                                                <span data-lang="">厚度</span>
-                                            </div>
-                                            <div id="boxDepth"></div>
-                                        </li>
-                                        <li name='uploadObj'> 
-                                            <div name='objPannel'>
-                                                <div id='ObjSelect' class='selectList texList text'> 
-                                                    <a class="selection"> 
-                                                    </a>
-                                                    <ul class="list  hide"></ul> 
-                                                </div> 
-                                            </div>
-                                            
-                                        </li>
-                                    </ul>    
-                                </li>                                
-                            
-                                <li name="clickEvent">
-                                    <div class="itemTitle">
-                                        <span>点击事件</span>
-                                    </div>
-                                    <ul>
-                                        <li class="editCheckbox">
-                                            <input name="playAndPause" type="checkbox" value="playAndPause" id="playAndPause">
-                                            <label for="playAndPause"></label>
-                                            <label for="playAndPause">播放/暂停</label>
-                                        </li>
-                                        <li class="editCheckbox">
-                                            <input name="examine" type="checkbox" value="examine" id="examine">
-                                            <label for="examine"></label>
-                                            <label for="examine">校准</label>
-                                        </li>
-                                        <li class="editCheckbox">
-                                            <input name="openHot"  type="checkbox" value="openHot" id="openHot">
-                                            <label for="openHot"></label>
-                                            <label for="openHot">打开热点</label>
-                                        </li>
-                                    </ul>   
-                                </li>
-                                
-                                
                                 <li name='content'>
                                     <div class="itemTitle">
                                         <span>热点内容</span>
                                     </div>
                                     <ul>
                                     <li name="intro">
-                                        <div class="itemTitle" data-size="2000">
+                                        <div class="itemTitle secondFontSize" data-size="4000">
                                             <span>简介</span>
                                         </div>
-                                        <textarea placeholder="简介" class="editText" maxlength="2000"></textarea>
-                                    </li>
-                                    <li name="photo">
+                                        <textarea placeholder="简介" class="editText" maxlength="4000"></textarea>
+                                        <div class="buttons" name='addSign' style='margin-top:-13px'>
+                                            <button class="innerBtn cancel" name='space'>加空格</button>
+                                            <button class="innerBtn cancel" name='return'>加换行</button>
+                                        </div> 
                                     
-                                        <div class="itemTitle" data-size="<9M">
+                                    </li>
+                                    <li name="photo"> 
+                                        <div class="itemTitle secondFontSize" data-size="<9M">
                                             <span>图片</span>
                                         </div>
                                         <div class="list edit-fun-images clearfix"></div>
+                                        
+                                        <ul class="switch clearfix thirdFontSize">
+                                            <label><input  id="addImgDesc" class="mui-switch mui-switch-animbg" type="checkbox">
+                                                开启图片描述 
+                                            </label>
+                                        </ul>
+                                       
+                                        <div class="itemTitle thirdFontSize" name='descTitle'>
+                                            <span>描述编辑器</span>
+                                            <div class="buttons"> 
+                                                <button class="innerBtn cancel" style="font-size: 10px;">应用到所有</button>
+                                            </div>
+                                        </div> 
+                                        <textarea placeholder="<=300字" class="editText" maxlength="300" style="min-height:100px"></textarea>
+                                 
+                                        
                                         <div class="upload">
-                                            <div data-type='photo'>
+                                            <div data-type='photo' >
                                                 <span>手动上传</span>
                                                 <div class="buttons">
                                                     <button class="submit innerBtn">更改</button>
@@ -1155,10 +1152,26 @@
                                         </div>
                                     </li>
                                     <li name="video">
-                                        <div class="itemTitle" data-size="MP4">
+                                        <div class="itemTitle secondFontSize" data-size="MP4">
                                             <span>视频</span>
                                         </div>
                                         <div class="list edit-fun-images clearfix"></div>
+                                        
+                                         
+                                        <ul class="switch clearfix thirdFontSize">
+                                            <label><input  id="addVideoDesc" class="mui-switch mui-switch-animbg" type="checkbox">
+                                                开启视频描述 
+                                            </label>
+                                        </ul>
+                                       
+                                        <div class="itemTitle thirdFontSize" name='descTitle'>
+                                            <span>描述编辑器</span>
+                                            <div class="buttons"> 
+                                                <button class="innerBtn cancel" style="font-size: 10px;">应用到所有</button>
+                                            </div>
+                                        </div> 
+                                        <textarea placeholder="<=300字" class="editText" maxlength="300" style="min-height:100px"></textarea>
+                                        
                                         <div class="upload">
                                             <div data-type='video'>
                                                 <span>手动上传</span>
@@ -1171,7 +1184,7 @@
                                         </div>
                                     </li>
                                     <li name="audio" class='mediaUpload'>
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加音频</span>
                                             <div class="buttons">
                                                 <input type="file" id="upload-hotBgm" accept="audio/*">
@@ -1187,7 +1200,7 @@
                                         </div>
                                     </li>
                                     <li name="modelSrc" class='mediaUpload' >
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加模型链接</span>
                                         </div>
                                         <div class="list"></div>
@@ -1199,13 +1212,13 @@
                                         </div>
                                     </li>
                                     <li name="webPage"> <!-- mediaUpload -->
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加网页链接</span>
                                         </div>  
                                         <ul class="MenuOptions innerBtn" name="linkType">
-                                            <li class="halfCell chosen" index="common" data-lang="">普通</li>
-                                            <li class="halfCell" index="jumpLink" data-lang="">跳转</li>
-                                            <li class="halfCell" index="iframeDiv" data-lang="">iframe</li>
+                                            <li class=" chosen" index="common" data-lang="">普通</li>
+                                            <li class="" index="jumpLink" data-lang="">跳转</li>
+                                            <li class="" index="iframeDiv" data-lang="">iframe</li>
                                         </ul>
                                         <label class="remark">方式1须https, 方式2、3 除当前第一个链接外,其他内容将不展现。</label>
                                         <div class="list"></div>
@@ -1218,11 +1231,82 @@
                                     </li> 
                                     </ul>
                                 </li>
+                                 
+                                <li name="clickEvent">
+                                    <div class="itemTitle">
+                                        <span>点击事件</span>
+                                    </div>
+                                    <ul>
+                                        <li class="editCheckbox">
+                                            <input name="playAndPause" type="checkbox" value="playAndPause" id="playAndPause">
+                                            <label for="playAndPause"></label>
+                                            <label for="playAndPause">播放/暂停</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="examine" type="checkbox" value="examine" id="examine">
+                                            <label for="examine"></label>
+                                            <label for="examine">校准</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="openHot"  type="checkbox" value="openHot" id="openHot">
+                                            <label for="openHot"></label>
+                                            <label for="openHot">打开热点</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="fastTran"  type="checkbox" value="fastTran" id="fastTran">
+                                            <label for="fastTran"></label>
+                                            <label for="fastTran">跳转到固定方位</label>
+                                        </li>
+                                    </ul>   
+                                </li>
+                                <li name='fastTran'>
+                                    <div class="itemTitle">
+                                        <span>跳转方位</span>
+                                    </div> 
+                                    <div class="shotImg innerBtn" ></div>
+                                    <div class="buttons">
+                                        <button class="innerBtn submit ">设置</button> 
+                                    </div>
+                                    
+                                </li>
+                                  
+                                <li name="model" class='unable'>
+                                    <div class="itemTitle">
+                                        <span data-lang="">模型</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name="modelType">
+                                        <li class=" chosen" index="default" data-lang="">默认</li>
+                                        <li class="" index="user" data-lang="">自定义</li>  
+                                    </ul>
+                                    <ul>
+                                        <li name='boxDepthPanel'> 
+                                            <div class="itemTitle secondFontSize">
+                                                <span data-lang="">厚度</span>
+                                            </div>
+                                            <div id="boxDepth"></div>
+                                        </li>
+                                        <li name='uploadObj'> 
+                                            <div name='objPannel'>
+                                                <div id='ObjSelect' class='selectList texList text'> 
+                                                    <a class="selection"> 
+                                                    </a>
+                                                    <ul class="list  hide"></ul> 
+                                                </div> 
+                                            </div>
+                                            
+                                        </li>
+                                    </ul>    
+                                </li>                                
+                            
+                             
+                             
+                             
                              </ul>
                         </div>
                         <div class="buttons tail">
+                            <button class="delete innerBtn">删除</button>
                             <button class="submit innerBtn">完成</button>
-                            <button class="cancel innerBtn">取消</button>
+                            <!-- <button class="cancel innerBtn">取消</button> -->
                         </div>
 
                     </div>
@@ -1329,8 +1413,12 @@
                                 <span>简介内容</span>
                             </div>
 
-                            <textarea placeholder="大场景的简介" id="info-summary" class="editText"
-                               maxlength="1000"  ></textarea>
+                            <textarea placeholder="大场景的简介" id="info-summary" class="editText" maxlength="1000"  ></textarea>
+
+                            <div class="buttons" name='addSign' for='info-summary' style='margin-top:-2px'>
+                                <button class="innerBtn cancel" name='space'>加空格</button>
+                                <button class="innerBtn cancel" name='return'>换行</button>
+                            </div> 
 
                             <div class="itemTitle" data-size="300" id="project-intro2">
                                 <span>分享文字</span>
@@ -1389,11 +1477,11 @@
                                 <span>平面图方向固定</span>
                             </div>
                             <ul class="MenuOptions innerBtn">
-                                <li class="halfCell chosen" index="0">无</li>
-                                <li class="halfCell" index="1">1</li>
-                                <li class="halfCell" index="2">2</li>
-                                <li class="halfCell" index="3">3</li>
-                                <li class="halfCell" index="4">4</li>
+                                <li class=" chosen" index="0">无</li>
+                                <li class="" index="1">1</li>
+                                <li class="" index="2">2</li>
+                                <li class="" index="3">3</li>
+                                <li class="" index="4">4</li>
                             </ul>
                         </li>
                         <li data-name="other">
@@ -1402,6 +1490,12 @@
                             </div>
                             <ul class="other-item">
                                 <li class="editCheckbox">
+                                    <input name="newBlack"  type="checkbox" value="newBlack"
+                                        id="newBlack">
+                                    <label for="newBlack"></label>
+                                    <label for="newBlack">新版瞬间过渡</label>
+                                </li> 
+                                <li class="editCheckbox">
                                     <input name="hotListSwitch"  type="checkbox" value="hotListSwitch"
                                         id="hotListSwitch">
                                     <label for="hotListSwitch"></label>
@@ -1451,6 +1545,10 @@
                                     <label for="twoData"></label>
                                     <label for="twoData">启动二代数据 <i class="colorRed">-请慎重选择</i> </label>
                                 </li>
+                               
+                                
+                                
+                                
                             </ul>
                             <ul>
                                 <li>
@@ -1491,7 +1589,7 @@
                 <div class="snapTour content hide">
                     <ul> 
                         <li class="addTour">
-                            <div class="buttons begin">
+                            <div class="buttons begin bigger">
                                 <button class="innerBtn">添加导览</button>
                                 <button class="innerBtn">添加片段</button>
                             </div>
@@ -1564,9 +1662,9 @@
                                         </div> 
                                         
                                         <ul id="folderTourSwitch"  class="MenuOptions innerBtn" >
-                                            <li class="halfCell" index="default" data-lang="">同外层</li>
-                                            <li class="halfCell" index="walk" data-lang="">行走</li>
-                                            <li class="halfCell chosen" index="black" data-lang="">瞬间</li>
+                                            <li class="" index="default" data-lang="">同外层</li>
+                                            <li class="" index="walk" data-lang="">行走</li>
+                                            <li class=" chosen" index="black" data-lang="">瞬间</li>
                                         </ul>
                                         
                                         
@@ -1635,9 +1733,9 @@
                                             <span>飞向该片段的过渡效果</span>
                                         </div> 
                                         <ul id="tourSwitch_Slice"  class="MenuOptions innerBtn" >
-                                            <li class="halfCell" index="default" data-lang="">同外层</li>
-                                            <li class="halfCell" index="walk" data-lang="">行走</li>
-                                            <li class="halfCell chosen" index="black" data-lang="">瞬间</li>
+                                            <li class="" index="default" data-lang="">同外层</li>
+                                            <li class="" index="walk" data-lang="">行走</li>
+                                            <li class=" chosen" index="black" data-lang="">瞬间</li>
                                         </ul>  
                                     </li>
                                     <li> 
@@ -1720,6 +1818,35 @@
                     </ul>
                 </div>
                 
+                <div class="roomLabels content hide">
+                    <ul > 
+                        <li class="addBtn"> 
+                            <div class="buttons bigger">
+                                <button class="innerBtn" data-type="shine">添加标签</button> 
+                            </div>   
+                        </li>
+                        <li name='list'> 
+                            <ul>
+                                <li name='prop' class = 'hide'>
+                                    <ul> 
+                                        <li name='title'>
+                                            <!-- <div class="itemTitle" data-size="30">
+                                                <span>标题</span>
+                                            </div> -->
+                                            <input spellcheck="false" class="right input" type="text" minlength="1" maxlength="30" placeholder="输入标题 <30字">
+                                        </li>
+                                        <!-- <li name='delete'>
+                                            <div class="buttons">
+                                                <button class="innerBtn cancel" >删除</button> 
+                                            </div>   
+                                        </li> -->
+                                    </ul> 
+                                </li> 
+                            </ul> 
+                        </li>
+                        
+                    </ul>
+                </div>
                 
                 
                 

+ 233 - 99
eforclient.html

@@ -107,6 +107,10 @@
                         <span class="panoVisible"></span>
                         <label>漫游点位</label>
                     </li>
+                    <li data-name="roomLabels">
+                        <span class="hotpoint"></span>
+                        <label>房间标签</label>
+                    </li>
                 </ul>
             </div>
             <div class="toolMid">
@@ -114,8 +118,11 @@
                     <!-- 画布区域 -->
                     <div class="webgl-inside">
                         <div class="content">
-                            <div id="hot">
-                            </div>
+                            <div id="hot"> </div>
+                            <div id="otherLabels"> </div>
+                            <div class='widgets-doll-labels'> </div> 
+                            
+                            
                             <div id="popup">
                                 <div class="popup-content">
 
@@ -916,7 +923,7 @@
                 <div class="hotpoint content hide">
                     <ul>
                         <li class="addBtn"> 
-                            <div class="buttons">
+                            <div class="buttons bigger">
                                 <button class="innerBtn" data-type="shine">添加热点</button>
                                 <button class="innerBtn" data-type="photo">添加展览</button>
                             </div> 
@@ -929,12 +936,18 @@
                             </ul>
                             
                             <div class="itemTitle">
-                                <span>热点默认大小 (初始值为1)</span>
+                                <span>调整大小(闪烁类型)</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>
+                              
+                            <!-- <input class="" type="number" placeholder="请输入热点大小比例" value="1" max="100" min="0.1"
+                                step="0.1"> -->
+                            <div name='adjustSize' class="buttons " style="font-size: 20px;">
+                                <button class="innerBtn cancel" index='-'>-</button>
+                                <button class="innerBtn cancel" index='+'>+</button>
+                            </div>    
+                                    
+                                    
+                            
                             
                             <ul class="switch clearfix   ">
                                 <label><input  id="autoAdjustHotScale" class="mui-switch mui-switch-animbg" type="checkbox">
@@ -971,7 +984,25 @@
                                     </div>
                                     <div class="name">
                                         <input spellcheck="false" placeholder="标题" class="right" type="text" minlength="1" maxlength="200" placeholder="">
-                                    </div> 
+                                    </div>
+                                    <div class="itemTitle secondFontSize" >
+                                        <span>何时显示</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name='titleShowType'>
+                                        <li class="chosen" index="hover">鼠标悬浮时</li>
+                                        <li class="" index="always">一直显示</li>
+                                        <li class="" index="unvisible">不显示</li>
+                                    </ul>
+                                    <div class="itemTitle secondFontSize" >
+                                        <span>相对热点的位置</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name='titlePos'>
+                                        <li class="" index="top">上</li>
+                                        <li class="" index="bottom">下</li>
+                                        <li class="" index="left">左</li>
+                                        <li class="chosen" index="right">右</li>
+                                        <li class="" index="middle">中</li>
+                                    </ul>
                                 </li>
                                 
                                 
@@ -981,9 +1012,9 @@
                                         <span>贴图样式</span>
                                     </div>
                                     <ul class="MenuOptions innerBtn">
-                                        <li class="halfCell chosen" index="shine">闪烁</li>
-                                        <li class="halfCell" index="photo">图片</li>
-                                        <li class="halfCell" index="video">视频</li>
+                                        <li class=" chosen" index="shine">闪烁</li>
+                                        <li class="" index="photo">图片</li>
+                                        <li class="" index="video">视频</li>
                                     </ul>  
                                     <label class="remark">注:修改样式图会影响到使用该组样式的所有热点。鼠标划到样式时使用它的热点会显示边框。未被使用的样式会在保存发布后被删除。</label>
                                     <div id='shineTexSelect' class='selectList texList'> 
@@ -1053,12 +1084,12 @@
                                         </li>
                                     </ul>
                                     <ul class="MenuOptions innerBtn" name="transform">
-                                        <li class="halfCell chosen" index="translate" data-lang="">位移</li>
-                                        <li class="halfCell" index="scale" data-lang="">缩放</li> 
-                                        <li class="halfCell" index="rotate" data-lang="">旋转</li>
+                                        <li class=" chosen" index="translate" data-lang="">位移</li>
+                                        <li class="" index="scale" data-lang="">缩放</li> 
+                                        <li class="" index="rotate" data-lang="">旋转</li>
                                     </ul>
                                     <div class="buttons">
-                                        <button class="innerBtn" name="setSpace">切换为世界坐标方向</button>
+                                        <button class="innerBtn cancel" name="setSpace">切换为世界坐标方向</button>
                                         <button class="innerBtn" name="useSuitableRatio">自适应缩放比例</button> 
                                         <button class="innerBtn" name="resetRot" style='    width: 100px;'>重置旋转</button>
                                     </div>
@@ -1069,82 +1100,48 @@
                                             当前漫游点独立调整
                                         </label>
                                         <label class="remark">若在不同点位出现错位,请开启此开关,独立调整在特定点位的位移。</label>
-                                    
-                                    </ul>
-                                </li>
-                                
-                                   
-                                <li name="model" class='unable'>
-                                    <div class="itemTitle">
-                                        <span data-lang="">模型</span>
-                                    </div>
-                                    <ul class="MenuOptions innerBtn" name="modelType">
-                                        <li class="halfCell chosen" index="default" data-lang="">默认</li>
-                                        <li class="halfCell" index="user" data-lang="">自定义</li>  
+                                        <label class="remark hide" name='dis' style='color: #888; margin-top: 10px'>与相机水平距离</label>
                                     </ul>
-                                    <ul>
-                                        <li name='boxDepthPanel'> 
-                                            <div class="itemTitle">
-                                                <span data-lang="">厚度</span>
-                                            </div>
-                                            <div id="boxDepth"></div>
-                                        </li>
-                                        <li name='uploadObj'> 
-                                            <div name='objPannel'>
-                                                <div id='ObjSelect' class='selectList texList text'> 
-                                                    <a class="selection"> 
-                                                    </a>
-                                                    <ul class="list  hide"></ul> 
-                                                </div> 
-                                            </div>
-                                            
-                                        </li>
-                                    </ul>    
-                                </li>                                
-                            
-                                <li name="clickEvent">
-                                    <div class="itemTitle">
-                                        <span>点击事件</span>
-                                    </div>
-                                    <ul>
-                                        <li class="editCheckbox">
-                                            <input name="playAndPause" type="checkbox" value="playAndPause" id="playAndPause">
-                                            <label for="playAndPause"></label>
-                                            <label for="playAndPause">播放/暂停</label>
-                                        </li>
-                                        <li class="editCheckbox">
-                                            <input name="examine" type="checkbox" value="examine" id="examine">
-                                            <label for="examine"></label>
-                                            <label for="examine">校准</label>
-                                        </li>
-                                        <li class="editCheckbox">
-                                            <input name="openHot"  type="checkbox" value="openHot" id="openHot">
-                                            <label for="openHot"></label>
-                                            <label for="openHot">打开热点</label>
-                                        </li>
-                                    </ul>   
                                 </li>
-                                
-                                
                                 <li name='content'>
                                     <div class="itemTitle">
                                         <span>热点内容</span>
                                     </div>
                                     <ul>
                                     <li name="intro">
-                                        <div class="itemTitle" data-size="2000">
+                                        <div class="itemTitle secondFontSize" data-size="4000">
                                             <span>简介</span>
                                         </div>
-                                        <textarea placeholder="简介" class="editText" maxlength="2000"></textarea>
-                                    </li>
-                                    <li name="photo">
+                                        <textarea placeholder="简介" class="editText" maxlength="4000"></textarea>
+                                        <div class="buttons" name='addSign' style='margin-top:-13px'>
+                                            <button class="innerBtn cancel" name='space'>加空格</button>
+                                            <button class="innerBtn cancel" name='return'>加换行</button>
+                                        </div> 
                                     
-                                        <div class="itemTitle" data-size="<9M">
+                                    </li>
+                                    <li name="photo"> 
+                                        <div class="itemTitle secondFontSize" data-size="<9M">
                                             <span>图片</span>
                                         </div>
                                         <div class="list edit-fun-images clearfix"></div>
+                                        
+                                        <ul class="switch clearfix thirdFontSize">
+                                            <label><input  id="addImgDesc" class="mui-switch mui-switch-animbg" type="checkbox">
+                                                开启图片描述 
+                                            </label>
+                                        </ul>
+                                       
+                                        <div class="itemTitle thirdFontSize" name='descTitle'>
+                                            <span>描述编辑器</span>
+                                            <div class="buttons"> 
+                                                <button class="innerBtn cancel" style="font-size: 10px;">应用到所有</button>
+                                            </div>
+                                        </div> 
+                                        <textarea placeholder="<=300字" class="editText" maxlength="300" style="min-height:100px"></textarea>
+                                 
+                                        
                                         <div class="upload">
-                                            <div data-type='photo'>
+                                            <div data-type='photo' >
                                                 <span>手动上传</span>
                                                 <div class="buttons">
                                                     <button class="submit innerBtn">更改</button>
@@ -1155,10 +1152,26 @@
                                         </div>
                                     </li>
                                     <li name="video">
-                                        <div class="itemTitle" data-size="MP4">
+                                        <div class="itemTitle secondFontSize" data-size="MP4">
                                             <span>视频</span>
                                         </div>
                                         <div class="list edit-fun-images clearfix"></div>
+                                        
+                                         
+                                        <ul class="switch clearfix thirdFontSize">
+                                            <label><input  id="addVideoDesc" class="mui-switch mui-switch-animbg" type="checkbox">
+                                                开启视频描述 
+                                            </label>
+                                        </ul>
+                                       
+                                        <div class="itemTitle thirdFontSize" name='descTitle'>
+                                            <span>描述编辑器</span>
+                                            <div class="buttons"> 
+                                                <button class="innerBtn cancel" style="font-size: 10px;">应用到所有</button>
+                                            </div>
+                                        </div> 
+                                        <textarea placeholder="<=300字" class="editText" maxlength="300" style="min-height:100px"></textarea>
+                                        
                                         <div class="upload">
                                             <div data-type='video'>
                                                 <span>手动上传</span>
@@ -1171,7 +1184,7 @@
                                         </div>
                                     </li>
                                     <li name="audio" class='mediaUpload'>
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加音频</span>
                                             <div class="buttons">
                                                 <input type="file" id="upload-hotBgm" accept="audio/*">
@@ -1187,7 +1200,7 @@
                                         </div>
                                     </li>
                                     <li name="modelSrc" class='mediaUpload' >
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加模型链接</span>
                                         </div>
                                         <div class="list"></div>
@@ -1199,13 +1212,13 @@
                                         </div>
                                     </li>
                                     <li name="webPage"> <!-- mediaUpload -->
-                                        <div class="itemTitle">
+                                        <div class="itemTitle secondFontSize">
                                             <span>添加网页链接</span>
                                         </div>  
                                         <ul class="MenuOptions innerBtn" name="linkType">
-                                            <li class="halfCell chosen" index="common" data-lang="">普通</li>
-                                            <li class="halfCell" index="jumpLink" data-lang="">跳转</li>
-                                            <li class="halfCell" index="iframeDiv" data-lang="">iframe</li>
+                                            <li class=" chosen" index="common" data-lang="">普通</li>
+                                            <li class="" index="jumpLink" data-lang="">跳转</li>
+                                            <li class="" index="iframeDiv" data-lang="">iframe</li>
                                         </ul>
                                         <label class="remark">方式1须https, 方式2、3 除当前第一个链接外,其他内容将不展现。</label>
                                         <div class="list"></div>
@@ -1218,6 +1231,76 @@
                                     </li> 
                                     </ul>
                                 </li>
+                                 
+                                <li name="clickEvent">
+                                    <div class="itemTitle">
+                                        <span>点击事件</span>
+                                    </div>
+                                    <ul>
+                                        <li class="editCheckbox">
+                                            <input name="playAndPause" type="checkbox" value="playAndPause" id="playAndPause">
+                                            <label for="playAndPause"></label>
+                                            <label for="playAndPause">播放/暂停</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="examine" type="checkbox" value="examine" id="examine">
+                                            <label for="examine"></label>
+                                            <label for="examine">校准</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="openHot"  type="checkbox" value="openHot" id="openHot">
+                                            <label for="openHot"></label>
+                                            <label for="openHot">打开热点</label>
+                                        </li>
+                                        <li class="editCheckbox">
+                                            <input name="fastTran"  type="checkbox" value="fastTran" id="fastTran">
+                                            <label for="fastTran"></label>
+                                            <label for="fastTran">跳转到固定方位</label>
+                                        </li>
+                                    </ul>   
+                                </li>
+                                <li name='fastTran'>
+                                    <div class="itemTitle">
+                                        <span>跳转方位</span>
+                                    </div> 
+                                    <div class="shotImg innerBtn" ></div>
+                                    <div class="buttons">
+                                        <button class="innerBtn submit ">设置</button> 
+                                    </div>
+                                    
+                                </li>
+                                  
+                                <li name="model" class='unable'>
+                                    <div class="itemTitle">
+                                        <span data-lang="">模型</span>
+                                    </div>
+                                    <ul class="MenuOptions innerBtn" name="modelType">
+                                        <li class=" chosen" index="default" data-lang="">默认</li>
+                                        <li class="" index="user" data-lang="">自定义</li>  
+                                    </ul>
+                                    <ul>
+                                        <li name='boxDepthPanel'> 
+                                            <div class="itemTitle secondFontSize">
+                                                <span data-lang="">厚度</span>
+                                            </div>
+                                            <div id="boxDepth"></div>
+                                        </li>
+                                        <li name='uploadObj'> 
+                                            <div name='objPannel'>
+                                                <div id='ObjSelect' class='selectList texList text'> 
+                                                    <a class="selection"> 
+                                                    </a>
+                                                    <ul class="list  hide"></ul> 
+                                                </div> 
+                                            </div>
+                                            
+                                        </li>
+                                    </ul>    
+                                </li>                                
+                            
+                             
+                             
+                             
                              </ul>
                         </div>
                         <div class="buttons tail">
@@ -1329,8 +1412,12 @@
                                 <span>简介内容</span>
                             </div>
 
-                            <textarea placeholder="大场景的简介" id="info-summary" class="editText"
-                               maxlength="1000"  ></textarea>
+                            <textarea placeholder="大场景的简介" id="info-summary" class="editText" maxlength="1000"  ></textarea>
+
+                            <div class="buttons" name='addSign' for='info-summary' style='margin-top:-2px'>
+                                <button class="innerBtn cancel" name='space'>加空格</button>
+                                <button class="innerBtn cancel" name='return'>换行</button>
+                            </div> 
 
                             <div class="itemTitle" data-size="300" id="project-intro2">
                                 <span>分享文字</span>
@@ -1384,12 +1471,30 @@
                                 <input id="mouseMarkerColor" type="color" />
                             </ul>
                         </li>
+                        <li data-name="floorPlanAngle">
+                            <div class="itemTitle">
+                                <span>平面图方向固定</span>
+                            </div>
+                            <ul class="MenuOptions innerBtn">
+                                <li class=" chosen" index="0">无</li>
+                                <li class="" index="1">1</li>
+                                <li class="" index="2">2</li>
+                                <li class="" index="3">3</li>
+                                <li class="" index="4">4</li>
+                            </ul>
+                        </li>
                         <li data-name="other">
                             <div class="itemTitle">
                                 <span>其他设置</span>
                             </div>
                             <ul class="other-item">
                                 <li class="editCheckbox">
+                                    <input name="newBlack"  type="checkbox" value="newBlack"
+                                        id="newBlack">
+                                    <label for="newBlack"></label>
+                                    <label for="newBlack">新版瞬间过渡</label>
+                                </li> 
+                                <li class="editCheckbox">
                                     <input name="hotListSwitch"  type="checkbox" value="hotListSwitch"
                                         id="hotListSwitch">
                                     <label for="hotListSwitch"></label>
@@ -1439,6 +1544,10 @@
                                     <label for="twoData"></label>
                                     <label for="twoData">启动二代数据 <i class="colorRed">-请慎重选择</i> </label>
                                 </li>
+                               
+                                
+                                
+                                
                             </ul>
                             <ul>
                                 <li>
@@ -1479,7 +1588,7 @@
                 <div class="snapTour content hide">
                     <ul> 
                         <li class="addTour">
-                            <div class="buttons begin">
+                            <div class="buttons begin bigger">
                                 <button class="innerBtn">添加导览</button>
                                 <button class="innerBtn">添加片段</button>
                             </div>
@@ -1552,9 +1661,9 @@
                                         </div> 
                                         
                                         <ul id="folderTourSwitch"  class="MenuOptions innerBtn" >
-                                            <li class="halfCell" index="default" data-lang="">同外层</li>
-                                            <li class="halfCell" index="walk" data-lang="">行走</li>
-                                            <li class="halfCell chosen" index="black" data-lang="">瞬间</li>
+                                            <li class="" index="default" data-lang="">同外层</li>
+                                            <li class="" index="walk" data-lang="">行走</li>
+                                            <li class=" chosen" index="black" data-lang="">瞬间</li>
                                         </ul>
                                         
                                         
@@ -1623,9 +1732,9 @@
                                             <span>飞向该片段的过渡效果</span>
                                         </div> 
                                         <ul id="tourSwitch_Slice"  class="MenuOptions innerBtn" >
-                                            <li class="halfCell" index="default" data-lang="">同外层</li>
-                                            <li class="halfCell" index="walk" data-lang="">行走</li>
-                                            <li class="halfCell chosen" index="black" data-lang="">瞬间</li>
+                                            <li class="" index="default" data-lang="">同外层</li>
+                                            <li class="" index="walk" data-lang="">行走</li>
+                                            <li class=" chosen" index="black" data-lang="">瞬间</li>
                                         </ul>  
                                     </li>
                                     <li> 
@@ -1708,6 +1817,35 @@
                     </ul>
                 </div>
                 
+                <div class="roomLabels content hide">
+                    <ul > 
+                        <li class="addBtn"> 
+                            <div class="buttons bigger">
+                                <button class="innerBtn" data-type="shine">添加标签</button> 
+                            </div>   
+                        </li>
+                        <li name='list'> 
+                            <ul>
+                                <li name='prop' class = 'hide'>
+                                    <ul> 
+                                        <li name='title'>
+                                            <!-- <div class="itemTitle" data-size="30">
+                                                <span>标题</span>
+                                            </div> -->
+                                            <input spellcheck="false" class="right input" type="text" minlength="1" maxlength="30" placeholder="输入标题 <30字">
+                                        </li>
+                                        <!-- <li name='delete'>
+                                            <div class="buttons">
+                                                <button class="innerBtn cancel" >删除</button> 
+                                            </div>   
+                                        </li> -->
+                                    </ul> 
+                                </li> 
+                            </ul> 
+                        </li>
+                        
+                    </ul>
+                </div>
                 
                 
                 
@@ -1749,18 +1887,14 @@
     </div>
 
     <script>
-
-        var ceshi = ''
+        var ceshi = '';
         var token = ''
-     
-    
         window.isEdit = true
-      
     </script>
 
     <script src="js/lib/jquery-2.1.1.min.js" class="build keep"></script>
     <script src="js/lib/player-0.0.12.min.js" class="build keep"></script>
-    <script src="js/Tween.js"></script> 
+    <script src="js/lib/Tween.js"></script> 
     <script src="js/SpecialScene.js"></script>
     <script src="js/manage.js"></script>
     <script src="js/edit.js"></script>

+ 355 - 158
js/Hot.js

@@ -2,6 +2,19 @@
 //合并热点和展览 
 g_currentHot = null
 
+
+
+
+
+ 
+
+const playVideoWhenFlyOut = false
+//同时可播放的最大个数:
+const playVideoMax = window.isEdit ? 4  :   browser.isMobile() ? 2 : 3;   
+const playAniMax = window.isEdit ? 8 :   browser.isMobile() ? 3 : 6;
+
+
+
 window.initHot = function(model){
       
     var objLoader = new THREE.OBJLoader()    
@@ -16,6 +29,9 @@ window.initHot = function(model){
     
     var defaultTex1 = Texture.load(g_HotImage.point);
     var defaultTex2 = Texture.load(g_HotImage.point2)    
+    dealMap(defaultTex1,{ignoreResize:true}  );
+    dealMap(defaultTex2,{ignoreResize:true}  ); //这张图改为linear有黑边。  但即使不改,chrome调试手机版也有黑边和锯齿
+    
     
     /* var _boxMat = new THREE.MeshBasicMaterial({ 
         color: "#eeeeee",
@@ -28,7 +44,11 @@ window.initHot = function(model){
         opacity: 0.8,
         side:THREE.DoubleSide
     })
-    var autoSizeInfo = {minSize : 120,  maxSize : 600,   nearBound : 1 , farBound :  15}
+     
+    var autoSizeInfo = /* {width2d:50}// */{minSize : 120,  maxSize : 600,   nearBound : 1 , farBound :  15}
+
+
+
 
     var hotGroup = new THREE.Object3D;  hotGroup.name = "hotGroup"
     model.add(hotGroup);   model.hotGroup = hotGroup
@@ -71,11 +91,7 @@ window.initHot = function(model){
         if(mat) return mat
         else{
             var mat = new THREE.ShaderMaterial({ 
-                uniforms: {
-                    color: {
-                        type: "c",
-                        value: new THREE.Color(16720384)
-                    },
+                uniforms: { 
                     opac: {
                         type: "f",
                         value: 0
@@ -90,7 +106,7 @@ window.initHot = function(model){
                     }
                 }, 
                 vertexShader: "varying vec2 vUv;\n\nvoid main() {\n\n vUv =  uv ;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n",
-                fragmentShader: "varying vec3 vNormal;\n\nvarying vec2 vUv;\n\nuniform float opac;\n\nuniform vec3 color;\n\nuniform sampler2D texture1;\n\nuniform sampler2D texture2;\n\nvoid main() {\n\nvec4 tcolor1 = texture2D( texture1, vUv );\n\nvec4 tcolor2 = texture2D( texture2, vUv );\n\ngl_FragColor = mix(tcolor1,tcolor2 ,opac) + tcolor2*0.2; }\n"
+                fragmentShader: "varying vec3 vNormal;\n\nvarying vec2 vUv;\n\nuniform float opac;\n\n  uniform sampler2D texture1;\n\nuniform sampler2D texture2;\n\nvoid main() {\n\nvec4 tcolor1 = texture2D( texture1, vUv );\n\nvec4 tcolor2 = texture2D( texture2, vUv );\n\ngl_FragColor = mix(tcolor1,tcolor2 ,opac) + tcolor2*0.2; }\n"
                 ,transparent: !0
             })
             shineMats.push(mat)
@@ -130,7 +146,7 @@ window.initHot = function(model){
              
             
             this.sid = info.sid;
-            this.preDeal(info, source)// source:来源
+            this.preDeal(info, source)// source:旧版来源
             
             this.info = info
             this.cornerPoints = []
@@ -145,28 +161,7 @@ window.initHot = function(model){
          
 
 
-        build(info) {
-            /* this.changeMaterial(new THREE.MeshBasicMaterial({ 
-                color: "#00c8af",
-                opacity: 0.4,
-                transparent: !0,
-                polygonOffset: true,
-                //是否开启多边形偏移		//ie不开启时blank也不会闪烁
-                polygonOffsetFactor: -0.9,
-                //多边形偏移因子
-                polygonOffsetUnits: -4.0,
-                //多边形偏移单位  
-            })) 
-          
-            if(!info.objSrc){
-                this.addPlane() 
-                if (info.hasBox)   this.addBox(true)  
-            }else{ 
-                this.addModel(new THREE.Mesh())//暂时创建个空的
-                 
-            }     */
-            
-             
+        build(info) { 
             hotGroup.add(this)
             this.setTitleElem()          
             this.setFromInfo(info)
@@ -330,13 +325,12 @@ window.initHot = function(model){
                     video = media
                 }else{
                     if(!this.info.texSrc)return
-                    var video = $(`<video  controls="controls" loop autoplay x5-playsinline="" webkit-playsinline="true" playsinline="true" controlslist="nodownload"></video>`)[0]
-                    video.src = manage.dealURL(this.info.texSrc);
+                    var video = $(`<video  controls="controls" loop autoplay x5-playsinline="" webkit-playsinline="true" playsinline="true" controlslist="nodownload"  preload="meta" ></video>`)[0]
+                    if(window.isEdit) video.src = manage.dealURL(this.info.texSrc);  //注意,src赋值就会自动加载, preload="meta" 只加载元数据,提高加载速度,否则一开始卡 
                     video.name = this.info.fileName
                 } 
                 
                 
-                
                 video.setAttribute("crossOrigin", 'Anonymous')//要在src设置好前解决跨域
                 
                 $(video).on('contextmenu', function() {
@@ -346,18 +340,23 @@ window.initHot = function(model){
 
                 this.texMedia = video;
                   
-                video.oncanplaythrough = ()=> {
-                    if(this.texMedia == video){
-                        this.material_.map.needsUpdate = !0 
-                        video.play() 
+                video.oncanplaythrough = (e)=> {
+                    if(this.texMedia == video){ 
+                        //console.log('oncanplaythrough',e,this.sid)
+                        //this.material_.map.needsUpdate = !0   //当初为何加这句?
+                        //this.update(player) 
+                         
                     } 
                 }
-                
+                 
+                 
                 
                 video.volume = 0
                 video.muted = true
                 video.currentTime = 0
                 
+                
+                if(!window.isEdit) this.material_.opacity = 0.1;
                 this.material_.map = new THREE.VideoTexture(video) 
                 this.material_.map.wrapS = this.material_.map.wrapT = THREE.ClampToEdgeWrapping;
                 
@@ -371,7 +370,7 @@ window.initHot = function(model){
                     this.material_.map = new THREE.Texture();   //texture也不能共用一个,因为有的会有动画,就不一样
                     this.material_.map.image = media //image可以共用
                     this.material_.map.needsUpdate = !0  
-                    
+                    this.material_.opacity = 1
                 }else{
                     if(!this.info.texSrc)return
                     this._loadDones = []
@@ -395,8 +394,8 @@ window.initHot = function(model){
                 /*  this.material_.map.minFilter = THREE.LinearFilter;
                 this.material_.map.magFilter = THREE.LinearFilter; */
                 dealMap(this.material_.map);
-                this.material_.color.set("#FFFFFF");
-                this.material_.opacity = 1
+                this.material_.color.set("#FFFFFF"); 
+                
                 this.material_.needsUpdate = true
             }
              
@@ -414,7 +413,8 @@ window.initHot = function(model){
             if(styleImg.length){
                 tex1 = Texture.load(styleImg[0].src);
                 tex2 = Texture.load(styleImg[1]&&styleImg[1].src || styleImg[0].src); 
-                
+                dealMap(tex1,{ignoreResize:true}  )
+                dealMap(tex2,{ignoreResize:true}  )
             }else{
                 tex1 = defaultTex1;
                 tex2 = defaultTex2; 
@@ -442,40 +442,7 @@ window.initHot = function(model){
         
         
         
-        
-        
-        
-        /* 
-        actionType: "common"
-        infoAttribute: {images: [], styleImg: [], model: [], video: [], bgName: "background", iframe: [], title: "11",…}
-        bgName: "background"
-        content: "111"
-        iframe: []
-        images: []
-        model: []
-        styleImg: []
-        title: "11"
-        video: []
-        isSprite: 0
-        link: "https://www.4dmodel.com/SuperTwo/hot_online1/index.html#/?m=EDwn769489868"
-        linkType: "common"
-        noAction: 0
-        order: 4
-        position: {x: -4.238, y: 1.32, z: -0.648}
-        rotation: {x: 0, y: 0.018105110200249575, z: 0}
-        transformAtPanos: {}
-        IO4Kq7494332: {actionTy
-
-
-        depth: 0.08
-        file: "https://super.4dage.com/data/TEST/edit/20200805_172635119.mp4"
-        hasBox: 1
-        height: 0.7289
-        media: ["video"]
-        pos: [-5.562, 1.349, 1.994]
-        qua: [0, 0.70672, 0, 0.70749]
-        sid: "1596619585929"
-        transformAtPanos: {,…} */
+       
      
         preDeal(info, source){// source:来源
         
@@ -532,7 +499,7 @@ window.initHot = function(model){
                     info.rotation = new THREE.Euler().setFromVector3(convertValue(info.rotation, THREE.Vector3 ))  //热点的旧数据很多是字符串 
                 }
                  
-                var s = Hot.getDefaulScale(info.hotIconScale)
+                var s = Hot.getDefaulScale(info.hotIconScale) //旧版的大小,统一转换成新版
                 info.scale = new THREE.Vector3(s,s,0.02)    
                
               
@@ -583,6 +550,12 @@ window.initHot = function(model){
                 info.video = info.video  || [] 
                 info.iframe = info.iframe || [] 
                 info.styleImg = info.styleImg || [] 
+                info.imagesDesc = info.imagesDesc || []
+                info.videosDesc = info.videosDesc || []
+                info.titleShowType = info.titleShowType || 'hover'
+                info.titlePos = info.titlePos || 'right'
+                
+                
                 
             }    
             
@@ -741,7 +714,7 @@ window.initHot = function(model){
                     }));
                     
                     if(end>=model.panos.list.length){
-                        console.log(window.hotsi ?(++window.hotsi): (window.hotsi = 1))
+                        //console.log(window.hotsi ?(++window.hotsi): (window.hotsi = 1))
                         clearInterval(interval)
                     }
                 }, Hot.visiEveryDurSlice )// visiEveryDurSlice 等在main中定义
@@ -756,6 +729,7 @@ window.initHot = function(model){
             }
             
             this.visible = visibility != void 0 ? visibility : (!this.info.visiblePanos || !!panos.find(pano=>this.info.visiblePanos.includes(pano.id)))
+            this.titleElem && this.titleElem.setVisible(this.visible, 'hotVisible')
             
             if (this.texType == 'video'){
                 //this.switchPlay(this.visible,  this.visible ? null : 'stop' );//可见时不操作;不可见时停止
@@ -868,26 +842,61 @@ window.initHot = function(model){
                 
                 return this.cornerPoints[player.currentPano.id]
             }
-            
-                
-                 
-            
-            
-            
-            
+              
              
         }
         
         
+        
+        
+        getMediaSize(){
+            let size = new THREE.Vector2;
+            if(this.texMedia){
+                if(this.texType == 'photo'){
+                    size.x = this.texMedia.width;
+                    size.y = this.texMedia.height;
+                    //动画的话再变
+                    if(this.info.animateInfo){
+                        size.x /= this.info.animateInfo.cellXcount
+                        size.y /= this.info.animateInfo.cellYcount
+                    }  
+                }else{
+                    size.x = this.texMedia.videoWidth || this.videoWidth
+                    size.y = this.texMedia.videoHeight || this.videoHeight
+                }
+            }
+            return size
+        }
+         
+        
         inSight(){
             //return true
             if(window.isEdit)return true // 太容易move了
              
-            if(player.mode == 'panorama'){
+            if(player.mode == 'panorama' && player.currentPano){
                 if(!player.camera) return
                   
                 var cornerPointInfo = this.getCornerPoint(); 
                 var cornerPoint
+                
+                 
+                let min = new THREE.Vector2(5,5)
+                let scaleRatio = 1/player.zoomLevel;
+                
+                //根据media原始大小来调整阈值:  media的原始大小能代表期望显示的大小,如果显示大小的远小于期望大小,就不显示(此时能感受到贴图锯齿严重,清晰度被浪费)。比如如果gif是一个很小的按钮,即使diffLon很小也要显示。缺点:需要用户根据所需上传合适清晰度的图。
+           
+                let size = this.getMediaSize()
+                if(size.x>0){
+                    scaleRatio *= Math.sqrt(size.x * size.y) / 1000
+                }
+                min.multiplyScalar(scaleRatio)
+                
+                
+                if(cornerPointInfo.diffLon < min.x || cornerPointInfo.diffLat < min.y ){
+                    //console.log('two far and small')
+                    return false
+                }
+                
                 if(cornerPointInfo.diffLon < 15 && cornerPointInfo.diffLat < 15){//当很小的时候,只判断中心点即可
                     cornerPoint = [cornerPointInfo.cornerPoint[0]];
                 }else{
@@ -902,39 +911,24 @@ window.initHot = function(model){
                 }
                  
             }else{//飞出要判断模型阻挡,有点耗时就算了
-                return true
+                return playVideoWhenFlyOut//true
             }
         }
                 
                 
                 
-        update(player){
-         
-            if(player.mode == 'panorama'){//实时监测播放
-                if(this.texType == "video"){
-                    if(this.visible && !this.pausedByUser && this.inSight()){
-                        this.videoControl(true) 
-                    }else{
-                        this.videoControl(false) 
-                    }
-                }else if(this.info.animateInfo){ 
-                    if(this.visible && this.inSight()){
-                        GifTexDeal.start(this.animation)
-                    }else{
-                        GifTexDeal.stop(this.animation)
-                    } 
-                }
-            }    
-            
+        update(player){  
+              
             if(this.info.isSprite){
                 this.quaternion.copy(player.camera.quaternion)
             }
             
             this.updateScale()
+            this.updateTitle()
         }
                     
         updateScale(e, t) {//自适应调节大小 
-            if(!DATA.autoAdjustHotScale || this.texType != 'shine' )return
+            if(!DATA.autoAdjustHotScale || this.texType != 'shine' || !this.plane )return
             //let renderSize = player.sceneRenderer.renderer.domElement 
             let renderSize = player.sceneRenderer.renderer.getSize()
             
@@ -954,33 +948,62 @@ window.initHot = function(model){
            
         }
         
+        loadVideo(video){
+            if(video.src)return 
+            video.src = manage.dealURL(this.info.texSrc); 
+        }
 
 
         videoControl(state){
             if(this.texType != "video" || !this.material_.map)return
             var video = this.material_.map.image
+            this.shouldPlay = state
+            
             if(!state || state == 'stop'){
                 if(!video.paused){
                     video.pause()
-                    //console.log("pause " + this.sid)
+                    console.log("pause " + this.sid)
                 }
                
                 if(state == 'stop'){
                     video.currentTime = 0; 
-                }
-                 
-                 
+                }  
             }else if(state){
                 if(video.paused){
+                    this.loadVideo(video)
                     video.play()
-                    //console.log("play " + this.sid)                    
+                    this.changeOpaWhenPlay(video)
+                     
+                    console.log("play " + this.sid)                    
                 }                    
                   
             }
         }     
         
         
-                    
+        changeOpaWhenPlay(video){//当播放成功后,恢复为不透明
+            if(isNaN(video.duration)){//未加载好
+                return setTimeout(()=>{
+                    this.changeOpaWhenPlay(video)
+                },100)
+            }
+            const minPlayedTime = Math.min(video.duration/10, 0.1); //到这个时间说明加载成功
+            if(!video.hasInitedOpacity){
+                setTimeout(e=>{ 
+                    if(video.currentTime>minPlayedTime){
+                        this.material_.opacity = 1
+                        video.hasInitedOpacity = true
+                        console.log('changeOpaWhenPlay',this.sid)
+                    }else{
+                        if(!video.paused){//再次尝试
+                            return setTimeout(()=>{
+                                this.changeOpaWhenPlay(video)
+                            },500)
+                        }
+                    }
+                },minPlayedTime*1000+500)
+            }
+        }            
                 
             
             
@@ -988,45 +1011,49 @@ window.initHot = function(model){
             var w = DATA.hotIconScale) * g_HotMeshSize.g_HotMeshWidth
             this.scale.set( w, w, this.scale.z)
         }   */   
-             
-            
-        
-        setTitleElem(){
-            var root = $("#hot");
-            var title = this.info.title;
+           
+           
+        setTitleElem(){ 
+            var title = this.info.title; 
             if(title){
-                if(!this.titleElem){
-                    var elem = $(`<div></div>`)
-                    root.append(elem);
-                    this.titleElem = elem;
-                } 
-                this.titleElem.text(title)
+                if(!this.titleElem){ 
+                    this.titleElem = new Label2D({position:this.position, innerHTML:`<div>${title}</div>`, domElement:$("#hot")[0], shelterByModel:true   })
+                }else{
+                    this.titleElem.elem.html(`<div>${title}</div>`)  
+                }                    
+                this.titleElem.setVisible(this.visible, 'hotVisible')  
+                this.setHoverState(false)
+                this.setTitleDir()
             }else{
                 if(this.titleElem){
-                    this.titleElem.remove()
+                    this.titleElem.dispose()
                     this.titleElem = null;
                 }
             }
-        } 
+        }    
         
         
-        showTitle(){
-            if(!this.titleElem)return;
-            var pos = math.getPos2d(this.position, player.camera, $("#player")[0])
-            if(pos.trueSide){//inSight
-                this.titleElem.css( { "left" : `${pos.pos.x}px`,  "top": `${pos.pos.y}px ` });
-                this.titleElem.css("display","block");
-            }else{
-                this.titleElem.css("display","none");
-            }                
-        } 
         
-        hideTitle(){
-            if(!this.titleElem)return;
-            this.titleElem.css("display","none");
+        setTitleDir(){
+            this.titleElem && this.titleElem.elem.attr('pos',this.info.titlePos)
         }
         
         
+        updateTitle(){ 
+            this.titleElem && this.titleElem.update()
+        }
+        
+        
+        
+        setHoverState(state){ 
+            if(!this.titleElem)return
+            this.hovered = !!state
+            
+            var v = this.info.titleShowType != 'unvisible' && (this.info.titleShowType == 'always' || this.hovered)
+            this.titleElem.setVisible(v, 'hoveredVisi')
+            //this.updateTitle()  
+        }
+        
        
         closestPanoTowardTag(e, t) {
             var i = []
@@ -1073,17 +1100,40 @@ window.initHot = function(model){
                 (pano)=>{//尽量正对hot
                     let dir = new THREE.Vector3(0,0,1).applyQuaternion(this.quaternion)
                     let dir2 = new THREE.Vector3().subVectors(pano.position, this.position).normalize();
-                    let s = dir.dot(dir2) * 10;
+                    let s = dir.dot(dir2) * 60;
                     //console.log(pano.id + ":" + s)
                     return s
-                } 
-            
+                }  
             );
                 
                 
+            /* var tanD = player.domElement.clientWidth / player.domElement.clientHeight * Math.tan((THREE.Math.degToRad(player.zoomFov/2))) ;
+                var goodDistance =  overlay.width / 2 / tanD;
+                n.push(
+                    function (pano) { //寻找正对着overlay的pano
+                        var overlayDir = new THREE.Vector3(0,0,1).applyQuaternion(overlay.quaternion) 
+                        var v1 = overlayDir//.setY(0);  朝上的话set0会得到0,0,0 无法求angle
+                        var v2 = pano.position.clone().sub(overlay.position)//.setY(0)
+                        var angle = v1.angleTo(v2)
+                        angles[pano.id] = angle; 
+                        angle = -angle * 100 
+                        return  angle
+                    },
+                    function (pano) { //寻找正对着overlay的pano
+                        var dis = pano.position.clone().distanceToSquared(overlay.position)
+                        var goodDistance2 = goodDistance * Math.abs(Math.cos(angles[pano.id]))//考虑了倾斜角度后的最佳距离
+                         
+                        var result =  - 300 * Math.abs(dis-goodDistance2) / goodDistance2 //dis和goodDistance2差距越大分数越低
+                        return result; 
+                    } 
+                ) */    
+                
+                
+                
+                
             var s = t.model.panos.sortByScore(i, n);
-             
-            return s && 0 < s.length && s[0].pano
+            console.log(s) 
+            return s && 0 < s.length && s[0].item
         }
          
         
@@ -1092,7 +1142,20 @@ window.initHot = function(model){
         
         examine(options={}) {
             var openHot = this.info.link && this.info.actionType.openHot && !options.dontOpen
-            var needExamine = options.examine || (!settings.dontExamHot && this.info.actionType.examine)  
+            var fastTran = !options.dontFastTran && ( this.info.actionType.fastTran || settings.hotFastTran || options.fastTran)
+            if(fastTran){//瞬间过渡 1到固定方位 2到和普通过渡一样的位置,也就是最适合的位置
+                let info = this.info.cameraData  
+                if(info){
+                    player.blackToPano({
+                        pano: player.model.panos.index[info.pano.uuid],
+                        quaternion: new THREE.Quaternion().fromArray(info.camera.quaternion)
+                    }) 
+                }                
+            }
+            
+            
+            
+            var needExamine = !fastTran && (options.examine || (!settings.dontExamHot && this.info.actionType.examine))
             if(!openHot && !needExamine)return;
             
             
@@ -1217,7 +1280,18 @@ window.initHot = function(model){
                     aimDuration: options.aimDuration,
                     
                 };
-                player.flyToPano(d, done)
+                if(fastTran){
+                    let f = (new THREE.Matrix4).lookAt(c.position, h, new THREE.Vector3(0,1,0));
+                    let quaternion = (new THREE.Quaternion).setFromRotationMatrix(f)
+                    player.blackToPano({
+                        pano:c,
+                        quaternion,
+                    }) 
+                    done()
+                }else{
+                    player.flyToPano(d, done)
+                }
+                
             } else {
                 var p = {
                     pano: c
@@ -1344,12 +1418,14 @@ window.initHot = function(model){
         } */
         
         
-        requestDownload(type,callback) { 
+        requestDownload(type, callback) { 
             var plane = this.plane;
              
             if(type == 'photo'){
-                if(this.photoHasRequestLoad || this.texType != 'photo')return;
-                //console.log('overlay beginDownload : ' + this.sid)
+                if(this.photoHasRequestLoad || this.texType != 'photo'){ 
+                    return; //为什么之前1191需要在这加callback() 才能呢。现在又没事了
+                }
+                //console.log(' beginDownload : ' + this.sid)
                 
                  
                 /* this.material_.map =  */Texture.load(this.info.texSrc, (tex)=>{ 
@@ -1357,7 +1433,9 @@ window.initHot = function(model){
                     if(!tex.image ){
                         return  //只是单纯用了相同src的tex,但image仍未加载完
                     }
-                    if(!this._loadDones)return
+                    if(!this._loadDones){
+                        return  
+                    }
                     dealMap(tex)
                     
                     setTimeout(Hot.loadNext, 50) 
@@ -1391,6 +1469,7 @@ window.initHot = function(model){
                                         }
                                         if(!finded){
                                             let tex_ = tex.clone();
+                                            tex_.needsUpdate = true //clone后不写这句会黑块
                                             animateTexSrcs[e.info.texSrc].set(e.info.animateInfo, tex_)  
                                             e.material_.map = tex_ 
                                         } 
@@ -1418,7 +1497,7 @@ window.initHot = function(model){
                             {
                                 e._loadDones.forEach(a=>a())
                                 e._loadDones = null
-                                e.photoHasRequestLoad = true
+                                //e.photoHasRequestLoad = true  //这句不能加,否则会无法执行callback
                             }
                             e.material_.needsUpdate = true
                             
@@ -1452,7 +1531,15 @@ window.initHot = function(model){
                 
                 this.modelHasRequestLoad = true
             }
-        }            
+        }
+
+
+        dispose(){
+            this.parent.remove(this)
+            this.titleElem && this.titleElem.dispose()
+            delete player.model.hots[this.sid]
+        }
+        
 
     }
     
@@ -1491,10 +1578,11 @@ window.initHot = function(model){
         let count = Hot.maxLoadingCount - loadings.length
         Hot.loadQueue.slice(0, count).forEach(e=>{
             loadings.push(e) 
-            //console.log(e)
+            //console.log('requestDownload', e.hot.info.texSrc)
             e.hot.requestDownload(e.type, ()=>{
                 var i = loadings.indexOf(e)
-                loadings.splice(i,1)
+                //console.log('requestDownloaded index', i)
+                i > -1 && loadings.splice(i,1)
             })
         })
         Hot.loadQueue.splice(0, count) 
@@ -1575,6 +1663,8 @@ window.initHot = function(model){
         else{ 
             Hot.load()
         }
+        
+        setTimeout(Hot.beginShineHot, 1000)
     }
     window.Hot = Hot   
         
@@ -1624,6 +1714,7 @@ window.initHot = function(model){
     
     
     Hot.createHotList = function() {
+        if(!window.DATA.showHotListSta)return
         var docFragment = document.createDocumentFragment();
         var hots = hotGroup.children.filter(hot=>hot.info.actionType.openHot);
         hots = hots.sort((a,b)=>{return a.order - b.order});
@@ -1636,13 +1727,114 @@ window.initHot = function(model){
             li.appendChild(span);
             docFragment.appendChild(li);
              
-        })  
-        var ul = document.querySelector('#hotListContent ul');
-        ul && ul.appendChild(docFragment);
+        }) 
+        setTimeout(()=>{        
+            var ul = document.querySelector('#hotListContent ul');
+            ul && ul.appendChild(docFragment);   
+        },3000) //部分安卓手机的钉钉和支付宝浏览器如果立即添加到列表会卡住 
+       
          
     }
             
-
+    
+    
+    
+    Hot.mobileAutoPlay = function(player){//移动端。不这么写video不会播放 . (2022.11.29: 可为何加了Hot.updateHots之后又会自动播了?https有关?
+        if(browser.isMobile()){
+            hotGroup.children.forEach((hot)=>{  
+                /* if(hot.texType == 'video' && hot.shouldPlay){
+                    console.log(1)
+                } */ 
+                if(!hot.clickToPlayInited && hot.texType == 'video' && hot.material_.map.image.paused && hot.shouldPlay){
+                    //hot.update(player)
+                    //console.log('clickToPlayInited111')
+                    hot.videoControl(true)
+                    
+                    if(!hot.material_.map.image.paused){
+                        console.log('clickToPlayInited')
+                        hot.changeOpaWhenPlay(video)
+                        hot.clickToPlayInited = true 
+                    } 
+                }  
+            }) 
+        }
+        
+    }
+    
+    Hot.updateHots = function(){ 
+        for(var i in player.model.hots){
+            player.model.hots[i].update(player)
+        }
+        
+        if(player.mode != 'panorama' || !player.ready)return
+        
+        common.intervalTool.isWaiting('updateHots', ()=>{ //延时update,防止卡顿
+            let videoCanPlay = [], aniCanPlay = [];
+            for(var i in player.model.hots){
+                 
+                let hot = player.model.hots[i]
+                
+                 
+                {//实时监测播放
+                    if(hot.texType == "video" && !player.flying){ //飞行时不判断
+                        if(hot.visible && !hot.pausedByUser && hot.inSight()){  //注意edit时insight一直为true
+                            //this.videoControl(true)  
+                            videoCanPlay.push(hot)
+                        }else{
+                            hot.videoControl(false) 
+                        }
+                    }else if(hot.info.animateInfo){ 
+                        if(hot.visible && hot.inSight()){
+                            aniCanPlay.push(hot) 
+                        }else{
+                            GifTexDeal.stop(hot.animation)
+                        } 
+                    }
+                } 
+            }                
+            let filter = (type,max,list,playFun)=>{
+                if(list.length < max){
+                    list.forEach(hot=>type == 'video' ? hot.videoControl(true) : GifTexDeal.start(hot.animation))
+                }else{
+                    let r = common.sortByScore(list,[],[(hot)=>{
+                        let score = 0
+                        var cornerPointInfo = hot.getCornerPoint(); //仅支持漫游模式
+                        let pos2dSum = 0    //越接近0越接近屏幕中心
+                        for(let i=1,j=cornerPointInfo.cornerPoint.length;i<j;i++){//忽略第一个点,那是中心点
+                            var pos2d = math.getPos2d(cornerPointInfo.cornerPoint[i], player.camera, $("#player")[0])
+                            if(pos2d.trueSide){
+                                pos2dSum += Math.abs(pos2d.vector.x);
+                                pos2dSum += Math.abs(pos2d.vector.y);
+                            }else{
+                                pos2dSum += 2-Math.abs(pos2d.vector.x); //感觉决定背面的只有x,所以忽略y?  
+                            }  
+                        }
+                        let area = cornerPointInfo.diffLon * cornerPointInfo.diffLat   //占据面积
+                        score = -pos2dSum * (type == 'video' ? 100 : 10) + area  //gif的面积权重增加些,也就是不一定要靠近中心。因为一般而言gif比较小,起指示作用,即使散落在四角也尽量闪烁;而视频要观看的话一般会凑近居于中心
+                        return score
+                    }])
+                    //console.log(r)
+                    r && r.forEach((e,j)=>{
+                        let hot = e.item
+                        if(j<max){
+                            type == 'video' ? hot.videoControl(true) : GifTexDeal.start(hot.animation)
+                        }else{
+                            type == 'video' ? hot.videoControl(false) : GifTexDeal.stop(hot.animation) 
+                        } 
+                    })
+                }
+            }
+            filter('video',playVideoMax, videoCanPlay);
+            filter('animateInfo',playAniMax, aniCanPlay);
+        
+        
+            
+             
+             
+        },  300) 
+        
+    }
+    
 }
 
 
@@ -1665,4 +1857,9 @@ window.initHot = function(model){
     数据速率为1824kbps,720 *576px   时正常
     所以尽量降到2000以下 同时播放个数最好不超过2个 可能需要将src归零  并延迟加载、不自动播放
     
+    
+    
+    
+    有遇到某张图在ios里显示不出,但在ps重新输出后就可以。这张图的dpi高达500,不知道是否与此有关。
+    
      */

+ 119 - 14
js/TransformControls.js

@@ -45,6 +45,9 @@ var TransformControls = function ( camera, domElement, options ) {
 	var _plane = new TransformControlsPlane(options);
 	this.add( _plane );
 
+    /* this.linesAssistance = new TransformControlsLines(options);  //水平 垂直 辅助 
+    this.add( this.linesAssistance ); */
+
 	var scope = this;
 	this.player = options.player;//xzw add
 	this.options = options//xzw add
@@ -174,6 +177,8 @@ var TransformControls = function ( camera, domElement, options ) {
 		this.object = object;
 		this.visible = true;
 		//Config.keyCon = false;//add
+        //this.linesAssistance.setVisible(true)
+        
 		return this;
 
 	};
@@ -185,6 +190,9 @@ var TransformControls = function ( camera, domElement, options ) {
 		this.visible = false;
 		this.axis = null;
 		//Config.keyCon = true;//add
+        
+        //this.linesAssistance.setVisible(false)
+        
 		return this;
 
 	};
@@ -379,9 +387,14 @@ var TransformControls = function ( camera, domElement, options ) {
 			if ( axis.indexOf( 'Z' ) === - 1 ) offset.z = 0;
 
 			if ( space === 'local' && axis !== 'XYZ' ) {
-
+                //xzw 加,否则会反向---------------
+                object.scale.x < 0 && (offset.x *= -1)
+                object.scale.y < 0 && (offset.y *= -1)
+                object.scale.z < 0 && (offset.z *= -1)
+                //---------------------------------
 				offset.applyQuaternion( quaternionStart ).divide( parentScale );
-
+                
+                 
 			} else {
 
 				offset.applyQuaternion( parentQuaternionInv ).divide( parentScale );
@@ -459,13 +472,11 @@ var TransformControls = function ( camera, domElement, options ) {
 
             //add:
              
-            /* if(EditOverlay.editing){
-                EditOverlay.updatePosition();
-            }else */ if(editTool.hotpoint.editSpot){ 
+            if(editTool.hotpoint.editSpot){ 
                 editTool.hotpoint.updateTransform('position');
             }
     
-
+            //this.linesAssistance.updateTransform(this.object)
 
 		} else if ( mode === 'scale' ) {
 
@@ -583,14 +594,12 @@ var TransformControls = function ( camera, domElement, options ) {
 
 				_tempVector.copy( _unit[ axis ] );
 
-				if ( space === 'local' ) {
-
-					_tempVector.applyQuaternion( worldQuaternion );
-
+				if ( space === 'local' ) { 
+					_tempVector.applyQuaternion( worldQuaternion ); 
 				}
 
 				rotationAngle = offset.dot( _tempVector.cross( eye ).normalize() ) * ROTATION_SPEED;
-
+                 
 			}
 
 			// Apply rotation snap
@@ -601,7 +610,8 @@ var TransformControls = function ( camera, domElement, options ) {
 
 			// Apply rotate
 			if ( space === 'local' && axis !== 'E' && axis !== 'XYZE' ) {
-
+                object.scale[axis.toLowerCase()] < 0 && (rotationAngle *= -1) //xzw 加,否则会反向 
+                 
 				object.quaternion.copy( quaternionStart );
 				object.quaternion.multiply( _tempQuaternion.setFromAxisAngle( rotationAxis, rotationAngle ) ).normalize();
 
@@ -641,17 +651,24 @@ var TransformControls = function ( camera, domElement, options ) {
 			mouseUpEvent.mode = this.mode;
 			this.dispatchEvent( mouseUpEvent );
 
+            if(this.player.cameraControls.activeControl){
+                //this.player.cameraControls.activeControl.locked = false; //add 
+                this.player.cameraControls.activeControl.pointerDragOn = false //add 
+                this.player.cameraControls.activeControl.enabled = true
+            }
+
+
 		}
 
 		this.dragging = false;
 
 		if ( pointer.button === undefined ) this.axis = null;
 		
-		if(this.player.cameraControls.activeControl){
+		/* if(this.player.cameraControls.activeControl){
 			//this.player.cameraControls.activeControl.locked = false; //add 
 			this.player.cameraControls.activeControl.pointerDragOn = false //add 
 			this.player.cameraControls.activeControl.enabled = true
-		}
+		} */
 		 
 	};
 
@@ -1617,6 +1634,84 @@ var TransformControlsGizmo = function (options) {
 
 };
 
+ 
+ 
+ 
+/* var TransformControlsLines = function (options) {
+    
+     Object3D.call( this)
+     
+     let label1 = new Label2D({ innerHTML:`<div>与相机水平距离</div>` , domElement:$("#otherLabels")[0] ,autoUpdate:true  })
+     let label2 = new Label2D({ innerHTML:`<div>与相机高度差</div>` , domElement:$("#otherLabels")[0] ,autoUpdate:true  })
+     
+     let css = {'opacity': 0.7, 'color': '#07fceb',  transform:'translate(-50%, -50%)'}
+     label1.elem.css(css); 
+     label2.elem.css(css)
+    
+    
+     //for(let i=0;i<2;i++){
+     //   let line = LineDraw.createLine([new THREE.Vector3, new THREE.Vector3],{color:'#07fceb', opacity:0.7 })
+     //   this.add(line)
+     //}  
+     
+     
+     this.updateTransform = function(object){
+         
+         object = object || this.parent.object;
+         
+         let A = player.position.clone();  //当前相机位置
+         let B = object.position           //物体位置
+         let C = B.clone().setY(A.y);        //物体在相机的高度的位置
+         let D = A.clone().setY(B.y);    //相机在物体的高度的位置
+         
+         //LineDraw.moveLine(this.children[0], [B, C]) // 垂直线     
+         //LineDraw.moveLine(this.children[1], [D, B]) // 水平线  
+         
+         
+         let dis1 = toPrecision(D.distanceTo(B),1)
+         let dis2 = C.y - B.y   
+         label1.elem.text('与相机水平距离: '+dis1+'米')
+         label2.elem.text('在相机之'+ (dis2>0?'下' : '上') +' :'+ toPrecision(dis2 , 1) +'米')
+         
+         label1.setPos(new THREE.Vector3().addVectors(D,B).multiplyScalar(0.5))
+         label2.setPos(new THREE.Vector3().addVectors(B,C).multiplyScalar(0.5))
+          
+     }
+     
+     this.setVisible = (v,reason)=>{
+         label1.setVisible(v, reason || 'unvisi')
+         label2.setVisible(v, reason || 'unvisi')
+         this.visible = label1.visible
+         if(this.visible){
+             this.updateTransform()
+         }
+     }
+     
+     
+   
+         this.setVisible(false)
+   
+     
+     player.on("mode.changing",(currentMode, mode, pano, duration)=>{  
+        if(mode != 'panorama'){
+            this.setVisible(false, 'isPanorama')
+        }else{
+            this.setVisible(true, 'isPanorama')
+        } 
+     })
+     
+     
+     player.on("flying.started",( )=>{  
+        this.setVisible(false, 'flying')
+     })
+     
+     player.on("flying.ended",( )=>{  
+        this.setVisible(true, 'flying')
+     })
+     
+}
+  */
+
 
 
 var TransformControlsPlane = function (options) {
@@ -1766,6 +1861,16 @@ TransformControls.init = function(THREE){
         isTransformControlsPlane: true
 
     } );
+    
+    /* TransformControlsLines.prototype = Object.assign( Object.create( Object3D.prototype ), {
+
+        constructor: TransformControlsLines,
+
+        isTransformControlsLines: true
+
+    } ); */
+    
+    
     //----------
     
     function PolyhedronBufferGeometry( vertices, indices, radius, detail ) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 780 - 133
js/edit.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 376 - 121
js/main_2020_edit.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2077 - 349
js/main_2020_show.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 809 - 61
js/manage.js