Bladeren bron

修改模型

shaogen1995 3 jaren geleden
bovenliggende
commit
fcfc7f3836

+ 3 - 3
web/public/static/css/css/main.css

@@ -3973,11 +3973,11 @@ a.hasHover:hover, a:active {
 }
 }
 
 
 #drawer.open {
 #drawer.open {
-    height: 130px
+    height: 128px
 }
 }
 
 
 #drawer-container.drawerOpen #drawer.open {
 #drawer-container.drawerOpen #drawer.open {
-    height: 136px
+    height: 128px
 }
 }
 
 
 #drawer.open.fadeOut {
 #drawer.open.fadeOut {
@@ -3985,7 +3985,7 @@ a.hasHover:hover, a:active {
 }
 }
 
 
 #drawer.open.noScroll {
 #drawer.open.noScroll {
-    height: 107px
+    height: 128px
 }
 }
 
 
 #drawer-container.drawerOpen #drawer.open.noScroll, #drawer.open.noScroll.playing {
 #drawer-container.drawerOpen #drawer.open.noScroll, #drawer.open.noScroll.playing {

+ 9 - 6
web/public/static/css/main.css

@@ -2468,9 +2468,9 @@ body, html {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     position: absolute;
     position: absolute;
-    background-image:url('../images/bg.jpg');
+    /* background-image:url('../images/bg.jpg');
     background-size:auto 100%;
     background-size:auto 100%;
-    background-position:center;
+    background-position:center; */
 }
 }
 
 
 #player canvas {
 #player canvas {
@@ -3962,11 +3962,11 @@ a.hasHover:hover, a:active {
 }
 }
 
 
 #drawer.open {
 #drawer.open {
-    height: 130px
+    height: 128px
 }
 }
 
 
 #drawer-container.drawerOpen #drawer.open {
 #drawer-container.drawerOpen #drawer.open {
-    height: 136px
+    height: 128px
 }
 }
 
 
 #drawer.open.fadeOut {
 #drawer.open.fadeOut {
@@ -3978,7 +3978,7 @@ a.hasHover:hover, a:active {
 }
 }
 
 
 #drawer-container.drawerOpen #drawer.open.noScroll, #drawer.open.noScroll.playing {
 #drawer-container.drawerOpen #drawer.open.noScroll, #drawer.open.noScroll.playing {
-    height: 143px
+    height: 128px
 }
 }
 
 
 #gui .pinBottom.open {
 #gui .pinBottom.open {
