|
@@ -1,25 +1,14 @@
|
|
|
-
|
|
|
//合并热点和展览
|
|
|
-
|
|
|
+g_currentHot = null
|
|
|
|
|
|
window.initHot = function(model){
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
var objLoader = new THREE.OBJLoader()
|
|
|
var _planeGeometry = new THREE.PlaneGeometry(1,1)
|
|
|
var _boxGeometry = new THREE.BoxBufferGeometry(1,1,1)
|
|
|
{//ie的mesh 加了polygonOffset也是会重叠。所以去掉前面的face: (但是突然ie又播放不了videoTexture)
|
|
|
var newIndex = [..._boxGeometry.index.array]
|
|
|
- newIndex.splice(4 * 6, 6)
|
|
|
+ newIndex.splice(4 * 6, 12)
|
|
|
_boxGeometry.setIndex(new THREE.BufferAttribute(new Uint16Array(newIndex),1))
|
|
|
}
|
|
|
var originPhotoCount = photoLoaded = originModelCount = modelLoaded = 0;
|
|
@@ -35,10 +24,11 @@ window.initHot = function(model){
|
|
|
var _boxMat = new THREE.MeshPhongMaterial({
|
|
|
color: "#eeeeee",
|
|
|
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"
|
|
|
model.add(hotGroup); model.hotGroup = hotGroup
|
|
|
|
|
@@ -50,7 +40,7 @@ window.initHot = function(model){
|
|
|
, 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
|
|
|
|
|
|
- return src
|
|
|
+ return src.replace('https://www.4dmodel.com/SuperTwo/hot_online1/', 'https://culture.4dage.com/JHSuperTow/')
|
|
|
}
|
|
|
var removeSrcPostMark = function(url){//去除texture.load时自动加上的'?'
|
|
|
var index = url.indexOf('?')
|
|
@@ -136,7 +126,7 @@ window.initHot = function(model){
|
|
|
class Hot extends THREE.Object3D{
|
|
|
constructor(info, source){
|
|
|
super()
|
|
|
-
|
|
|
+
|
|
|
|
|
|
this.sid = info.sid;
|
|
|
this.preDeal(info, source)// source:来源
|
|
@@ -362,10 +352,11 @@ window.initHot = function(model){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //this.hasRequestLoad = true
|
|
|
+
|
|
|
video.volume = 0
|
|
|
video.muted = true
|
|
|
-
|
|
|
+ video.currentTime = 0
|
|
|
+
|
|
|
this.material_.map = new THREE.VideoTexture(video)
|
|
|
this.material_.map.wrapS = this.material_.map.wrapT = THREE.ClampToEdgeWrapping;
|
|
|
|
|
@@ -397,6 +388,7 @@ window.initHot = function(model){
|
|
|
}
|
|
|
this.changeShineTex(this.styleImg)
|
|
|
}
|
|
|
+ this.info.texSrc = null
|
|
|
}
|
|
|
if(this.material_.map){
|
|
|
/* this.material_.map.minFilter = THREE.LinearFilter;
|
|
@@ -428,6 +420,9 @@ window.initHot = function(model){
|
|
|
}
|
|
|
this.changeMaterial(getShineMat(tex1, tex2))
|
|
|
this.styleImg = styleImg
|
|
|
+
|
|
|
+ this.info.styleImg = styleImg.map(img=>img.src)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -591,8 +586,7 @@ window.initHot = function(model){
|
|
|
}
|
|
|
|
|
|
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 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, {
|
|
|
model: model.colliders , posAtPanos
|
|
|
})
|
|
@@ -749,15 +743,15 @@ window.initHot = function(model){
|
|
|
console.log(window.hotsi ?(++window.hotsi): (window.hotsi = 1))
|
|
|
clearInterval(interval)
|
|
|
}
|
|
|
- }, Hot.visiEveryDurSlice )
|
|
|
+ }, Hot.visiEveryDurSlice )// visiEveryDurSlice 等在main中定义
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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)))
|
|
@@ -774,10 +768,10 @@ window.initHot = function(model){
|
|
|
return this.cornerPoints[player.currentPano.id]
|
|
|
}else{
|
|
|
var boundPoint, cornerPoint
|
|
|
+ var center//中心点
|
|
|
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),
|
|
@@ -806,11 +800,11 @@ window.initHot = function(model){
|
|
|
var maxLat = -Infinity
|
|
|
var minLat = +Infinity
|
|
|
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 = { }
|
|
|
player.cameraControls.controls.panorama.lookAt.call( centerDirInfo , null, dir )
|
|
|
-
|
|
|
+
|
|
|
boundPoint.forEach(e=>{//lon左右
|
|
|
var point = e.applyMatrix4(this.mesh.matrixWorld);
|
|
|
var dir = point.clone().sub(pos1).normalize()
|
|
@@ -852,19 +846,18 @@ window.initHot = function(model){
|
|
|
math.getDirByLonLat(minLon, minLat),
|
|
|
math.getDirByLonLat(maxLon, minLat),
|
|
|
math.getDirByLonLat(minLon, maxLat),
|
|
|
- ]
|
|
|
-
|
|
|
+ ]
|
|
|
cornerPoint = dirs.map(e=>{
|
|
|
return e.clone().add(pos1)
|
|
|
})
|
|
|
-
|
|
|
+ cornerPoint = [center, ...cornerPoint] //最后增加一个中心点
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
- if(this.objObject){
|
|
|
+ /* if(this.objObject){
|
|
|
cornerPoint = [pos2, ...cornerPoint]
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
|
|
|
//addPoints(cornerPoint)
|
|
@@ -887,7 +880,7 @@ window.initHot = function(model){
|
|
|
|
|
|
inSight(){
|
|
|
//return true
|
|
|
- if(settings.isEdit)return true // 太容易move了
|
|
|
+ if(window.isEdit)return true // 太容易move了
|
|
|
|
|
|
if(player.mode == 'panorama'){
|
|
|
if(!player.camera) return
|
|
@@ -936,11 +929,22 @@ window.initHot = function(model){
|
|
|
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){//手动播放暂停
|
|
|
this.pausedByUser = !state
|
|
@@ -957,7 +961,7 @@ window.initHot = function(model){
|
|
|
if(!state || state == 'stop'){
|
|
|
if(!video.paused){
|
|
|
video.pause()
|
|
|
- console.log("pause " + this.sid)
|
|
|
+ //console.log("pause " + this.sid)
|
|
|
}
|
|
|
|
|
|
if(state == 'stop'){
|
|
@@ -968,7 +972,7 @@ window.initHot = function(model){
|
|
|
}else if(state){
|
|
|
if(video.paused){
|
|
|
video.play()
|
|
|
- console.log("play " + this.sid)
|
|
|
+ //console.log("play " + this.sid)
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1028,46 +1032,55 @@ window.initHot = function(model){
|
|
|
, n = []
|
|
|
, r = this.mesh.getWorldPosition();
|
|
|
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 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)
|
|
|
- )
|
|
|
+ ) */
|
|
|
}
|
|
|
var a = new THREE.Vector3;
|
|
|
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
|
|
|
- }, function(e) {
|
|
|
+ },
|
|
|
+
|
|
|
+ function(e) {
|
|
|
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)))
|
|
|
, i = window._settings.tags.navigate.tiltTolerance
|
|
|
return window._settings.insideLookLimitDown - i < t && t < window._settings.insideLookLimitUp + i
|
|
|
- },
|
|
|
+ },
|
|
|
+
|
|
|
(pano)=>{ // add
|
|
|
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);
|
|
|
- /* 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
|
|
|
}
|
|
|
|
|
@@ -1110,9 +1123,9 @@ window.initHot = function(model){
|
|
|
exit.style["z-index"] = "3"
|
|
|
exit.onclick = ()=>{
|
|
|
$(div).remove()
|
|
|
- if(g_bgAudio && g_bgAudio.pauseByHot){
|
|
|
- manage.switchBgmState(true)
|
|
|
- }
|
|
|
+
|
|
|
+ Hot.closePopup()
|
|
|
+
|
|
|
}
|
|
|
|
|
|
var myElement = document.createElement("iframe");
|
|
@@ -1126,12 +1139,8 @@ window.initHot = function(model){
|
|
|
div.appendChild(exit);
|
|
|
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");
|
|
|
|
|
|
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() {
|
|
|
player.flyingToTag = !1;
|
|
|
- openHot && window.player.emit('openHotspot', this.sid)
|
|
|
openHot && popup.classList.remove("wait")
|
|
|
}.bind(this);
|
|
|
|
|
@@ -1167,7 +1199,7 @@ window.initHot = function(model){
|
|
|
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();
|
|
|
player.flyingToTag = !0;
|
|
|
|
|
@@ -1286,15 +1318,19 @@ window.initHot = function(model){
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
changeBoxHelperDisplay(show){
|
|
|
- this.visible_ = this.visible
|
|
|
if(show){
|
|
|
+ this.visible_ = this.visible
|
|
|
this.visible = true
|
|
|
this.mesh.boxHelper.visible = true
|
|
|
}else{
|
|
|
- this.visible = this.visible_
|
|
|
+ if(this.visible_ != void 0){
|
|
|
+ this.visible = this.visible_
|
|
|
+ }
|
|
|
this.mesh.boxHelper.visible = false
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1308,33 +1344,39 @@ window.initHot = function(model){
|
|
|
|
|
|
requestDownload(type,callback) {
|
|
|
var plane = this.plane;
|
|
|
+
|
|
|
|
|
|
if(type == 'photo'){
|
|
|
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()
|
|
|
if(!tex.image ){
|
|
|
return //只是单纯用了相同src的tex,但image仍未加载完
|
|
|
}
|
|
|
if(!this._loadDones)return
|
|
|
+ dealMap(tex)
|
|
|
|
|
|
setTimeout(Hot.loadNext, 50)
|
|
|
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_.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
|
|
|
|
|
|
{//animation不同致使的不能使用同一个texture
|
|
|
- if(settings.isEdit){
|
|
|
+ if(window.isEdit){
|
|
|
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
|
|
|
+
|
|
|
}else{
|
|
|
+ e.material_.map = tex
|
|
|
animateTexSrcs[e.info.texSrc] = 1
|
|
|
}
|
|
|
}else{
|
|
@@ -1346,15 +1388,15 @@ window.initHot = function(model){
|
|
|
}
|
|
|
}
|
|
|
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{
|
|
|
let object = new Map();
|
|
|
object.set(e.info.animateInfo, tex)
|
|
|
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 = null
|
|
|
+ e.photoHasRequestLoad = 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
|
|
|
|
|
@@ -1420,7 +1463,7 @@ window.initHot = function(model){
|
|
|
}
|
|
|
|
|
|
Hot.beginShineHot = function(){
|
|
|
- if(!settings.isEdit && shineMats.length == 0)return
|
|
|
+ if(!window.isEdit && shineMats.length == 0)return
|
|
|
|
|
|
|
|
|
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())
|
|
|
|
|
|
-
|
|
|
+ 可能需要再写一份保存到overlay 给旧场景项目使用
|
|
|
|
|
|
|
|
|
最好后台有针对手机版的做一个压缩。压缩成几个档位。
|