lanxin 4 дней назад
Родитель
Сommit
93f807d584

+ 27 - 23
Scene/public/js/Hot.js

@@ -429,7 +429,7 @@ window.initHot = function (model) {
         {
           let action = CloneObject(settings.hotClickEvent.shine)
           if (info.actionType == 'noAction' || info.noAction) {
-            ;(action.examine = false), (action.openHot = false)
+            ;((action.examine = false), (action.openHot = false))
           } else if (info.actionType == 'dontExam') {
             action.examine = false
           }
@@ -920,21 +920,24 @@ window.initHot = function (model) {
       }
       const minPlayedTime = Math.min(video.duration / 10, 0.1) //到这个时间说明加载成功
       if (!video.hasInitedOpacity) {
-        setTimeout(e => {
-          //console.log('trychangeOpa ',this.sid,video.currentTime)
-          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)
+        setTimeout(
+          e => {
+            //console.log('trychangeOpa ',this.sid,video.currentTime)
+            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)
+          },
+          minPlayedTime * 1000 + 500
+        )
       }
     }
 
@@ -1135,29 +1138,29 @@ window.initHot = function (model) {
       var popup = document.getElementById('popup')
 
       if (openHot) {
-        ;(g_currentHot = this), (popup.style.display = 'block'), popup.classList.add('wait')
+        ;((g_currentHot = this), (popup.style.display = 'block'), popup.classList.add('wait'))
         var n = document.createElement('iframe')
 
         SoundManager.play('hot')
 
         var src = getLink(this.info.link)
         n.src = src
-        ;(n.id = 'id1'), (n.allowTransparency = 'true')
+        ;((n.id = 'id1'), (n.allowTransparency = 'true'))
         var a = document.getElementById('id1')
         if (void 0 === a || null == a) {
           document.querySelector('.popup-content').appendChild(n)
           var s = !1
-          ;(window.loaddingSuccess = function () {
+          ;((window.loaddingSuccess = function () {
             s = !0
           }),
             setTimeout(function e() {
               if (s) {
                 var t = document.querySelector('#id1').contentWindow.document
-                t.querySelector('video') &&
+                ;(t.querySelector('video') &&
                   (t.querySelector('video').play(), !t.querySelector('video').paused && t.querySelector('.playPause') && t.querySelector('.playPause').classList.add('fa-pause')),
-                  t.querySelector('audio') && t.querySelector('audio').play()
+                  t.querySelector('audio') && t.querySelector('audio').play())
               } else setTimeout(e, 300)
-            }, 800)
+            }, 800))
         }
       }
 
@@ -1203,7 +1206,7 @@ window.initHot = function (model) {
           var f = new THREE.Matrix4().lookAt(c.position, h, new THREE.Vector3(0, 1, 0))
           p.quaternion = new THREE.Quaternion().setFromRotationMatrix(f)
         }
-        ;(p.callback = done), (p.duration = options.duration || 1500), (p.mode = 'panorama'), (p.aimDuration = options.aimDuration)
+        ;((p.callback = done), (p.duration = options.duration || 1500), (p.mode = 'panorama'), (p.aimDuration = options.aimDuration))
         player.flyToNewMode(p)
       }
     }
