瀏覽代碼

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/bigSceneEdit_java

tremble 4 年之前
父節點
當前提交
26ab39b82d
共有 8 個文件被更改,包括 331 次插入59803 次删除
  1. 6 2
      css/lzb.css
  2. 29 1
      css/main.css
  3. 2 0
      edit.html
  4. 2 0
      index.html
  5. 36 20
      js/edit.js
  6. 0 59689
      js/mainEdit.js
  7. 126 44
      js/main_2020_edit.js
  8. 130 47
      js/main_2020_show.js

+ 6 - 2
css/lzb.css

@@ -1,4 +1,4 @@
-i {
+i {
     font-style: normal;
 }
 
@@ -683,7 +683,7 @@ ul.MenuOptions li.chosen {
     border-radius: 3px;
     transition: opacity 0.3s;
     background-size: cover;
-    background-position-y: bottom;
+    background-position: 50% 50%;
 }
 
 .hotListSwitch {
@@ -1003,6 +1003,10 @@ ul.MenuOptions li.chosen {
     background-repeat: no-repeat;
     background-position-y: center;
 }
+.toolRight .hotpoint .spotList li .number{
+    color:#828282;
+    margin-right:10px;
+}
  .overlayList li .icon{
      background-image:url(../images/edit/box_video.png);
  }

+ 29 - 1
css/main.css

@@ -7054,4 +7054,32 @@ a.hasHover.tag-link:hover {
     #gui-name {
         font-size: 14px;
     }
-}
+}
+
+
+
+
+
+#hot{ 
+	padding: 0;
+	position: absolute;
+	width: 100%;
+	height: 100%;
+    pointer-events:none; 
+	z-index: 101; 
+}
+#hot>div{
+    position: absolute;
+    z-index: 999;
+    color: #fff;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    border-radius: 5px;
+    background-color: rgba(34, 34, 34, 0.3);
+    display:none;
+    padding:10px;
+    transform:translate(20px, -50%);
+}    
+

+ 2 - 0
edit.html

@@ -100,6 +100,8 @@
                     <!-- 画布区域 -->
                     <div class="webgl-inside">
                         <div class="content">
+                            <div id="hot"> 
+                            </div>
                             <div id="popup">
                                 <div class="popup-content">
 

+ 2 - 0
index.html

@@ -48,6 +48,8 @@
 </head>
 
 <body>
+    <div id="hot"> 
+    </div>
     <div id="popup">
         <div class="popup-content">
 

+ 36 - 20
js/edit.js

