|
|
@@ -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()
|
|
|
}
|