@@ -4054,6 +4054,10 @@ a.hasHover:hover, a:active {
 }
 }
 
 
 .frame .slidee li .overlay {
 .frame .slidee li .overlay {
+    position: absolute;
+    left: 50%;
+    bottom: -26px;
+    transform: translateX(-50%);
     height: 28px;
     height: 28px;
     line-height: 28px;
     line-height: 28px;
     padding: 0;
     padding: 0;
@@ -4062,7 +4066,6 @@ a.hasHover:hover, a:active {
     white-space: nowrap;
     white-space: nowrap;
     text-align: center;
     text-align: center;
     z-index: 100;
     z-index: 100;
-    transform: translate3d(0, 0, 0)
 }
 }
 
 
 .frame .slidee li .mark360View, .frame .slidee li .markInsideView {
 .frame .slidee li .mark360View, .frame .slidee li .markInsideView {

+ 194 - 104
web/public/static/js/Hot.js

@@ -1,25 +1,14 @@
- 
 //合并热点和展览 
 //合并热点和展览 
-
+g_currentHot = null
 
 
 window.initHot = function(model){
 window.initHot = function(model){
-    
-    
-    
-
-    
-    
-    
-    
-    
-    
-    
+      
     var objLoader = new THREE.OBJLoader()    
     var objLoader = new THREE.OBJLoader()    
     var _planeGeometry = new THREE.PlaneGeometry(1,1)
     var _planeGeometry = new THREE.PlaneGeometry(1,1)
     var _boxGeometry = new THREE.BoxBufferGeometry(1,1,1)
     var _boxGeometry = new THREE.BoxBufferGeometry(1,1,1)
     {//ie的mesh 加了polygonOffset也是会重叠。所以去掉前面的face:  (但是突然ie又播放不了videoTexture)
     {//ie的mesh 加了polygonOffset也是会重叠。所以去掉前面的face:  (但是突然ie又播放不了videoTexture)
         var newIndex = [..._boxGeometry.index.array]
         var newIndex = [..._boxGeometry.index.array]
-        newIndex.splice(4 * 6, 6)
+        newIndex.splice(4 * 6, 12)
         _boxGeometry.setIndex(new THREE.BufferAttribute(new Uint16Array(newIndex),1))
         _boxGeometry.setIndex(new THREE.BufferAttribute(new Uint16Array(newIndex),1))
     }
     }
     var originPhotoCount = photoLoaded = originModelCount = modelLoaded = 0;
     var originPhotoCount = photoLoaded = originModelCount = modelLoaded = 0;
@@ -35,10 +24,11 @@ window.initHot = function(model){
     var _boxMat = new THREE.MeshPhongMaterial({ 
     var _boxMat = new THREE.MeshPhongMaterial({ 
         color: "#eeeeee",
         color: "#eeeeee",
         transparent: !0,
         transparent: !0,
-        opacity: 0.8
+        opacity: 0.8,
+        side:THREE.DoubleSide
     })
     })
     
     
-
+    var autoSizeInfo = {minSize : 120,  maxSize : 600,   nearBound : 1 , farBound :  15}
     var hotGroup = new THREE.Object3D;  hotGroup.name = "hotGroup"
     var hotGroup = new THREE.Object3D;  hotGroup.name = "hotGroup"
     model.add(hotGroup);   model.hotGroup = hotGroup
     model.add(hotGroup);   model.hotGroup = hotGroup
     
     
@@ -50,7 +40,7 @@ window.initHot = function(model){
           , o = "en" == manage.number("lang") ? "&lang=" + manage.number("lang") : "";
           , o = "en" == manage.number("lang") ? "&lang=" + manage.number("lang") : "";
         -1 == r.indexOf("?") ? src = link + "?time=" + randomTime().getTime() + "&id=" + window.number + o : src = link + "&time=" + randomTime().getTime() + "&id=" + window.number + o 
         -1 == r.indexOf("?") ? src = link + "?time=" + randomTime().getTime() + "&id=" + window.number + o : src = link + "&time=" + randomTime().getTime() + "&id=" + window.number + o 
             
             
-        return src 
+         return src.replace('https://www.4dmodel.com/SuperTwo/hot_online1/', 'https://culture.4dage.com/JHSuperTow/')    
     }
     }
     var removeSrcPostMark = function(url){//去除texture.load时自动加上的'?'
     var removeSrcPostMark = function(url){//去除texture.load时自动加上的'?'
         var index = url.indexOf('?')
         var index = url.indexOf('?')
@@ -136,7 +126,7 @@ window.initHot = function(model){
     class Hot extends THREE.Object3D{
     class Hot extends THREE.Object3D{
         constructor(info, source){    
         constructor(info, source){    
             super()
             super()
-            
+             
             
             
             this.sid = info.sid;
             this.sid = info.sid;
             this.preDeal(info, source)// source:来源
             this.preDeal(info, source)// source:来源
@@ -362,10 +352,11 @@ window.initHot = function(model){
                     } 
                     } 
                 }
                 }
                 
                 
-                //this.hasRequestLoad = true
+                
                 video.volume = 0
                 video.volume = 0
                 video.muted = true
                 video.muted = true
-               
+                video.currentTime = 0
+                
                 this.material_.map = new THREE.VideoTexture(video) 
                 this.material_.map = new THREE.VideoTexture(video) 
                 this.material_.map.wrapS = this.material_.map.wrapT = THREE.ClampToEdgeWrapping;
                 this.material_.map.wrapS = this.material_.map.wrapT = THREE.ClampToEdgeWrapping;
                 
                 
@@ -397,6 +388,7 @@ window.initHot = function(model){
                     }
                     }
                     this.changeShineTex(this.styleImg)
                     this.changeShineTex(this.styleImg)
                 }
                 }
+                this.info.texSrc = null
             }
             }
             if(this.material_.map){
             if(this.material_.map){
                 /*  this.material_.map.minFilter = THREE.LinearFilter;
                 /*  this.material_.map.minFilter = THREE.LinearFilter;
@@ -428,6 +420,9 @@ window.initHot = function(model){
             } 
             } 
             this.changeMaterial(getShineMat(tex1, tex2)) 
             this.changeMaterial(getShineMat(tex1, tex2)) 
             this.styleImg = styleImg
             this.styleImg = styleImg
+            
+            this.info.styleImg = styleImg.map(img=>img.src)
+            
         }
         }
         
         
         
         
@@ -591,8 +586,7 @@ window.initHot = function(model){
             }    
             }    
             
             
             if(info.texSrc){
             if(info.texSrc){
-                if(manage.removeSrcPostMark) info.texSrc = manage.removeSrcPostMark(info.texSrc)
-                
+                info.texSrc = manage.removeSrcPostMark(info.texSrc)
             }
             }
                          
                          
                 
                 
@@ -726,7 +720,7 @@ window.initHot = function(model){
              
              
             let maxCount = browser.isMobile() ? 2000 : 5000
             let maxCount = browser.isMobile() ? 2000 : 5000
             let c = model.panos.list.length * model.colliders.length
             let c = model.panos.list.length * model.colliders.length
-            if(settings.isEdit || c < maxCount){  
+            if(window.isEdit ||  c < maxCount){  //编辑页面保险起见还是全部算完后才可浏览,就能保证保存全部的visiblePano
                 this.info.visiblePanos = common.getVisiblePano(customPositions,  model.panos.list, {
                 this.info.visiblePanos = common.getVisiblePano(customPositions,  model.panos.list, {
                     model: model.colliders , posAtPanos  
                     model: model.colliders , posAtPanos  
                 })  
                 })  
@@ -749,15 +743,15 @@ window.initHot = function(model){
                         console.log(window.hotsi ?(++window.hotsi): (window.hotsi = 1))
                         console.log(window.hotsi ?(++window.hotsi): (window.hotsi = 1))
                         clearInterval(interval)
                         clearInterval(interval)
                     }
                     }
-                }, Hot.visiEveryDurSlice ) 
+                }, Hot.visiEveryDurSlice )// visiEveryDurSlice 等在main中定义
             }
             }
             
             
         }
         }
         
         
             
             
         updateVisible(panos, visibility) { 
         updateVisible(panos, visibility) { 
-            if(settings.isEdit && editTool.hotpoint.editSpot == this){
-                return true
+            if(window.isEdit && editTool.hotpoint.editSpot == this){
+                return this.visible = true
             }
             }
             
             
             this.visible = visibility != void 0 ? visibility : (!this.info.visiblePanos || !!panos.find(pano=>this.info.visiblePanos.includes(pano.id)))
             this.visible = visibility != void 0 ? visibility : (!this.info.visiblePanos || !!panos.find(pano=>this.info.visiblePanos.includes(pano.id)))
@@ -774,10 +768,10 @@ window.initHot = function(model){
                 return this.cornerPoints[player.currentPano.id]
                 return this.cornerPoints[player.currentPano.id]
             }else{
             }else{
                 var boundPoint,  cornerPoint
                 var boundPoint,  cornerPoint
+                var center//中心点
                 if(this.plane){ 
                 if(this.plane){ 
-                    var center = this.plane.position.clone()
-                    boundPoint = [
-                        center,
+                    center = this.plane.getWorldPosition()
+                    boundPoint = [ 
                         new THREE.Vector3(-0.5, 0.5, 0),
                         new THREE.Vector3(-0.5, 0.5, 0),
                         new THREE.Vector3(0.5, 0.5, 0),
                         new THREE.Vector3(0.5, 0.5, 0),
                         new THREE.Vector3(0.5, -0.5, 0),
                         new THREE.Vector3(0.5, -0.5, 0),
@@ -806,11 +800,11 @@ window.initHot = function(model){
                 var maxLat = -Infinity
                 var maxLat = -Infinity
                 var minLat = +Infinity
                 var minLat = +Infinity
                 var pos1 = player.currentPano.position.clone();
                 var pos1 = player.currentPano.position.clone();
-                var pos2 = this.position.clone()
-                var dir = pos2.clone().sub(pos1).normalize()
+                center = this.position.clone()  //模型bound的中心点已经位移到了hot中心点。 注意不能用getWorldPosition,得到的会是偏移的
+                var dir = center.clone().sub(pos1).normalize()
                 var centerDirInfo = { } 
                 var centerDirInfo = { } 
                 player.cameraControls.controls.panorama.lookAt.call( centerDirInfo , null, dir )
                 player.cameraControls.controls.panorama.lookAt.call( centerDirInfo , null, dir )
-                    
+                     
                 boundPoint.forEach(e=>{//lon左右
                 boundPoint.forEach(e=>{//lon左右
                     var point = e.applyMatrix4(this.mesh.matrixWorld);
                     var point = e.applyMatrix4(this.mesh.matrixWorld);
                     var dir = point.clone().sub(pos1).normalize()
                     var dir = point.clone().sub(pos1).normalize()
@@ -852,19 +846,18 @@ window.initHot = function(model){
                         math.getDirByLonLat(minLon, minLat),
                         math.getDirByLonLat(minLon, minLat),
                         math.getDirByLonLat(maxLon, minLat),
                         math.getDirByLonLat(maxLon, minLat),
                         math.getDirByLonLat(minLon, maxLat),
                         math.getDirByLonLat(minLon, maxLat),
-                    ]
- 
+                    ] 
                     cornerPoint = dirs.map(e=>{
                     cornerPoint = dirs.map(e=>{
                         return e.clone().add(pos1) 
                         return e.clone().add(pos1) 
                     })
                     })
-                       
+                    cornerPoint = [center, ...cornerPoint]   //最后增加一个中心点
                 
                 
                 
                 
                 }
                 }
                 
                 
-                if(this.objObject){
+                /* if(this.objObject){
                     cornerPoint = [pos2, ...cornerPoint]
                     cornerPoint = [pos2, ...cornerPoint]
-                }
+                } */
                 
                 
                 
                 
                 //addPoints(cornerPoint)
                 //addPoints(cornerPoint)
@@ -887,7 +880,7 @@ window.initHot = function(model){
         
         
         inSight(){
         inSight(){
             //return true
             //return true
-            if(settings.isEdit)return true // 太容易move了
+            if(window.isEdit)return true // 太容易move了
              
              
             if(player.mode == 'panorama'){
             if(player.mode == 'panorama'){
                 if(!player.camera) return
                 if(!player.camera) return
@@ -936,11 +929,22 @@ window.initHot = function(model){
                 this.quaternion.copy(player.camera.quaternion)
                 this.quaternion.copy(player.camera.quaternion)
             }
             }
             
             
-            
+
+            this.updateScale()
         }
         }
                     
                     
-                    
-
+            updateScale(e, t) {//自适应调节大小 
+                if(!DATA.autoAdjustHotScale || this.texType != 'shine' )return
+                //let renderSize = player.sceneRenderer.renderer.domElement 
+                let renderSize = player.sceneRenderer.renderer.getSize()
+                
+                var scale = convertTool.getScaleForConstantSize($.extend(autoSizeInfo,{
+                    camera:player.camera,  resolution:{x:renderSize.width, y:renderSize.height},
+                    position: this.position.clone() ,
+                }))
+                this.plane.scale.set(scale,scale,scale)
+                
+            }     
 
 
         switchPlay(state){//手动播放暂停 
         switchPlay(state){//手动播放暂停 
             this.pausedByUser = !state
             this.pausedByUser = !state
@@ -957,7 +961,7 @@ window.initHot = function(model){
             if(!state || state == 'stop'){
             if(!state || state == 'stop'){
                 if(!video.paused){
                 if(!video.paused){
                     video.pause()
                     video.pause()
-                    console.log("pause " + this.sid)
+                    //console.log("pause " + this.sid)
                 }
                 }
                
                
                 if(state == 'stop'){
                 if(state == 'stop'){
@@ -968,7 +972,7 @@ window.initHot = function(model){
             }else if(state){
             }else if(state){
                 if(video.paused){
                 if(video.paused){
                     video.play()
                     video.play()
-                    console.log("play " + this.sid)                    
+                    //console.log("play " + this.sid)                    
                 }                    
                 }                    
                   
                   
             }
             }
@@ -1028,46 +1032,55 @@ window.initHot = function(model){
               , n = []
               , n = []
               , r = this.mesh.getWorldPosition();
               , r = this.mesh.getWorldPosition();
             if (e === "panorama") {
             if (e === "panorama") {
-                var o = t.position.clone().sub(r).normalize();
-                n.push(function(t, i) {//scoreFunctions.direction
+                /* var o = t.position.clone().sub(r).normalize();
+                n.push(function(t, i) {//scoreFunctions.direction 最好这个漫游点在currentPano到热点之间的路径上。但是这样的话可能就看不到热点正面,所以删掉
                     return function(e) {
                     return function(e) {
-                        return e.position.clone().sub(t).normalize().dot(i) * window._settings.navigation.directionFactor
+                        return e.position.clone().sub(t).normalize().dot(i) * window._settings.navigation.directionFactor 
                     }}(r, o)
                     }}(r, o)
-                )
+                ) */  
             }
             }
             var a = new THREE.Vector3;
             var a = new THREE.Vector3;
             i.push(function(e) {
             i.push(function(e) {
                     return Math.abs(e.position.x - r.x) > window._settings.tags.visibility.cameraClearance   || Math.abs(e.position.z - r.z) > window._settings.tags.visibility.cameraClearance  
                     return Math.abs(e.position.x - r.x) > window._settings.tags.visibility.cameraClearance   || Math.abs(e.position.z - r.z) > window._settings.tags.visibility.cameraClearance  
-                }, function(e) {
+                },
+
+                function(e) {
                     a.copy(r).sub(e.position);
                     a.copy(r).sub(e.position);
                     var t = -THREE.Math.radToDeg(Math.atan(a.y / Math.sqrt(a.x * a.x + a.z * a.z)))
                     var t = -THREE.Math.radToDeg(Math.atan(a.y / Math.sqrt(a.x * a.x + a.z * a.z)))
                       , i = window._settings.tags.navigate.tiltTolerance 
                       , i = window._settings.tags.navigate.tiltTolerance 
                     return window._settings.insideLookLimitDown - i < t && t < window._settings.insideLookLimitUp + i
                     return window._settings.insideLookLimitDown - i < t && t < window._settings.insideLookLimitUp + i
-                }, 
+                },
+                
                 (pano)=>{ // add
                 (pano)=>{ // add
                     return player.checkHasNeighbor(pano) 
                     return player.checkHasNeighbor(pano) 
-                }
-     
-            ),
-            n.push(  function(t, i) {//scoreFunctions.distanceSquared
-                    return i = i || a.navigation.distanceFactor,
-                    function(e) {
-                        return t ? t.position.distanceToSquared(e.position) * i : 0
+                },
+                
+                (pano)=>{ // add
+                    return this.info.visiblePanos.includes(pano.id)
+                }    
+            )
+            n.push(
+                (function(hot, i) {   //scoreFunctions.distanceSquared
+                    return  function(pano) {
+                        //i = a.navigation.distanceFactor
+                        return hot ? hot.position.distanceToSquared(pano.position) * i : 0
                     }
                     }
-                }(this, -2));
+                })(this, -2)
+                ,
+                
+                (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;
+                    //console.log(pano.id + ":" + s)
+                    return s
+                } 
+            
+            );
+                
+                
             var s = t.model.panos.sortByScore(i, n);
             var s = t.model.panos.sortByScore(i, n);
-            /* if (s && window._settings.tags.navigate.lineOfSight) {
-                for (var l = 0; l < s.length; l++) {
-                    var c = s[l].pano
-                      , h = c.position.distanceTo(r);
-                    p.set(c.position, r.clone().sub(c.position).normalize());
-                    var u = p.intersectObjects(t.model.colliders);
-                    if (0 === u.length || u[0].distance > h)
-                        return console.log(l),
-                        c
-                }
-                return null
-            } */
+            console.log(s)
             return s && 0 < s.length && s[0].pano
             return s && 0 < s.length && s[0].pano
         }
         }
          
          
@@ -1110,9 +1123,9 @@ window.initHot = function(model){
                     exit.style["z-index"] = "3"
                     exit.style["z-index"] = "3"
                     exit.onclick = ()=>{
                     exit.onclick = ()=>{
                         $(div).remove()
                         $(div).remove()
-                        if(g_bgAudio && g_bgAudio.pauseByHot){
-                            manage.switchBgmState(true)
-                        }
+                        
+                        Hot.closePopup()
+                        
                     }  
                     }  
                     
                     
                     var myElement = document.createElement("iframe");
                     var myElement = document.createElement("iframe");
@@ -1126,12 +1139,8 @@ window.initHot = function(model){
                     div.appendChild(exit);
                     div.appendChild(exit);
                     div.appendChild(myElement)
                     div.appendChild(myElement)
                     
                     
+                    SoundManager.play('hot')
                     
                     
-                    if(g_bgAudio && !g_bgAudio.paused){
-                        manage.switchBgmState(false); 
-                        g_bgAudio.pauseByHot = true
-                    } 
-                    if(g_tourAudio)g_tourAudio.pause()
                     
                     
                 }
                 }
                 
                 
@@ -1146,18 +1155,41 @@ window.initHot = function(model){
             var popup = document.getElementById("popup");
             var popup = document.getElementById("popup");
             
             
             if (openHot) {
             if (openHot) {
-                if(g_bgAudio && !g_bgAudio.paused){
-                    manage.switchBgmState(false); 
-                    g_bgAudio.pauseByHot = true
-                } 
-                if(g_tourAudio)g_tourAudio.pause()
+                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";
+                var a = document.getElementById("id1");
+                if (void 0 === a || null == a) {
+                    document.querySelector(".popup-content").appendChild(n);
+                    var s = !1;
+                    window.loaddingSuccess = function() {
+                        s = !0
+                    }
+                    ,
+                    setTimeout(function e() {
+                        if (s) {
+                            var t = document.querySelector("#id1").contentWindow.document;
+                            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()
+                        } else
+                            setTimeout(e, 300)
+                    }, 800)
+                }
             }
             }
             
             
             
             
             
             
             var done = function() {
             var done = function() {
                 player.flyingToTag = !1;
                 player.flyingToTag = !1;
-                openHot &&  window.player.emit('openHotspot', this.sid)
                 openHot && popup.classList.remove("wait")
                 openHot && popup.classList.remove("wait")
             }.bind(this);
             }.bind(this);
         
         
@@ -1167,7 +1199,7 @@ window.initHot = function(model){
                 return;
                 return;
             }
             }
         
         
-            var c = /* m.tags.navigate.nearestPano && */ this.closestPanoTowardTag(player.mode, player.currentPano) || player.currentPano
+            var c = this.closestPanoTowardTag(player.mode, player.currentPano) || player.currentPano
               , h = this.mesh.getWorldPosition();
               , h = this.mesh.getWorldPosition();
             player.flyingToTag = !0;
             player.flyingToTag = !0;
             
             
@@ -1286,15 +1318,19 @@ window.initHot = function(model){
                 }
                 }
             }
             }
         } 
         } 
+        
         changeBoxHelperDisplay(show){
         changeBoxHelperDisplay(show){
-            this.visible_ = this.visible
             if(show){
             if(show){
+                this.visible_ = this.visible
                 this.visible = true
                 this.visible = true
                 this.mesh.boxHelper.visible = true
                 this.mesh.boxHelper.visible = true
             }else{
             }else{
-                this.visible = this.visible_
+                if(this.visible_ != void 0){
+                    this.visible = this.visible_
+                } 
                 this.mesh.boxHelper.visible = false
                 this.mesh.boxHelper.visible = false
             }
             }
+            
         } 
         } 
         
         
         
         
@@ -1308,33 +1344,39 @@ window.initHot = function(model){
         
         
         requestDownload(type,callback) { 
         requestDownload(type,callback) { 
             var plane = this.plane;
             var plane = this.plane;
+             
             
             
             if(type == 'photo'){
             if(type == 'photo'){
                 if(this.photoHasRequestLoad || this.texType != 'photo')return;
                 if(this.photoHasRequestLoad || this.texType != 'photo')return;
-                console.log('overlay beginDownload : ' + this.sid)
-                this.material_.map = Texture.load(this.info.texSrc, (tex)=>{ 
+                //console.log('overlay beginDownload : ' + this.sid)
+                 
+                /* this.material_.map =  */Texture.load(this.info.texSrc, (tex)=>{ 
                     callback && callback()
                     callback && callback()
                     if(!tex.image ){
                     if(!tex.image ){
                         return  //只是单纯用了相同src的tex,但image仍未加载完
                         return  //只是单纯用了相同src的tex,但image仍未加载完
                     }
                     }
                     if(!this._loadDones)return
                     if(!this._loadDones)return
+                    dealMap(tex)
                     
                     
                     setTimeout(Hot.loadNext, 50) 
                     setTimeout(Hot.loadNext, 50) 
                     hotGroup.children.forEach(e=>{
                     hotGroup.children.forEach(e=>{
-                        if(e.info.texSrc == this.info.texSrc){ 
+                        if(e.info.texSrc == this.info.texSrc && e.info.texType == type  ){ 
                             e.material_.color.set("#FFFFFF") 
                             e.material_.color.set("#FFFFFF") 
                             e.material_.opacity = 1;
                             e.material_.opacity = 1;
-                            console.log('overlay loaded: ' + e.sid) 
-                            e.hasRequestLoad = true
+                            console.log('overlay loaded: ' + e.sid + " - " + this.info.texSrc.split('/').pop());
+                        
+                        
+                             
                             e.texMedia = tex.image
                             e.texMedia = tex.image
 
 
                             {//animation不同致使的不能使用同一个texture 
                             {//animation不同致使的不能使用同一个texture 
-                                if(settings.isEdit){
+                                if(window.isEdit){
                                     if(animateTexSrcs[e.info.texSrc]){
                                     if(animateTexSrcs[e.info.texSrc]){
-                                        e.material_.map = new THREE.Texture(); //编辑动画直接不用一个texture, 故而animation也不同
-                                        e.material_.map.image = tex.image
+                                        e.material_.map = tex.clone(); //编辑动画直接不用一个texture, 故而animation也不同
                                         e.material_.map.needsUpdate = true
                                         e.material_.map.needsUpdate = true
+                                        
                                     }else{
                                     }else{
+                                        e.material_.map = tex
                                         animateTexSrcs[e.info.texSrc] = 1
                                         animateTexSrcs[e.info.texSrc] = 1
                                     } 
                                     } 
                                 }else{
                                 }else{
@@ -1346,15 +1388,15 @@ window.initHot = function(model){
                                             }
                                             }
                                         }
                                         }
                                         if(!finded){
                                         if(!finded){
-                                            let tex = new THREE.Texture()  
-                                            animateTexSrcs[e.info.texSrc].set(e.info.animateInfo, tex)  
-                                            e.material_.map = tex
-                                            e.material_.map.image = tex.image  
+                                            let tex_ = tex.clone();
+                                            animateTexSrcs[e.info.texSrc].set(e.info.animateInfo, tex_)  
+                                            e.material_.map = tex_ 
                                         } 
                                         } 
                                     }else{
                                     }else{
                                         let object = new Map(); 
                                         let object = new Map(); 
                                         object.set(e.info.animateInfo, tex) 
                                         object.set(e.info.animateInfo, tex) 
                                         animateTexSrcs[e.info.texSrc] = object//注册第一个texSrc
                                         animateTexSrcs[e.info.texSrc] = object//注册第一个texSrc
+                                        e.material_.map = tex
                                     }
                                     }
                                      
                                      
                                     
                                     
@@ -1374,16 +1416,17 @@ window.initHot = function(model){
                             {
                             {
                                 e._loadDones.forEach(a=>a())
                                 e._loadDones.forEach(a=>a())
                                 e._loadDones = null
                                 e._loadDones = null
+                                e.photoHasRequestLoad = true
                             }
                             }
                             e.material_.needsUpdate = true
                             e.material_.needsUpdate = true
+                            
+                         
+                            
                         }
                         }
                     })
                     })
                     
                     
                 })
                 })
-                this.material_.map.wrapS = this.material_.map.wrapT = THREE.ClampToEdgeWrapping;
-                this.material_.map.minFilter = THREE.LinearFilter;
-                this.material_.map.magFilter = THREE.LinearFilter;
-                this.material_.map.generateMipmaps = true;
+                
 
 
                 this.photoHasRequestLoad = true
                 this.photoHasRequestLoad = true
             
             
@@ -1420,7 +1463,7 @@ window.initHot = function(model){
     }
     }
     
     
     Hot.beginShineHot = function(){  
     Hot.beginShineHot = function(){  
-        if(!settings.isEdit && shineMats.length == 0)return
+        if(!window.isEdit && shineMats.length == 0)return
         
         
         
         
         transitions.trigger({
         transitions.trigger({
@@ -1549,7 +1592,54 @@ window.initHot = function(model){
     }  
     }  
      */
      */
      
      
+    //判断是否是移动端,如果是给关闭按钮添加touchstart事件
+    
+    
+     
     
     
+    Hot.closePopup = ()=>{// 关闭热点页面
+        if(!g_currentHot) return;
+        g_currentHot = null;
+        var hotPop = document.getElementById('popup'); 
+            hotPop.style.display = "none";
+        document.querySelector(".popup-content").removeChild(document.getElementById("id1"));
+        $("#popup iframe:last").remove();
+         
+        
+        SoundManager.pause('hot', true)//自动播放被中断的音频 (bgm
+        
+         
+        return false
+    }  
+        
+ 
+    if(browser.isMobile()){
+        $('#closepop').on("touchstart",Hot.closePopup); 
+    }else{
+        $('#closepop').on("click",Hot.closePopup); 
+    }
+    
+    
+    
+    // Hot.createHotList = function() {
+    //     var docFragment = document.createDocumentFragment();
+    //     var hots = hotGroup.children.filter(hot=>hot.info.actionType.openHot);
+    //     hots = hots.sort((a,b)=>{return a.order - b.order});
+    //     hots.forEach((hot)=>{
+    //         var li = document.createElement('li');
+    //         var span = document.createElement('span');
+    //         span.innerHTML = hot.info.title || '热点';
+    //         // console.log(span.innerHTML);
+    //         li.hot = hot;   // 列表每一项对应一个热点
+    //         li.appendChild(span);
+    //         docFragment.appendChild(li);
+             
+    //     })  
+    //     var ul = document.querySelector('#hotListContent ul');
+    //     ul && ul.appendChild(docFragment);
+         
+    // }
+            
 
 
 }
 }
 
 
@@ -1560,7 +1650,7 @@ window.initHot = function(model){
 
 
     保存 JSON.stringify(editTool.hotpoint.getSavingInfo())
     保存 JSON.stringify(editTool.hotpoint.getSavingInfo())
 
 
-
+    可能需要再写一份保存到overlay 给旧场景项目使用
 
 
 
 
     最好后台有针对手机版的做一个压缩。压缩成几个档位。
     最好后台有针对手机版的做一个压缩。压缩成几个档位。

+ 68 - 0
web/public/static/js/SpecialScene.js

@@ -0,0 +1,68 @@
+//针对客户的需求,给不用的大场景修改
+var SpecialScene = function(){};
+
+SpecialScene.prototype.special = function() {
+    var num = manage.number("m"),that = this;
+    return {
+        //之前执行的代码
+        beforeImplement : function(){
+            
+        },
+        //之后执行的代码
+        afterImplement : function(){
+            switch(num)
+            {
+                case "391":
+                that.data391();
+                break;
+                case "409":
+                that.data412();
+                break;
+                case "410":
+                that.data412();
+                break;
+                case "411":
+                that.data412();
+                break;
+                case "412":
+                that.data412();
+                break;
+                case "413":
+                // that.data413();
+                break;
+                case "415":
+                that.data413();
+                break;
+            }
+        }
+    }
+
+};
+
+SpecialScene.prototype.data412 = function(){
+    $("#myCompany").addClass("JLogo");
+    $("#myCompany").empty().append("<img src=https://super.4dage.com/images/JLogo.png alt=logo style='height: 100%' />");
+    $("#loaderCoBrandName").hide();
+    $("[data-index=all]").text("All");
+    $("[data-index=0]").text("Floor 1");
+    $("[data-index=1]").text("Floor 2");
+}
+
+SpecialScene.prototype.data413 = function(){
+    var btn = '<div class="warpper-LY"><a  target="_blank"  href="http://model3d.4dage.com/3D/2018/model/LY4/index.html">精品鉴赏</a></div>';
+    $("body").append(btn);
+}
+
+SpecialScene.prototype.data391 = function(){
+    var safari = '<link rel="apple-touch-icon" sizes="180x180" href="images/icons/hnrd.jpg" />';
+    $("head").append(safari);
+}
+
+var specialScene = new SpecialScene()
+
+ 
+ 
+/* //本地场景替换前缀
+window.isLocal = true 
+settings.localPrefix =  "https://SUPER.4dage.com/"  
+ */

File diff suppressed because it is too large
+ 21 - 0
web/public/static/js/lib/video.min.js


+ 13 - 81
web/public/static/js/loadCAD.js

@@ -26,78 +26,24 @@ window.grendCAD = (function grendCAD() {
 
 
   function loadDOM($parent) {
   function loadDOM($parent) {
     if (initDOM) return initDOM;
     if (initDOM) return initDOM;
-    let $outerDiv = document.createElement('div')
     let $layer = document.createElement('div')
     let $layer = document.createElement('div')
     let $cad = document.createElement('div')
     let $cad = document.createElement('div')
-    let $jiantou = document.createElement('div')
-    let $jtimg = document.createElement('img')
-    $jtimg.src="static/images/phone_step_05.png"
-    $jiantou.id = 'cadimg'
-
-
 
 
     $layer.className = 'cad'
     $layer.className = 'cad'
-    $jiantou.className = 'jiantou'
-    $outerDiv.className = 'cadouter'
-
     $cad.id = 'cad'
     $cad.id = 'cad'
     $layer.appendChild($cad)
     $layer.appendChild($cad)
-    $jiantou.appendChild($jtimg)
-    $outerDiv.appendChild($layer)
-
-
-    let wh= 200
 
 
 
 
     let style = document.createElement('style')
     let style = document.createElement('style')
     style.innerHTML = `
     style.innerHTML = `
-      .jiantou{
-        display: none!important;
-        position: fixed;
-        width: 40px;
-        height: 50px;
-        right: 40px;
-        background: rgba(0, 0, 0, .6);
-        top: 46px;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        border-radius: 0 5px 5px 0;
-        cursor: pointer;
-      }
-      .jiantou>img{
-        width:30%;
-      }
-      .jiantouactive{
-        right: 0;
-        transform: rotate(180deg);
-      }
-      .cadouter {
-        display: none!important;
-        position: absolute;
-        right: 80px;
-        top: 46px;
-        width: ${wh}px;
-        height: ${wh}px;
-        background: rgba(0, 0, 0, .6);
-        border-radius: 5px 0 5px 5px;
-        overflow: hidden;
-      }
-
-      .cadouteractive{
-        right: 200%;
-        
-      }
-
       .cad {
       .cad {
-        display: none!important;
         position: absolute;
         position: absolute;
-        left: 50%;
-        top: 50%;
-        right:unset;
-        transform: translate(-50%, -50%);
-        width: ${wh*1.4}px;
-        height: ${wh*1.4}px;
+        right: 80px;
+        top: 16px;
+        width: 200px;
+        height: 200px;
+        background: rgba(0, 0, 0, .3);
+        border-radius: 5px;
       }
       }
 
 
       .cad > div {
       .cad > div {
@@ -106,13 +52,10 @@ window.grendCAD = (function grendCAD() {
       }
       }
 
 
       @media only screen and (max-width: 600px) { 
       @media only screen and (max-width: 600px) { 
-        .cadouter,.jiantou{
-          display: none!important;
-        }
         .cad {
         .cad {
             position: absolute;
             position: absolute;
-            left: 16px;
-            top: 65px;
+            right: 15px;
+            top: 50px;
             width: 100px;
             width: 100px;
             height: 100px;
             height: 100px;
             background: rgba(0, 0, 0, .3);
             background: rgba(0, 0, 0, .3);
@@ -122,21 +65,10 @@ window.grendCAD = (function grendCAD() {
     `
     `
 
 
     document.documentElement.appendChild(style)
     document.documentElement.appendChild(style)
-    document.documentElement.appendChild($outerDiv)
-    document.documentElement.appendChild($jiantou)
-
-    
+    $('body').append($layer)
     $parent.appendChild(style)
     $parent.appendChild(style)
-    $parent.appendChild($outerDiv)
-    $parent.appendChild($jiantou)
-
-    $($jiantou).click(()=>{
-      $($jiantou).toggleClass('jiantouactive')
-      $($outerDiv).toggleClass('cadouteractive')
-
-      
-    })
-    return $outerDiv
+    $parent.appendChild($layer)
+    return $layer
   }
   }
 
 
 
 
@@ -199,8 +131,8 @@ window.grendCAD = (function grendCAD() {
   }
   }
 })();
 })();
 
 
-console.log(1111111111111111111,window.number);
 if(window.number==='1151'){
 if(window.number==='1151'){
+
   $.ajax({
   $.ajax({
     url: g_Prefix + "data/" + window.number + "/someData.json" + "?" + Date.now(),
     url: g_Prefix + "data/" + window.number + "/someData.json" + "?" + Date.now(),
     method: 'GET',
     method: 'GET',
@@ -213,7 +145,7 @@ if(window.number==='1151'){
         url: '//super.4dage.com/data/'+ window.number +'/floor.json', 
         url: '//super.4dage.com/data/'+ window.number +'/floor.json', 
         method: 'GET',
         method: 'GET',
         success(res) {
         success(res) {
-          grendCAD(res, document.documentElement, data.cadSignColor, data.cadBorderColor, data.cadBorderWidth)
+          grendCAD(res, document.querySelector('body'), data.cadSignColor, data.cadBorderColor, data.cadBorderWidth)
         }
         }
       })
       })
     }
     }

File diff suppressed because it is too large
+ 406 - 1047
web/public/static/js/main_2020_show.js


File diff suppressed because it is too large
+ 913 - 82
web/public/static/js/manage.js


+ 23 - 3
web/public/static/js/myShow.js

@@ -60,9 +60,29 @@ var g_weixinObj = {
 }
 }
 
 
 var settings = {
 var settings = {
-    overlay:{
-		width:1, height:0.5, depth:0.02
-	}  
+    hotClickEvent:{
+        video:{
+            playAndPause:true,
+            examine:false,
+            openHot:false 
+        },
+        photo:{
+            examine:false,
+            openHot:false 
+        },
+        shine:{
+            examine:true,
+            openHot:true  
+        }
+    },
+    //默认的:
+    teleportTime:  1500,//瞬间过渡的时间 
+    flytimeDistanceMultiplier:150, 
+    flyTime:750, 
+    
+    //dontExamHot:true  
+    transparentBg: false,
+    bgImg:  null 
 }
 }
 if(window.number == '725'||window.number == '724'){
 if(window.number == '725'||window.number == '724'){
     settings.mobileNavHigh = true
     settings.mobileNavHigh = true

+ 30 - 0
web/public/static/js/shiyou.js

@@ -0,0 +1,30 @@
+let SHIYOU = {
+  fn:{
+    clktofade(){
+      $('.welcome').fadeOut()
+    }
+  },
+  bindevents:()=>{
+    $('.welcome > video').bind('ended',()=>{
+      $('.welcome').fadeOut()
+    });
+    $('.jumpvideo').click(()=>{
+      $('.welcome').fadeOut()
+    })
+
+    $('.myBacImg').bind('mousewheel',()=>{
+      return false
+    });
+ 
+    $('.myBacImg').bind('pointermove touchmove',()=>{
+      return false
+    });
+
+    // e.addEventListener("pointermove", this.onPointerMove.bind(this)),
+  },
+  start(){
+    this.bindevents()
+  }
+}
+
+SHIYOU.start()

BIN
web/src/assets/img/topTabBac.jpg


+ 7 - 4
web/src/pages/Home.vue

@@ -164,7 +164,7 @@ export default {
     // 点击显示tab栏
     // 点击显示tab栏
     layTopShow() {
     layTopShow() {
       let temp3 = $(".parent-body .lay_top");
       let temp3 = $(".parent-body .lay_top");
-      temp3.css("height", "90px");
+      temp3.css("height", "120px");
     },
     },
     //点击跳转
     //点击跳转
     jump(url) {
     jump(url) {
@@ -253,10 +253,13 @@ export default {
     transition: all 0.3s;
     transition: all 0.3s;
     display: flex;
     display: flex;
     z-index: 99;
     z-index: 99;
-    position: relative;
+    position: absolute;
+    top: 0;
+    left: 0;
     width: 100%;
     width: 100%;
-    height: 90px;
-    background-color: #b0111e;
+    height: 120px;
+    background: url('../assets/img/topTabBac.jpg') no-repeat;
+    background-size: 100% 90px;
     .login {
     .login {
       margin-right: 100px;
       margin-right: 100px;
       display: flex;
       display: flex;

+ 6 - 1
web/src/views/gui/guide.vue

@@ -18,4 +18,9 @@
                     <div id="progressBar"></div>
                     <div id="progressBar"></div>
                 </div>
                 </div>
             </div>
             </div>
-</template>
+</template>
+<style lang="less" scoped>
+#scrollFrame{
+    overflow: visible !important;
+}
+</style>

+ 1 - 1
web/src/views/gui/loading.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div id="gui-loading" class="message-outer darkGlass" style="display: none;">
+  <div id="gui-loading" class="message-outer darkGlass">
             <h2 class="model-title"></h2>
             <h2 class="model-title"></h2>
             <div class="message-inner">
             <div class="message-inner">
                 <div class="loadingLogo"> 
                 <div class="loadingLogo">