@@ -253,9 +253,9 @@ SceneInformation.prototype.init = function (data, data2) {
   let VRSwitch = $('#VRSwitch input');    // VR功能开启
   /***********************************************************************************/
 
-  $(".model-title2").text(data.model.name);
-  $('#pjtName').val(data.model.name);
-  $('#info-summary').val(data.model.summary);
+  $(".model-title2").text(data.name);
+  $('#pjtName').val(data.name);
+  $('#info-summary').val(data.summary);
   //if (data2) $('#weixin-summary').val(data2.weixinDesc);
     $('#weixin-summary').val(data.weixinDesc);
 
@@ -283,7 +283,7 @@ SceneInformation.prototype.init = function (data, data2) {
   if (data.momentTour === 'black') {
     momentTour.prop('checked', true);
   }
-  if (data.showHotListSta && data.showHotListSta != "false") {
+  if (data.showHotListSta) {
     hotListSwitch.prop('checked', true);
   }
   if (data.hotIconScale && parseFloat(data.hotIconScale) <= 1.5 && parseFloat(data.hotIconScale) >= 0.3) {
@@ -301,27 +301,27 @@ SceneInformation.prototype.init = function (data, data2) {
   }
 
   // 热点图片放大
-  if (data.hotImageScale && data.hotImageScale != "false") {
+  if (data.hotImageScale) {
     $hotImageScale[0].checked = true
   }
 
   // 隐藏地面标记
-  if (data.hideFloorMarker && data.hideFloorMarker != "false") {
+  if (data.hideFloorMarker) {
     $hideFloorMarker[0].checked = true
   }
 
   // 隐藏鼠标标记 
-  if (data.hideMouseMarker && data.hideMouseMarker != "false") {
+  if (data.hideMouseMarker) {
     $hideMouseMarker[0].checked = true
   }
 
   //特殊大场景
-  if (data.special === "true" || data.model.special) {
+  if (data.special) {
     $g_specialScene[0].checked = true
   }
 
   //启动二代的数据
-  if (data.vision_version === "1.1.562.17209" || data.model.vision_version) {
+  if (data.vision_version === "1.1.562.17209" || data.vision_version) {
     $twoData[0].checked = true
   }
 
@@ -346,12 +346,14 @@ function initColorElem(data, elem) {
   // 事件监听
   $floorMarkerColor.on('change', function (e) {
     $('#floorMarkerColorTex').attr('placeholder', e.target.value)
+     
   })
   $floorMarkerColorTex.on('blur keydown', function (e) {
     (e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $floorMarkerColor, this);
   })
   $mouseMarkerColor.on('change', function (e) {
     $('#mouseMarkerColorTex').attr('placeholder', e.target.value)
+     
   })
   $mouseMarkerColorTex.on('blur keydown', function (e) {
     (e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $mouseMarkerColor, this);
@@ -392,8 +394,8 @@ function getSeft(seft) {
     } 
 
     var ev = document.createEvent("MouseEvent");//点击截取视图
-    g_snapShotWidth = 240;
-    g_snapShotHeight = 118;
+    g_snapShotWidth = 240*4;
+    g_snapShotHeight = 118*4;
     window.screenSta = 'startScreen';
     ev.initMouseEvent("snapshotBegin", true, true, document.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
     
@@ -497,7 +499,7 @@ Hotpoint.prototype.editHot = function (target) {
   this.hotpointDetail.removeClass("atRight");
 
   $("#hotpointDetail .audio.mediaUpload").find("input").val('');  // 点击编辑导览清空上一次文件
-  var playIcon = '139.159.225.37:85/images/play.png';
+  var playIcon = 'images/play.png';
   var $layout = $("#hotpointDetail")[0];
   $layout.targetDOM = target.closest("li")[0];//closest匹配选择器的第一个祖先元素
   //编辑时将热点列表唯一标识带入,以便后期保存使用识别
@@ -650,6 +652,7 @@ Hotpoint.prototype.addmedia = function () {
     if (ev.target.tagName.toUpperCase() === 'INPUT') {
       fileHandle.call(ev.target)
     }
+     
   })
   $('.edit-fun-images').on('click', function (ev) {
     var $tag = $(ev.target)
@@ -817,7 +820,7 @@ Hotpoint.prototype.addHot = function (that, Hot, fn) {
   }
 }
 //创建热点列表的dom
-Hotpoint.prototype.creatDom = function (data, index) {
+Hotpoint.prototype.createDom = function (data, index) {
   var _index = +index + 1;
    return "<li data-spid=" + data.name + " id=ggg_s" + index + ">" +
     "<div class=icon></div>" +
@@ -830,7 +833,7 @@ Hotpoint.prototype.creatDom = function (data, index) {
 //添加热点列表
 Hotpoint.prototype.addHotList = function (data, index) {
   if (!data) return;
-  this.spotList.children("ul").append(this.creatDom(data, index));
+  this.spotList.children("ul").append(this.createDom(data, index));
   //保存热点信息到热点dom元素中
   var spotList = $(".spotList ul").children("#ggg_s" + index);
   spotList[0].hotAttribute = g_HotMeshes[index];
@@ -925,7 +928,7 @@ Hotpoint.prototype.saveHot = function () {
       args.images = imgUrls
       //获取热点视频所有的路径
       return new Promise(function (resolve, reject) {
-        upload($videos, 'images', resolve)
+        upload($videos, 'videos', resolve)
       })
     }).then(function (videoUrls) {
       args.video = videoUrls
@@ -1047,13 +1050,14 @@ var EditMiuse = function () {
     this.mediaUpload.find("input").val("");
   };
   var that = this;
-  $('#upload-bgm').on('change', function () {
+  $('#upload-bgm').on('change', function (e) { 
     var file = this.files[0];
     uploadMiuse(file, function (rs, file) {
       if (rs.code === 0) {
         that.success(file.name, rs.data)
       }
     })
+    e.target.value = null
   });
   //删除音乐
   this.mediaUpload.on("click", ".delete", function () {
@@ -1080,7 +1084,7 @@ var EditGuide = function () {
  * @description 新增参数data2, 表示data2.js中的数据
  */
 EditGuide.prototype.init = function (data, data2) {
-  this.creatDom(data, data2);
+  this.createDom(data, data2);
   this.addTourMusic();  // 添加导览音乐
   this.tourAudio = data2.tourAudio || {};
   var that = this;
@@ -1123,6 +1127,7 @@ EditGuide.prototype.init = function (data, data2) {
       var choice = confirm("你确定删除吗?");  // 删除导览
       if (choice) {
         $seft.closest('li').remove();
+        reIndexTourList()
       }
       else {
         return false
@@ -1130,6 +1135,7 @@ EditGuide.prototype.init = function (data, data2) {
     }
   }).on("change", function (ev) {
     this.inputDone(ev)
+     ev.target.value = null
   }.bind(this))
   $('.tourList ul input').on('blur', function (ev) {
     this.inputDone(ev)
@@ -1173,9 +1179,16 @@ EditGuide.prototype.init = function (data, data2) {
       }
       _animate(dragingRect, draging);
       _animate(targetRect, target);
+      reIndexTourList()
     }
   }
 }
+function reIndexTourList(){
+    Array.from($(".tourList ul li")).forEach((li,index)=>{
+        $(li).find("div:first-child span").text(index+1);
+    })
+}
+
 
 /**
  * @author fyz 编辑导览数据
@@ -1291,13 +1304,13 @@ EditGuide.prototype.addTourMusic = function () {
  * @param {object} data someData.js中的模型数据
  * @param {object} data2 data2.js中的导览和热点数据
  */
-EditGuide.prototype.creatDom = function (data, data2) {
+EditGuide.prototype.createDom = function (data, data2) {
   var $lis = [];
   var that = this;
   var tourAudio = data2.tourAudio || {};
   data.model.images.forEach(function (i, index) {
     if (i.thumbnail_signed_src) {
-      var $li = $(that.dom(index, i.name, i.thumbnail_signed_src));
+      var $li = $(that.dom(index+1, i.name, i.thumbnail_signed_src));
       $li[0].data = i
       // 挂载当前导览点对应的音频链接
       if (i.sid in tourAudio && tourAudio[i.sid].music && tourAudio[i.sid].music !== '') {
@@ -1434,13 +1447,16 @@ var uploadMiuse = function (file, callback) {
     return false;
   }
   //限制大小不大于8m
-  if (!restrictedSize(file, 8)) {
+  if (!restrictedSize(file, _musicMaxWeight)) {
     return false
   }
 
   uploadFile(file, 'audio', callback);
 }
 
+$(".toolRight .music .itemTitle span").text(`背景音乐 (<${_musicMaxWeight}M)`)
+
+
 
 //上传图片
 function uploadImg(urlData, callback) {

File diff suppressed because it is too large
+ 0 - 59689
js/mainEdit.js


File diff suppressed because it is too large
+ 126 - 44
js/main_2020_edit.js


File diff suppressed because it is too large
+ 130 - 47
js/main_2020_show.js