@@ -1542,7 +1545,8 @@ window.initHot = function (model) {
     originModelCount = hotGroup.children.filter(e => !!e.info.objSrc).length
     if (originPhotoCount == 0) Hot.allPhotoLoaded = true
     if (originModelCount == 0) Hot.allModelLoaded = true
-    if (Hot.allModelLoaded && Hot.allPhotoLoaded) Hot.whenAllFileLoaded && Hot.whenAllFileLoaded() //所有加载完毕
+    if (Hot.allModelLoaded && Hot.allPhotoLoaded)
+      Hot.whenAllFileLoaded && Hot.whenAllFileLoaded() //所有加载完毕
     else {
       Hot.load()
     }

+ 38 - 161
Scene/public/js/manage.js

@@ -1,7 +1,4 @@
-var g_ProjectName = window.location.pathname.substring(
-  window.location.pathname.indexOf('/') + 1,
-  window.location.pathname.lastIndexOf('/')
-)
+var g_ProjectName = window.location.pathname.substring(window.location.pathname.indexOf('/') + 1, window.location.pathname.lastIndexOf('/'))
 var g_Prefix = 'https://super.4dage.com/'
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
 var s = window.location.href.split('/')
@@ -76,24 +73,14 @@ window.browser = {
     )
   },
   isFullscreen: function () {
-    return (
-      document.fullscreenElement ||
-      document.mozFullscreenElement ||
-      document.mozFullScreenElement ||
-      document.webkitFullscreenElement ||
-      document.msFullscreenElement
-    )
+    return document.fullscreenElement || document.mozFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement
   },
   valueFromHash: function (e, t) {
     var i = new RegExp('[#&?]' + e + '=([^#&?]*)'),
       n = i.exec(window.location.href)
     if (!n) return t
     var r = n[1]
-    return 'boolean' == typeof t
-      ? 'true' === r || '1' === r
-      : 'number' == typeof t
-      ? parseFloat(r)
-      : window.decodeURIComponent(r)
+    return 'boolean' == typeof t ? 'true' === r || '1' === r : 'number' == typeof t ? parseFloat(r) : window.decodeURIComponent(r)
   },
   urlHasValue: function (key, isGetValue) {
     let querys = window.location.search.substr(1).split('&')
@@ -207,11 +194,7 @@ var toPrecision = function (e, t) {
 var dealMap = (map, o = {}) => {
   //使不resize  when   image is not power of two  ,但缩小时会有锯齿
   if (!o.ignoreResize) {
-    if (
-      !map.image ||
-      !THREE.Math.isPowerOfTwo(map.image.width) ||
-      !THREE.Math.isPowerOfTwo(map.image.height)
-    ) {
+    if (!map.image || !THREE.Math.isPowerOfTwo(map.image.width) || !THREE.Math.isPowerOfTwo(map.image.height)) {
       map.wrapS = map.wrapT = THREE.ClampToEdgeWrapping
       map.minFilter = THREE.LinearFilter
       //map.generateMipmaps = true;
@@ -283,7 +266,7 @@ var LineDraw = {
         opacity: o.opacity != void 0 ? o.opacity : 1
       }
       if (o.deshed) {
-        ;(prop.dashSize = o.dashSize || 0.1), (prop.gapSize = o.gapSize || 0.1)
+        ;((prop.dashSize = o.dashSize || 0.1), (prop.gapSize = o.gapSize || 0.1))
       }
       mat = new THREE[o.deshed ? 'LineDashedMaterial' : 'LineBasicMaterial'](prop)
     }
@@ -354,10 +337,7 @@ var convertTool = {
     /* if(config.isEdit && publicObjectSet.editor.mainDesign.editing){
 			var o = ray.intersectObjects(publicObjectSet.editor.mainDesign.wallMeshes);
 		}else{ */
-    let colliders = player.model.allFloorsVisible
-      ? player.model.colliders
-      : (floorIndex != void 0 ? player.model.floors.index[floorIndex] : player.model.currentFloor)
-          .collider.children
+    let colliders = player.model.allFloorsVisible ? player.model.colliders : (floorIndex != void 0 ? player.model.floors.index[floorIndex] : player.model.currentFloor).collider.children
     //let colliders = (floorIndex == void 0 ) ? player.model.colliders : player.model.floors.index[floorIndex].collider.children
     var o = ray.intersectObjects(colliders)
     //}
@@ -387,19 +367,12 @@ var convertTool = {
 
       var y = info.y
 
-      if (
-        player.mode ==
-        'floorplan' /*  ||  Math.abs(O.x-pos.x)<0.0001 && Math.abs(O.z-pos.z)<0.0001) */
-      ) {
+      if (player.mode == 'floorplan' /*  ||  Math.abs(O.x-pos.x)<0.0001 && Math.abs(O.z-pos.z)<0.0001) */) {
         //intersectPlane和地面平行,无交点
         var x = pos.x,
           z = pos.z
       } else {
-        if (
-          y < player.camera.position.y &&
-          O.y <= A.y /* || y>player.camera.position.y && O.y >= A.y  */
-        )
-          return null //鼠标射线向上。因为相机一定位于地面以上(地面不会抬高到相机上吧?),所以无交点。
+        if (y < player.camera.position.y && O.y <= A.y /* || y>player.camera.position.y && O.y >= A.y  */) return null //鼠标射线向上。因为相机一定位于地面以上(地面不会抬高到相机上吧?),所以无交点。
         if (O.y == A.y) {
           console.log('一样??')
           return
@@ -550,15 +523,14 @@ var convertTool = {
       op.resolution = { x: renderSize.width, y: renderSize.height }
     }
     if (!op.camera) {
-      let camera = player.cameraControls.activeControl
-        ? player.cameraControls.activeControl.camera
-        : player.camera
+      let camera = player.cameraControls.activeControl ? player.cameraControls.activeControl.camera : player.camera
       let camera2 = camera.clone()
       camera2.matrixWorld.copy(player.camera.matrixWorld) //因为其他原因该camera的matrixWorld被还原了,而player.camera的是正确的
       op.camera = camera2
     }
 
-    if (op.width2d) w = op.width2d //如果恒定二维宽度
+    if (op.width2d)
+      w = op.width2d //如果恒定二维宽度
     else {
       //否则考虑上距离,加一丢丢近大远小的效果
       var currentDis, nearBound, farBound
@@ -567,16 +539,14 @@ var convertTool = {
       } else {
         currentDis = op.position.distanceTo(op.camera.position)
       }
-      w =
-        op.maxSize -
-        (op.maxSize - op.minSize) * THREE.Math.smoothstep(currentDis, op.nearBound, op.farBound)
+      w = op.maxSize - (op.maxSize - op.minSize) * THREE.Math.smoothstep(currentDis, op.nearBound, op.farBound)
       //maxSize : mesh要表现的最大像素宽度;   nearBound: 最近距离,若比nearBound近,则使用maxSize
     }
-    i.copy(op.position).project(op.camera), //tag中心在屏幕上的二维坐标
+    ;(i.copy(op.position).project(op.camera), //tag中心在屏幕上的二维坐标
       o.set(op.resolution.x / 2, op.resolution.y / 2, 1).multiply(i), //转化成px   -w/2 到 w/2的范围
       l.set(w / 2, 0, 0).add(o), //加上tag宽度的一半
       c.set(2 / op.resolution.x, 2 / op.resolution.y, 1).multiply(l), //再转回  -1 到 1的范围
-      h.copy(c).unproject(op.camera) //再转成三维坐标,求得tag边缘的位置
+      h.copy(c).unproject(op.camera)) //再转成三维坐标,求得tag边缘的位置
     let halfMeter = h.distanceTo(op.position) //就能得到tag的三维半径
 
     return halfMeter //可能NAN  当相机和position重叠时
@@ -710,12 +680,7 @@ window.expandCommon = function (common) {
 
         for (let i = 0; i < posLength; i++) {
           var B = posB[i]
-          var ray = new THREE.Raycaster(
-            A.clone(),
-            B.clone().sub(A).normalize(),
-            0,
-            A.distanceTo(B) - (options.tolerance || 0)
-          )
+          var ray = new THREE.Raycaster(A.clone(), B.clone().sub(A).normalize(), 0, A.distanceTo(B) - (options.tolerance || 0))
           var o = ray.intersectObjects(options.model || player.model.colliders, true)
 
           if (!o || !o.length) {
@@ -783,8 +748,7 @@ window.expandMath = function (math) {
 //管理js文件 获取modeldata.js 判断是否有特殊的字段,如果有就先加载SpecialScene.js 里面有对特殊场景处理的代码 否则就直接加载main
 
 var Manage = function () {
-  ;(this.weixinURL = 'https://res.wx.qq.com/open/js/jweixin-1.2.0.js'),
-    (this.time = '?' + new Date().getTime())
+  ;((this.weixinURL = 'https://res.wx.qq.com/open/js/jweixin-1.2.0.js'), (this.time = '?' + new Date().getTime()))
   this.loadAudio()
   this.loadWeixin()
 }
@@ -820,8 +784,7 @@ Manage.prototype.LoadJs = function (_files, succes) {
   function loadFile(url, success) {
     if (!FileIsExt(classcodes, url)) {
       var _ThisType = GetFileType(url)
-      var ThisType =
-        _ThisType.indexOf('?') == -1 ? _ThisType : _ThisType.substring(0, _ThisType.indexOf('?'))
+      var ThisType = _ThisType.indexOf('?') == -1 ? _ThisType : _ThisType.substring(0, _ThisType.indexOf('?'))
       var fileObj = null
       if (ThisType == '.js') {
         fileObj = document.createElement('script')
@@ -1297,7 +1260,8 @@ var CloneObject = function (copyObj, result, isSimpleCopy, extraReplace) {
   return result
 }
 var ifSame = function (object1, object2) {
-  if (object1 == object2) return true // 0 != undefined  , 0 == ''
+  if (object1 == object2)
+    return true // 0 != undefined  , 0 == ''
   else if (!object1 || !object2) return false
   else if (object1.constructor != object2.constructor) {
     return false
@@ -1404,12 +1368,7 @@ function initByTHREE(THREE) {
       this.enabled = true
       //draw coverTex
       this.quad.material.uniforms.progress.value = 1
-      sceneRenderer.renderer.render(
-        sceneRenderer.scene,
-        sceneRenderer.camera,
-        this.coverRenderTarget,
-        true
-      )
+      sceneRenderer.renderer.render(sceneRenderer.scene, sceneRenderer.camera, this.coverRenderTarget, true)
       console.log('start111')
     },
     stop: function () {
@@ -1542,12 +1501,7 @@ function initByTHREE(THREE) {
     update(currentFloor) {
       if (!this.position) return
 
-      if (
-        !this.visible &&
-        this.unvisibleReasons.some(e => e.level == 1) &&
-        !this.unvisibleReasons.some(e => e.level > 1)
-      )
-        return
+      if (!this.visible && this.unvisibleReasons.some(e => e.level == 1) && !this.unvisibleReasons.some(e => e.level > 1)) return
       /*
                 规定一下level共四层
                 level3 是notTrueSide层,权重最高。
@@ -1570,20 +1524,13 @@ function initByTHREE(THREE) {
       //判断label是否被模型遮挡,遮挡则消失(如果是漫游模式最好提前计算visiblePanos)
       if (player.mode != 'panorama') {
         currentFloor = currentFloor || player.model.currentFloor
-        if (
-          !player.model.allFloorsVisible &&
-          this.floorIndex != void 0 &&
-          this.floorIndex != currentFloor.floorIndex
-        ) {
+        if (!player.model.allFloorsVisible && this.floorIndex != void 0 && this.floorIndex != currentFloor.floorIndex) {
           this.setVisible(false, 'shelter', 0, null, true)
           //this.elem.css('display','none');	return;
           if (!this.visible) return
         }
 
-        if (
-          this.shelterByModel &&
-          convertTool.ifShelter(this.position, p.vector, player.camera, this.floorIndex)
-        ) {
+        if (this.shelterByModel && convertTool.ifShelter(this.position, p.vector, player.camera, this.floorIndex)) {
           //this.elem.css('display','none');	return;
           this.setVisible(false, 'shelter', 0, null, true)
           if (!this.visible) return
@@ -1642,7 +1589,7 @@ function initByTHREE(THREE) {
       if (o.position instanceof Array) o.position = new THREE.Vector3().fromArray(o.position)
       o.innerHTML = `<div class="room-label" ><a><p><span>${o.title}</span></p></a></div>`
       o.domElement = $('.widgets-doll-labels')[0]
-      ;(o.shelterByModel = true), (o.autoUpdate = true)
+      ;((o.shelterByModel = true), (o.autoUpdate = true))
 
       o.clickFun = () => {
         if (player.roomLebelClickUnabled) return
@@ -1852,8 +1799,7 @@ function initByTHREE(THREE) {
 
       //this.needsUpdate = false
 
-      let camera =
-        player.mode == 'floorplan' ? player.cameraControls.activeControl.camera : player.camera //floorplan 时要用到OrthographicCamera
+      let camera = player.mode == 'floorplan' ? player.cameraControls.activeControl.camera : player.camera //floorplan 时要用到OrthographicCamera
 
       if (!this.fixOrient) {
         let parentQua = this.root.parent.getWorldQuaternion(new THREE.Quaternion())
@@ -1863,10 +1809,7 @@ function initByTHREE(THREE) {
       if (this.sizeInfo) {
         var s = convertTool.getScaleForConstantSize(
           Object.assign({}, this.sizeInfo, {
-            farBound:
-              player.mode == 'floorplan'
-                ? this.sizeInfo.farBoundPlan || this.sizeInfo.farBound
-                : this.sizeInfo.farBound,
+            farBound: player.mode == 'floorplan' ? this.sizeInfo.farBoundPlan || this.sizeInfo.farBound : this.sizeInfo.farBound,
             position: this.root.getWorldPosition(new THREE.Vector3())
           })
         )
@@ -1929,16 +1872,11 @@ function initByTHREE(THREE) {
         textMaxWidth = Math.max(textMaxWidth, textWidth)
       }
 
-      let margin =
-        this.margin || new THREE.Vector2(this.fontsize, Math.max(this.fontsize * 0.4, 10))
+      let margin = this.margin || new THREE.Vector2(this.fontsize, Math.max(this.fontsize * 0.4, 10))
       const lineSpace = (this.fontsize + margin.y) * 0.5
 
       let spriteWidth = 2 * margin.x + textMaxWidth + 2 * this.rectBorderThick
-      let spriteHeight =
-        2 * margin.y +
-        this.fontsize * this.text.length +
-        2 * this.rectBorderThick +
-        lineSpace * (this.text.length - 1)
+      let spriteHeight = 2 * margin.y + this.fontsize * this.text.length + 2 * this.rectBorderThick + lineSpace * (this.text.length - 1)
       context.canvas.width = spriteWidth
       context.canvas.height = spriteHeight
       context.font = this.fontWeight + ' ' + this.fontsize + 'px ' + this.fontface
@@ -1946,58 +1884,21 @@ function initByTHREE(THREE) {
       //canvas原点在左上角
       context.textBaseline = 'alphabetic' //  "middle"  //设置文字基线。当起点y设置为0时,只有该线以下的部分被绘制出来。middle时文字显示一半(但是对该字体所有字的一半,有的字是不一定显示一半的,尤其汉字),alphabetic时是英文字母的那条基线。
       // border color
-      context.strokeStyle =
-        'rgba(' +
-        this.borderColor.r +
-        ',' +
-        this.borderColor.g +
-        ',' +
-        this.borderColor.b +
-        ',' +
-        this.borderColor.a +
-        ')'
+      context.strokeStyle = 'rgba(' + this.borderColor.r + ',' + this.borderColor.g + ',' + this.borderColor.b + ',' + this.borderColor.a + ')'
 
       context.lineWidth = this.rectBorderThick
       // background color
-      context.fillStyle =
-        'rgba(' +
-        this.backgroundColor.r +
-        ',' +
-        this.backgroundColor.g +
-        ',' +
-        this.backgroundColor.b +
-        ',' +
-        this.backgroundColor.a +
-        ')'
-      this.roundRect(
-        context,
-        this.rectBorderThick / 2,
-        this.rectBorderThick / 2,
-        spriteWidth - this.rectBorderThick,
-        spriteHeight - this.rectBorderThick,
-        this.borderRadius
-      )
+      context.fillStyle = 'rgba(' + this.backgroundColor.r + ',' + this.backgroundColor.g + ',' + this.backgroundColor.b + ',' + this.backgroundColor.a + ')'
+      this.roundRect(context, this.rectBorderThick / 2, this.rectBorderThick / 2, spriteWidth - this.rectBorderThick, spriteHeight - this.rectBorderThick, this.borderRadius)
 
-      context.fillStyle =
-        'rgba(' +
-        this.textColor.r +
-        ',' +
-        this.textColor.g +
-        ',' +
-        this.textColor.b +
-        ',' +
-        this.textColor.a +
-        ')'
+      context.fillStyle = 'rgba(' + this.textColor.r + ',' + this.textColor.g + ',' + this.textColor.b + ',' + this.textColor.a + ')'
 
       let y = margin.y
       for (let i = 0; i < this.text.length; i++) {
         //let actualHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent // 当前文本字符串在这个字体下用的实际高度
 
         //文字y向距离从textBaseline向上算
-        let actualBoundingBoxAscent =
-          infos[i].actualBoundingBoxAscent == void 0
-            ? this.fontsize * 0.8
-            : infos[i].actualBoundingBoxAscent //有的流览器没有。只能大概给一个
+        let actualBoundingBoxAscent = infos[i].actualBoundingBoxAscent == void 0 ? this.fontsize * 0.8 : infos[i].actualBoundingBoxAscent //有的流览器没有。只能大概给一个
         y += actualBoundingBoxAscent + expand
         //console.log(actualBoundingBoxAscent)
 
@@ -2006,16 +1907,7 @@ function initByTHREE(THREE) {
         let x = this.rectBorderThick + margin.x + textLeftSpace
         // text color
         if (this.textBorderThick) {
-          context.strokeStyle =
-            'rgba(' +
-            this.textBorderColor.r +
-            ',' +
-            this.textBorderColor.g +
-            ',' +
-            this.textBorderColor.b +
-            ',' +
-            this.textBorderColor.a +
-            ')'
+          context.strokeStyle = 'rgba(' + this.textBorderColor.r + ',' + this.textBorderColor.g + ',' + this.textBorderColor.b + ',' + this.textBorderColor.a + ')'
           context.lineWidth = this.textBorderThick
           context.strokeText(this.text[i], x, y)
         }
@@ -2227,9 +2119,7 @@ function initByTHREE(THREE) {
       let i = arrowCount
 
       while (i > 0) {
-        let pos = from.floorPosition
-          .clone()
-          .add(dir.clone().multiplyScalar(margin / 2 + i * sliceLen))
+        let pos = from.floorPosition.clone().add(dir.clone().multiplyScalar(margin / 2 + i * sliceLen))
         pos.y += settings.markerHeight
         let arrow = createArrow(mat)
         arrow.name = 'arrow:' + from.id + '-' + to.id + '|' + i
@@ -2250,14 +2140,7 @@ function initByTHREE(THREE) {
         mats.default.opacity = opa
         mats.fadeIn.opacity = opa * mats.fadeIn.opacity2
       }
-      transitions.start(
-        transition,
-        arrowInfo.animateDur,
-        updateArrowOpacity,
-        0,
-        easing.easeInOutCubic,
-        'updateArrowOpacity'
-      )
+      transitions.start(transition, arrowInfo.animateDur, updateArrowOpacity, 0, easing.easeInOutCubic, 'updateArrowOpacity')
     }
 
     var fadeInArrow = function () {
@@ -2554,8 +2437,7 @@ var SoundManager = {
       if (object.audio) {
         object.audio.pause()
         object.callback && object.callback(false)
-        object.audio.src &&
-          Log(name + ' 中断音频 ' + '(' + common.getFileNameFromUrl(object.audio.src) + ')')
+        object.audio.src && Log(name + ' 中断音频 ' + '(' + common.getFileNameFromUrl(object.audio.src) + ')')
       }
 
       if (isInterrupt) {
@@ -2612,12 +2494,7 @@ var SoundManager = {
     //处理设备自动播放限制
 
     let play = function () {
-      if (
-        this.currentAudio &&
-        this.currentAudio.audio &&
-        this.currentAudio.src &&
-        this.currentAudio.audio.paused
-      ) {
+      if (this.currentAudio && this.currentAudio.audio && this.currentAudio.src && this.currentAudio.audio.paused) {
         this.currentAudio.audio.play() //一般触屏了都会播放成功,就不识别paused了
 
         this.currentAudio.callback && this.currentAudio.callback(true)

+ 51 - 49
Scene/public/showa/js/myShow.js

@@ -1,69 +1,71 @@
-var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
-var g_Prefix="https://super.4dage.com/";
+var g_ProjectName = window.location.pathname.substring(window.location.pathname.indexOf('/') + 1, window.location.pathname.lastIndexOf('/'))
+var g_Prefix = 'https://super.4dage.com/'
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
-var s = window.location.href.split('/');
-s.pop();
+var s = window.location.href.split('/')
+s.pop()
 //var g_Prefix = s.join('/');
-var g_index=null;
-var g_modeldata=null;
+var g_index = null
+var g_modeldata = null
 
-var g_weixinTitle=null;
+var g_weixinTitle = null
 
-var g_Hots=null;
-var g_HotMeshes=[];
+var g_Hots = null
+var g_HotMeshes = []
 var g_HotMeshSize = {
   g_HotMeshWidth: 0.3,
-  g_HotMeshHeight:0.3
-};
+  g_HotMeshHeight: 0.3
+}
 
 //add表示添加,delete表示删除
-var g_HotStatus=null;
-var g_newHot = [];//存储新加热点
-var g_HotImage= {
-	"point":"https://super.4dage.com/images/4dagePoint2.png",
-	"point2":"https://super.4dage.com/images/4dagePoint.png"
-};	
-var g_saveHot=false;
+var g_HotStatus = null
+var g_newHot = [] //存储新加热点
+var g_HotImage = {
+  point: 'https://super.4dage.com/images/4dagePoint2.png',
+  point2: 'https://super.4dage.com/images/4dagePoint.png'
+}
+var g_saveHot = false
 
-var g_TextColor=0x7777ff;
-var g_Text=null;
-var g_TextPlaneMesh=[];
-var g_TextIconMesh=[];
-var g_TextIcon="./images/text.png";
-var g_SelectTextIndex=null;
-var g_TextShow=null;
-var g_audioPlay=false;
-var g_background=null; 
-var g_roof=null;
+var g_TextColor = 0x7777ff
+var g_Text = null
+var g_TextPlaneMesh = []
+var g_TextIconMesh = []
+var g_TextIcon = './images/text.png'
+var g_SelectTextIndex = null
+var g_TextShow = null
+var g_audioPlay = false
+var g_background = null
+var g_roof = null
 
-var g_data2 = null;//加载的data2.js的内容
-var g_bgAudio=null;//背景音乐
-var g_tourAudio=null;//导览音乐
-var g_play = 1;//表示播放图标状态
-var g_playAudio = null;//当前在播放或当继续播放时应该播放的,是g_bgAudio或g_tourAudio 
-var g_currentHot = null;//当前打开的热点 
+var g_data2 = null //加载的data2.js的内容
+var g_bgAudio = null //背景音乐
+var g_tourAudio = null //导览音乐
+var g_play = 1 //表示播放图标状态
+var g_playAudio = null //当前在播放或当继续播放时应该播放的,是g_bgAudio或g_tourAudio
+var g_currentHot = null //当前打开的热点
 //var g_Texture=null;
 //var g_ChunknameTexture={};   //chunkname和贴图名称对应
-var g_NormalTexture=false;
-var g_SpecularTexture=false;
-var g_DirectionalLight=null;  
-  
-var g_snapShotWidth = 200; //截图下载图片的大小
-var g_snapShotHeight = 140;
+var g_NormalTexture = false
+var g_SpecularTexture = false
+var g_DirectionalLight = null
+
+var g_snapShotWidth = 200 //截图下载图片的大小
+var g_snapShotHeight = 140
 
 //微信分享
 var g_weixinObj = {
-  "title": document.querySelector("head title").innerHTML,
-  "lineLink" : window.location.href,
-  "imgUrl" : "https://www.4dmodel.com/SuperPanoramic/images/weixintitle.jpg",
-  "desc" : "四维时代提供技术支持",
+  title: document.querySelector('head title').innerHTML,
+  lineLink: window.location.href,
+  imgUrl: 'https://www.4dmodel.com/SuperPanoramic/images/weixintitle.jpg',
+  desc: '四维时代提供技术支持'
 }
 
 var settings = {
-    overlay:{
-		width:1, height:0.5, depth:0.02
-	}  
+  overlay: {
+    width: 1,
+    height: 0.5,
+    depth: 0.02
+  }
 }
-if(window.number == '725'||window.number == '724'){
-    settings.mobileNavHigh = true
+if (window.number == '725' || window.number == '724') {
+  settings.mobileNavHigh = true
 }

+ 4 - 2
Scene/src/pages/A2main/index.module.scss

@@ -80,7 +80,7 @@
       //针对第一个按钮
       #play,
       #pause {
-        margin-left: 18px;
+        margin-left: 30px;
       }
     }
 
@@ -367,7 +367,9 @@
         top: 24px;
         font-size: 10px;
         color: #fff;
-        text-shadow: 0 0 5px rgba(253, 251, 178, 0.8), 0 0 10px rgba(253, 251, 178, 0.6);
+        text-shadow:
+          0 0 5px rgba(253, 251, 178, 0.8),
+          0 0 10px rgba(253, 251, 178, 0.6);
       }
       #gui-modes-map {
         border-radius: 25px;

+ 1 - 1
Scene/src/pages/A2main/index.tsx

@@ -113,7 +113,7 @@ function A2main() {
               {/* 鼠标移入 */}
               <div className='hoveImg'>全景漫游</div>
             </div>
-            <div id='play' style={{ marginLeft: '30px' }} className='ui-icon' rel='tooltip' data-original-title='播放' >
+            <div id='play' className='ui-icon' rel='tooltip' data-original-title='播放' >
               {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
               <a style={{ width: '100%', height: '100%' }}>
                 <img src='images/play.png' alt='' />