|
@@ -10,7 +10,7 @@ window.easing = null
|
|
window.lerp = null
|
|
window.lerp = null
|
|
window.transitions = null
|
|
window.transitions = null
|
|
window.browser = null
|
|
window.browser = null
|
|
-window.momentTourBlackNewType = number == 'TEST'//true
|
|
|
|
|
|
+window.momentTourBlackNewType = 0//= number == 'TEST'//true
|
|
|
|
|
|
g_playAudio = null
|
|
g_playAudio = null
|
|
|
|
|
|
@@ -3396,7 +3396,7 @@ window.Modernizr = function(n, e, t) {
|
|
insideFar: 5e3,
|
|
insideFar: 5e3,
|
|
insideLookSpeed: .12,
|
|
insideLookSpeed: .12,
|
|
insideLookLimitUp: 40,
|
|
insideLookLimitUp: 40,
|
|
- insideLookLimitDown: -40,
|
|
|
|
|
|
+ insideLookLimitDown: -90,//-40,
|
|
orthoNear: 1,
|
|
orthoNear: 1,
|
|
orthoFar: 5e3,
|
|
orthoFar: 5e3,
|
|
orthoBase: 10,
|
|
orthoBase: 10,
|
|
@@ -4346,7 +4346,7 @@ window.Modernizr = function(n, e, t) {
|
|
return this.enabled && !this.locked
|
|
return this.enabled && !this.locked
|
|
}
|
|
}
|
|
,
|
|
,
|
|
- n.prototype.lookAt = function(e) {
|
|
|
|
|
|
+ /* n.prototype.lookAt = function(e) {
|
|
var t = this.camera.position.clone().sub(e)
|
|
var t = this.camera.position.clone().sub(e)
|
|
, i = Math.atan(t.z / t.x);
|
|
, i = Math.atan(t.z / t.x);
|
|
i += t.x < 0 ? Math.PI : 0,
|
|
i += t.x < 0 ? Math.PI : 0,
|
|
@@ -4356,6 +4356,20 @@ window.Modernizr = function(n, e, t) {
|
|
, o = Math.atan(t.y / n);
|
|
, o = Math.atan(t.y / n);
|
|
this.lat = -r.Math.radToDeg(o)
|
|
this.lat = -r.Math.radToDeg(o)
|
|
}
|
|
}
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ n.prototype.lookAt = function(aim, dir) {
|
|
|
|
+ var t = dir || this.camera.position.clone().sub(aim); //aim所指点的笛卡尔坐标系
|
|
|
|
+
|
|
|
|
+ var i = Math.atan(t.z / t.x);
|
|
|
|
+ i += t.x < 0 ? Math.PI : 0;
|
|
|
|
+ i += t.x > 0 && t.z < 0 ? 2 * Math.PI : 0;
|
|
|
|
+ this.lon = r.Math.radToDeg(i) + 180;
|
|
|
|
+ var n = Math.sqrt(t.x * t.x + t.z * t.z),
|
|
|
|
+ o = Math.atan(t.y / n);
|
|
|
|
+ this.lat = -r.Math.radToDeg(o);
|
|
|
|
+ }
|
|
|
|
+
|
|
,
|
|
,
|
|
n.prototype.startRotationFrom = function(e, t) {
|
|
n.prototype.startRotationFrom = function(e, t) {
|
|
l.convertScreenPositionToNDC(e, t, this.pointer),
|
|
l.convertScreenPositionToNDC(e, t, this.pointer),
|
|
@@ -5064,9 +5078,9 @@ window.Modernizr = function(n, e, t) {
|
|
if (r.isPano()) {
|
|
if (r.isPano()) {
|
|
|
|
|
|
//var s = 0 === this.destinationItem || e ? u.BLACK : this.nextWarpStyle;
|
|
//var s = 0 === this.destinationItem || e ? u.BLACK : this.nextWarpStyle;
|
|
- //var walk = window.MP_PREFETCHED_MODELDATA.black ? 'black' : 'walk';
|
|
|
|
|
|
+ //var walk = window.DATA.black ? 'black' : 'walk';
|
|
|
|
|
|
- var s = this.getMomentTour(this.destinationItem) //window.MP_PREFETCHED_MODELDATA.momentTour || "walk";
|
|
|
|
|
|
+ var s = this.getMomentTour(this.destinationItem) //window.DATA.momentTour || "walk";
|
|
a1 = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, v.Show, m.Slow, s, true, i, this.actionComplete.bind(this)),
|
|
a1 = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, v.Show, m.Slow, s, true, i, this.actionComplete.bind(this)),
|
|
o = this.arrivedAtDestination.bind(this, !0)
|
|
o = this.arrivedAtDestination.bind(this, !0)
|
|
|
|
|
|
@@ -5338,7 +5352,7 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
,
|
|
,
|
|
n.prototype.getMomentTour = function(destinationItem) {//add
|
|
n.prototype.getMomentTour = function(destinationItem) {//add
|
|
- var wholeMomentTour = window.MP_PREFETCHED_MODELDATA.momentTour || "walk"; //最外层
|
|
|
|
|
|
+ var wholeMomentTour = window.DATA.momentTour || "walk"; //最外层
|
|
|
|
|
|
if(!destinationItem) return wholeMomentTour
|
|
if(!destinationItem) return wholeMomentTour
|
|
else{
|
|
else{
|
|
@@ -6652,7 +6666,7 @@ window.Modernizr = function(n, e, t) {
|
|
BorderRadius(topRadius.bottom,topRadius.top);
|
|
BorderRadius(topRadius.bottom,topRadius.top);
|
|
}
|
|
}
|
|
//判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
|
|
//判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
|
|
- if(window.MP_PREFETCHED_MODELDATA.model.special || window.MP_PREFETCHED_MODELDATA.special){
|
|
|
|
|
|
+ if(window.DATA.model.special || window.DATA.special){
|
|
window.specialScene && specialScene.special().afterImplement();
|
|
window.specialScene && specialScene.special().afterImplement();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -7053,7 +7067,7 @@ window.Modernizr = function(n, e, t) {
|
|
}),
|
|
}),
|
|
m(e, t),
|
|
m(e, t),
|
|
A(e, t),
|
|
A(e, t),
|
|
- e.data.enable_social_sharing && e.data.is_public && Q.share.enabled && (Ce.init(MP_PREFETCHED_MODELDATA.name/* e.data.name */),
|
|
|
|
|
|
+ e.data.enable_social_sharing && e.data.is_public && Q.share.enabled && (Ce.init(window.DATA.name/* e.data.name */),
|
|
Ce.on(Me.OPENED, function() {
|
|
Ce.on(Me.OPENED, function() {
|
|
var e = document.getElementById("share-modal");
|
|
var e = document.getElementById("share-modal");
|
|
return function() {
|
|
return function() {
|
|
@@ -7638,7 +7652,7 @@ window.Modernizr = function(n, e, t) {
|
|
});
|
|
});
|
|
|
|
|
|
/***********************方奕卓 热点列表事件监听 ************************/
|
|
/***********************方奕卓 热点列表事件监听 ************************/
|
|
- if(window.MP_PREFETCHED_MODELDATA.showHotListSta) {
|
|
|
|
|
|
+ if(window.DATA.showHotListSta) {
|
|
$('#hotList').css('display', '');
|
|
$('#hotList').css('display', '');
|
|
$('#hotList').on('click',function(e){
|
|
$('#hotList').on('click',function(e){
|
|
l(e);
|
|
l(e);
|
|
@@ -9022,7 +9036,7 @@ window.Modernizr = function(n, e, t) {
|
|
, D = !1
|
|
, D = !1
|
|
, N = {
|
|
, N = {
|
|
populate: function(e) {
|
|
populate: function(e) {
|
|
- if (n(MP_PREFETCHED_MODELDATA.name, e.coBrand)) {
|
|
|
|
|
|
+ if (n(window.DATA.name, e.coBrand)) {
|
|
if (r(e.description),
|
|
if (r(e.description),
|
|
o(e.contactName, e.phone, e.email, e.formatted_contact_phone),
|
|
o(e.contactName, e.phone, e.email, e.formatted_contact_phone),
|
|
a(e.address),
|
|
a(e.address),
|
|
@@ -14687,7 +14701,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
}catch(e){console.log(e) }
|
|
}catch(e){console.log(e) }
|
|
|
|
|
|
- window.MP_PREFETCHED_MODELDATA = data;
|
|
|
|
|
|
+ window.DATA = data;
|
|
data.model.summary = data.summary
|
|
data.model.summary = data.summary
|
|
data.model.name = data.name
|
|
data.model.name = data.name
|
|
for(let i in data){
|
|
for(let i in data){
|
|
@@ -15088,18 +15102,18 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
|
|
|
|
//czj 判断someData 有没有hoticon字段 修改热点的样式
|
|
//czj 判断someData 有没有hoticon字段 修改热点的样式
|
|
- if (window.MP_PREFETCHED_MODELDATA.hoticon){
|
|
|
|
|
|
+ if (window.DATA.hoticon){
|
|
|
|
|
|
g_HotImage = {
|
|
g_HotImage = {
|
|
- point: window.MP_PREFETCHED_MODELDATA.hoticon.default || "https://super.4dage.com/images/4dagePoint2.png",
|
|
|
|
- point2: window.MP_PREFETCHED_MODELDATA.hoticon.higt || "https://super.4dage.com/images/4dagePoint.png"
|
|
|
|
|
|
+ point: window.DATA.hoticon.default || "https://super.4dage.com/images/4dagePoint2.png",
|
|
|
|
+ point2: window.DATA.hoticon.higt || "https://super.4dage.com/images/4dagePoint.png"
|
|
} ;
|
|
} ;
|
|
}
|
|
}
|
|
//czj 判断someData 有没有backgroundMusic 添加音乐
|
|
//czj 判断someData 有没有backgroundMusic 添加音乐
|
|
- if (window.MP_PREFETCHED_MODELDATA.backgroundMusic) {
|
|
|
|
- if(window.isLocal) g_bgAudio.src = manage.dealURL(window.MP_PREFETCHED_MODELDATA.backgroundMusic) ;
|
|
|
|
- //else g_bgAudio.src = window.MP_PREFETCHED_MODELDATA.backgroundMusic.substr(0,4)=="http" ? window.MP_PREFETCHED_MODELDATA.backgroundMusic : "//" + window.MP_PREFETCHED_MODELDATA.backgroundMusic;
|
|
|
|
- else g_bgAudio.src = window.MP_PREFETCHED_MODELDATA.backgroundMusic
|
|
|
|
|
|
+ if (window.DATA.backgroundMusic) {
|
|
|
|
+ if(window.isLocal) g_bgAudio.src = manage.dealURL(window.DATA.backgroundMusic) ;
|
|
|
|
+ //else g_bgAudio.src = window.DATA.backgroundMusic.substr(0,4)=="http" ? window.DATA.backgroundMusic : "//" + window.DATA.backgroundMusic;
|
|
|
|
+ else g_bgAudio.src = window.DATA.backgroundMusic
|
|
|
|
|
|
$("#volume").show();
|
|
$("#volume").show();
|
|
}else if (g_version === "one"){
|
|
}else if (g_version === "one"){
|
|
@@ -15108,7 +15122,7 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
|
|
|
|
//隐藏公司logo
|
|
//隐藏公司logo
|
|
- if(window.MP_PREFETCHED_MODELDATA.loadlogo){
|
|
|
|
|
|
+ if(window.DATA.loadlogo){
|
|
showLogo();
|
|
showLogo();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -15987,7 +16001,7 @@ window.Modernizr = function(n, e, t) {
|
|
transparent: !0
|
|
transparent: !0
|
|
})
|
|
})
|
|
var sprite = new r.Mesh( geometry, shaderMaterial );
|
|
var sprite = new r.Mesh( geometry, shaderMaterial );
|
|
- var hotIconScale = parseFloat(this.infoAttribute.hotIconScale || window.MP_PREFETCHED_MODELDATA.hotIconScale);
|
|
|
|
|
|
+ var hotIconScale = parseFloat(this.infoAttribute.hotIconScale || window.DATA.hotIconScale);
|
|
sprite.dynamic = true;
|
|
sprite.dynamic = true;
|
|
sprite.position.copy(this.position);
|
|
sprite.position.copy(this.position);
|
|
sprite.quaternion.copy(this.quaternion)
|
|
sprite.quaternion.copy(this.quaternion)
|
|
@@ -16296,7 +16310,7 @@ window.Modernizr = function(n, e, t) {
|
|
},
|
|
},
|
|
|
|
|
|
//判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
|
|
//判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
|
|
- // if(window.MP_PREFETCHED_MODELDATA.special){
|
|
|
|
|
|
+ // if(window.DATA.special){
|
|
// specialScene.special().beforeImplement();
|
|
// specialScene.special().beforeImplement();
|
|
// }
|
|
// }
|
|
|
|
|
|
@@ -17977,7 +17991,7 @@ window.Modernizr = function(n, e, t) {
|
|
this.supportedModes[c.TRANSITIONING] = !0,
|
|
this.supportedModes[c.TRANSITIONING] = !0,
|
|
this.supportsTiles = this.configureTiling(),
|
|
this.supportsTiles = this.configureTiling(),
|
|
// this.supportsVR = t.is_vr,
|
|
// this.supportsVR = t.is_vr,
|
|
- this.supportsVR = window.MP_PREFETCHED_MODELDATA.supportsVR || false//true; // 方奕卓 VR功能可配置
|
|
|
|
|
|
+ this.supportsVR = window.DATA.supportsVR || false//true; // 方奕卓 VR功能可配置
|
|
this.mode = c.DOLLHOUSE,
|
|
this.mode = c.DOLLHOUSE,
|
|
this.size = null,
|
|
this.size = null,
|
|
this.center = null,
|
|
this.center = null,
|
|
@@ -18056,7 +18070,7 @@ window.Modernizr = function(n, e, t) {
|
|
, R = e("../exception/BasicException")
|
|
, R = e("../exception/BasicException")
|
|
, P = (e("../constants")
|
|
, P = (e("../constants")
|
|
,e("events").EventEmitter)
|
|
,e("events").EventEmitter)
|
|
- ,Hot = e("hot")
|
|
|
|
|
|
+ //,Hot = e("hot")
|
|
, O = new g(i);
|
|
, O = new g(i);
|
|
n.prototype = Object.create(o.Object3D.prototype),
|
|
n.prototype = Object.create(o.Object3D.prototype),
|
|
b.extend(n, P),
|
|
b.extend(n, P),
|
|
@@ -18192,25 +18206,28 @@ window.Modernizr = function(n, e, t) {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- n.prototype.createHotItem = function(data, hots) {
|
|
|
|
|
|
+ n.prototype.createHotItem = function() {
|
|
var docFragment = document.createDocumentFragment();
|
|
var docFragment = document.createDocumentFragment();
|
|
- var keyAry = Object.keys(data);
|
|
|
|
- for(var i = 0; i < keyAry.length; i++){
|
|
|
|
- var li = document.createElement('li');
|
|
|
|
- var span = document.createElement('span');
|
|
|
|
- span.innerHTML = data[keyAry[i]].title || data[keyAry[i]].infoAttribute.title || '热点';
|
|
|
|
- // console.log(span.innerHTML);
|
|
|
|
- li.hot = hots[keyAry[i]]; // 列表每一项对应一个热点
|
|
|
|
- li.appendChild(span);
|
|
|
|
- docFragment.appendChild(li);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ this.hotGroup.children.forEach(hot=>{
|
|
|
|
+ if(hot.texType == 'shine'){
|
|
|
|
+ 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');
|
|
var ul = document.querySelector('#hotListContent ul');
|
|
ul.appendChild(docFragment);
|
|
ul.appendChild(docFragment);
|
|
- console.log(docFragment);
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- n.prototype.loadOverlays = function(overlays){
|
|
|
|
|
|
+ /* n.prototype.loadOverlays = function(overlays){
|
|
var overlays = window.data2 && window.data2.overlays
|
|
var overlays = window.data2 && window.data2.overlays
|
|
|
|
|
|
|
|
|
|
@@ -18221,55 +18238,43 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
Overlay.load()
|
|
Overlay.load()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ */
|
|
|
|
|
|
n.prototype.loadhots = function() {//xzw
|
|
n.prototype.loadhots = function() {//xzw
|
|
- var e = $.Deferred();
|
|
|
|
|
|
+ initHot(this)
|
|
|
|
+ var r = $.Deferred();
|
|
var t = g_Prefix+"data/" + this.sid + "/data2.js" +'?'+ randomTime().getTime();
|
|
var t = g_Prefix+"data/" + this.sid + "/data2.js" +'?'+ randomTime().getTime();
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
return a.get(t, {
|
|
return a.get(t, {
|
|
responseType: "json",
|
|
responseType: "json",
|
|
auth: this.isPublic ? null : f.authorizationHeader
|
|
auth: this.isPublic ? null : f.authorizationHeader
|
|
- }).done(function(t) {
|
|
|
|
- window.data2 = t;
|
|
|
|
|
|
+ }).done(function(e) {
|
|
|
|
+ window.data2 = e;
|
|
|
|
|
|
- if(!t){
|
|
|
|
|
|
+ if(!e){
|
|
console.error("data2 is null")
|
|
console.error("data2 is null")
|
|
}else{
|
|
}else{
|
|
- g_data2 = hotMatcher(t);
|
|
|
|
- this.hotsCount = 0;
|
|
|
|
- /* for(var i in t.hots){
|
|
|
|
- this.hotsCount ++;
|
|
|
|
- this.hots[i] = new Hot(i, t.hots[i], this);
|
|
|
|
- t.hots[i].infoAttribute || (t.hots[i].infoAttribute = {})
|
|
|
|
- this.hots[i].initStyleImg(t.hots[i].infoAttribute);
|
|
|
|
- };
|
|
|
|
- window.hotData = t.hots
|
|
|
|
- t.hots && this.createHotItem(t.hots, this.hots); */
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ g_data2 = hotMatcher(e);
|
|
|
|
+ this.hotsCount = 0;
|
|
|
|
|
|
//因为热点保存后在hots里的顺序会被修改,所以使用order来记录顺序,这里要重排序:
|
|
//因为热点保存后在hots里的顺序会被修改,所以使用order来记录顺序,这里要重排序:
|
|
- window.hotData = {}
|
|
|
|
- if(t.hots){
|
|
|
|
- var sids = Object.keys(t.hots).sort((a,b)=>{return t.hots[a].order - t.hots[b].order});
|
|
|
|
-
|
|
|
|
|
|
+ if(e.hots){
|
|
|
|
+ var sids = Object.keys(e.hots).sort((a,b)=>{return e.hots[a].order - e.hots[b].order});
|
|
sids.forEach((sid)=>{
|
|
sids.forEach((sid)=>{
|
|
- this.hotsCount++,
|
|
|
|
- this.hots[sid] = new Hot(sid,t.hots[sid] ,this);
|
|
|
|
- t.hots[sid].infoAttribute || (t.hots[sid].infoAttribute = {})
|
|
|
|
- this.hots[sid].initStyleImg(t.hots[sid].infoAttribute);
|
|
|
|
- window.hotData[sid] = t.hots[sid];
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- this.createHotItem(window.hotData, this.hots);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ e.hots[sid].sid = sid
|
|
|
|
+ new Hot(e.hots[sid], e.hots[sid].version != 'multi' && "byHot" )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ if(e.overlays){
|
|
|
|
+ e.overlays.forEach((info)=>{
|
|
|
|
+ //if(info.file.includes('m/data/762/edit/20210312_112357584.mp4') )return;
|
|
|
|
+ new Hot(info, 'byOverlay')
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.createHotItem( );
|
|
|
|
+ Hot.startLoad()
|
|
|
|
+
|
|
|
|
|
|
g_index = w.valueFromHash("m");
|
|
g_index = w.valueFromHash("m");
|
|
/* if(t.tourAudio){
|
|
/* if(t.tourAudio){
|
|
@@ -18280,9 +18285,7 @@ window.Modernizr = function(n, e, t) {
|
|
ev.initEvent("tourAudioEnded",true,true);
|
|
ev.initEvent("tourAudioEnded",true,true);
|
|
window.dispatchEvent(ev);
|
|
window.dispatchEvent(ev);
|
|
});
|
|
});
|
|
- }; */
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ }; */
|
|
|
|
|
|
}
|
|
}
|
|
/***************************方奕卓 请求data.js数据, 用于初始化热点列表 ****************************/
|
|
/***************************方奕卓 请求data.js数据, 用于初始化热点列表 ****************************/
|
|
@@ -18302,13 +18305,13 @@ window.Modernizr = function(n, e, t) {
|
|
console.log('Data.js is empty');
|
|
console.log('Data.js is empty');
|
|
dataJsPromise.resolve();
|
|
dataJsPromise.resolve();
|
|
}) */
|
|
}) */
|
|
- e.resolve();
|
|
|
|
|
|
+ r.resolve();
|
|
}.bind(this)).fail(function() {
|
|
}.bind(this)).fail(function() {
|
|
console.log('没有热点');
|
|
console.log('没有热点');
|
|
|
|
|
|
- e.resolve()
|
|
|
|
|
|
+ r.resolve()
|
|
}),
|
|
}),
|
|
- e
|
|
|
|
|
|
+ r
|
|
}
|
|
}
|
|
,
|
|
,
|
|
n.prototype.loadPanos = function() {
|
|
n.prototype.loadPanos = function() {
|
|
@@ -18524,28 +18527,32 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
//add-----
|
|
//add-----
|
|
{
|
|
{
|
|
- let maxCount = browser.isMobile() ? 4000 : 10000
|
|
|
|
|
|
+ let maxCount = browser.isMobile() ? 200000 : 400000
|
|
|
|
|
|
- let c = this.panos.list.length * this.colliders.length
|
|
|
|
- if(c < maxCount){
|
|
|
|
- for(let i in this.hots){
|
|
|
|
- this.hots[i].setVisiblePanos(this.hots[i].visibleData);
|
|
|
|
- }
|
|
|
|
- }else{//防止加载时间过长,分批计算
|
|
|
|
|
|
+ let noVisiHots = this.hotGroup.children.filter(e=>!e.info.visiblePanos && e.info.texType != 'shine') //只看非热点的,否则数据太多
|
|
|
|
+ let visiHots = this.hotGroup.children.filter(e=>e.info.visiblePanos)
|
|
|
|
+ let c = this.panos.list.length * this.colliders.length * noVisiHots.length
|
|
|
|
+ if(c > maxCount){ //防止加载时间过长,分批计算
|
|
|
|
+
|
|
console.log('hot分批setVisiblePanos')
|
|
console.log('hot分批setVisiblePanos')
|
|
- let hotsId = Object.keys(this.hots)
|
|
|
|
- if(hotsId.length){
|
|
|
|
- let i = 0
|
|
|
|
|
|
+
|
|
|
|
+ Hot.visiPanosCountSlice = Math.ceil(maxCount / this.colliders.length / noVisiHots.length)
|
|
|
|
+ Hot.visiEveryDurSlice = browser.isMobile() ? 25 : 16;
|
|
|
|
+ let dur = Math.ceil(this.panos.list.length / Hot.visiPanosCountSlice) * Hot.visiEveryDurSlice
|
|
|
|
+ console.log(Hot.visiPanosCountSlice, Hot.visiEveryDurSlice, dur, Math.round(dur*noVisiHots.length))
|
|
|
|
+
|
|
|
|
+ if(noVisiHots.length){
|
|
|
|
+ let i = 0
|
|
let hotVisiInterval = setInterval(()=>{
|
|
let hotVisiInterval = setInterval(()=>{
|
|
- this.hots[hotsId[i]].setVisiblePanos(this.hots[hotsId[i]].visibleData);
|
|
|
|
|
|
+ noVisiHots[i].setVisiblePanos(noVisiHots[i].info.visiblePanos);
|
|
i++;
|
|
i++;
|
|
- if(i>=hotsId.length){
|
|
|
|
|
|
+ if(i>=noVisiHots.length){
|
|
clearInterval(hotVisiInterval)
|
|
clearInterval(hotVisiInterval)
|
|
}
|
|
}
|
|
- }, Math.round( browser.isMobile() ? c/200 : c/500))
|
|
|
|
|
|
+ }, dur)
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
//---------
|
|
//---------
|
|
@@ -18696,7 +18703,7 @@ window.Modernizr = function(n, e, t) {
|
|
var e = $.Deferred();
|
|
var e = $.Deferred();
|
|
//加载俯视图的标签 注释这个备注就会加载
|
|
//加载俯视图的标签 注释这个备注就会加载
|
|
//原先是labels, 改为showLabels,因为之前的somedata写的labels都是true
|
|
//原先是labels, 改为showLabels,因为之前的somedata写的labels都是true
|
|
- window.MP_PREFETCHED_MODELDATA.showingLabels ? this.showingLabels = true : '';
|
|
|
|
|
|
+ window.DATA.showingLabels ? this.showingLabels = true : '';
|
|
if (!this.showingLabels)
|
|
if (!this.showingLabels)
|
|
return e.resolve();
|
|
return e.resolve();
|
|
// var t = this.options.urlBase + "/api/v1/jsonstore/model/labels/" + this.sid;
|
|
// var t = this.options.urlBase + "/api/v1/jsonstore/model/labels/" + this.sid;
|
|
@@ -19415,7 +19422,7 @@ window.Modernizr = function(n, e, t) {
|
|
this.skyboxMesh.updateMatrix(),
|
|
this.skyboxMesh.updateMatrix(),
|
|
this.skyboxMesh.updateMatrixWorld(),
|
|
this.skyboxMesh.updateMatrixWorld(),
|
|
this.marker = null,
|
|
this.marker = null,
|
|
- this.showFloorMarker = !window.MP_PREFETCHED_MODELDATA.hideFloorMarker;
|
|
|
|
|
|
+ this.showFloorMarker = !window.DATA.hideFloorMarker;
|
|
this.isAligned() && (this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
|
|
this.isAligned() && (this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
|
|
map: w,
|
|
map: w,
|
|
side: r.DoubleSide,
|
|
side: r.DoubleSide,
|
|
@@ -20049,7 +20056,7 @@ window.Modernizr = function(n, e, t) {
|
|
t.map.value = d,
|
|
t.map.value = d,
|
|
t.opacity.value = 0,
|
|
t.opacity.value = 0,
|
|
t.color.value.set(o.reticuleColor),
|
|
t.color.value.set(o.reticuleColor),
|
|
- t.showMouseMarker = !window.MP_PREFETCHED_MODELDATA.hideMouseMarker;
|
|
|
|
|
|
+ t.showMouseMarker = !window.DATA.hideMouseMarker;
|
|
r.Mesh.call(this, new r.PlaneBufferGeometry(.4,.4,1,1), new r.RawShaderMaterial({
|
|
r.Mesh.call(this, new r.PlaneBufferGeometry(.4,.4,1,1), new r.RawShaderMaterial({
|
|
side: r.DoubleSide,
|
|
side: r.DoubleSide,
|
|
depthWrite: !1,
|
|
depthWrite: !1,
|
|
@@ -21179,15 +21186,24 @@ window.Modernizr = function(n, e, t) {
|
|
this.burnsDir = Math.sign(n.y)
|
|
this.burnsDir = Math.sign(n.y)
|
|
}
|
|
}
|
|
,
|
|
,
|
|
- n.prototype.stepWarpPath = function(e, t) {
|
|
|
|
|
|
+ n.prototype.stepWarpPath = function(firstPos, e ) {
|
|
var i = this.playerControls.cameras[a.PANORAMA];
|
|
var i = this.playerControls.cameras[a.PANORAMA];
|
|
- if (!this.warpPathPoints)
|
|
|
|
|
|
+ var n = this.warpPathPoints ? this.warpPathPoints[0] : firstPos
|
|
|
|
+ if (!n){
|
|
return i.position.copy(this.warpDestPano.position),
|
|
return i.position.copy(this.warpDestPano.position),
|
|
!0;
|
|
!0;
|
|
- var n = this.warpPathPoints[0]
|
|
|
|
- , o = this.warpDestPano.position;
|
|
|
|
-
|
|
|
|
- if (null !== this.nodes && this.cameraHull.length > 1) {
|
|
|
|
|
|
+ }
|
|
|
|
+ /* if (!this.warpPathPoints)
|
|
|
|
+ return i.position.copy(this.warpDestPano.position),
|
|
|
|
+ !0;
|
|
|
|
+ var n = this.warpPathPoints[0] */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var o = this.warpDestPano.position;
|
|
|
|
+ /* console.log(firstPos)
|
|
|
|
+ console.log(o) */
|
|
|
|
+ if (null !== this.nodes && this.cameraHull && this.cameraHull.length > 1) {
|
|
var s = new r.Vector3;
|
|
var s = new r.Vector3;
|
|
e < .5 ? s.copy(this.cameraHull[1]).sub(n).normalize().multiplyScalar(c.warp.softPushDist * e).add(n) : s.copy(this.cameraHull[this.cameraHull.length - 2]).sub(o).normalize().multiplyScalar(c.warp.softPushDist * c.warp.softPushEnd * (1 - e)).add(o),
|
|
e < .5 ? s.copy(this.cameraHull[1]).sub(n).normalize().multiplyScalar(c.warp.softPushDist * e).add(n) : s.copy(this.cameraHull[this.cameraHull.length - 2]).sub(o).normalize().multiplyScalar(c.warp.softPushDist * c.warp.softPushEnd * (1 - e)).add(o),
|
|
i.position.copy(s)
|
|
i.position.copy(s)
|
|
@@ -21374,7 +21390,12 @@ window.Modernizr = function(n, e, t) {
|
|
n.prototype.warpTravel_BLACK = function(e, t, i, n) {
|
|
n.prototype.warpTravel_BLACK = function(e, t, i, n) {
|
|
var r = e || 0;
|
|
var r = e || 0;
|
|
void 0 !== t && null !== t || (t = c.warp.teleportTime)
|
|
void 0 !== t && null !== t || (t = c.warp.teleportTime)
|
|
-
|
|
|
|
|
|
+ //add
|
|
|
|
+ var done = ()=>{
|
|
|
|
+ Hot.updateVisibles([this.player.currentPano]) //更新热点显示
|
|
|
|
+ this.player.transitionPos({type:"beforeFlytopano", pano:this.player.currentPano, dur:100})//add
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
if(momentTourBlackNewType){
|
|
if(momentTourBlackNewType){
|
|
player.sceneRenderer.effects.transitionMaskPass.start(player.sceneRenderer)
|
|
player.sceneRenderer.effects.transitionMaskPass.start(player.sceneRenderer)
|
|
@@ -21387,14 +21408,18 @@ window.Modernizr = function(n, e, t) {
|
|
player.sceneRenderer.effects.transitionMaskPass.stop()
|
|
player.sceneRenderer.effects.transitionMaskPass.stop()
|
|
|
|
|
|
this.wrapupWarpShadingOnly(n, i);
|
|
this.wrapupWarpShadingOnly(n, i);
|
|
|
|
+ done()
|
|
},t)
|
|
},t)
|
|
|
|
|
|
}else{
|
|
}else{
|
|
var o = function() {
|
|
var o = function() {
|
|
this.wrapupWarpShadingOnly(n, i);
|
|
this.wrapupWarpShadingOnly(n, i);
|
|
|
|
+
|
|
|
|
+ done()
|
|
}
|
|
}
|
|
.bind(this);
|
|
.bind(this);
|
|
- p.start(this.stepWarpPath.bind(this), t, o, r, d[c.warp.blendEasing], "stepMotion")
|
|
|
|
|
|
+ var firstPos = this.player.position.clone()//add
|
|
|
|
+ p.start(this.stepWarpPath.bind(this, firstPos), t, o, r, d[c.warp.blendEasing], "stepMotion")
|
|
}
|
|
}
|
|
|
|
|
|
this.warpCommonParameters(t, r, !1, i)
|
|
this.warpCommonParameters(t, r, !1, i)
|
|
@@ -21890,7 +21915,7 @@ window.Modernizr = function(n, e, t) {
|
|
, D = e("./constants")
|
|
, D = e("./constants")
|
|
, N = e("./util/common")
|
|
, N = e("./util/common")
|
|
, B = e("./util/cameraLight")
|
|
, B = e("./util/cameraLight")
|
|
- , Hot = e('hot')
|
|
|
|
|
|
+ //, Hot = e('hot')
|
|
, F = new o(i)
|
|
, F = new o(i)
|
|
, V = Object.freeze({
|
|
, V = Object.freeze({
|
|
FlyToPano: y.getUniqueId(),
|
|
FlyToPano: y.getUniqueId(),
|
|
@@ -22455,10 +22480,7 @@ window.Modernizr = function(n, e, t) {
|
|
m.convertScreenPositionToNDC(e, t, this.mouseAtMouseDown),
|
|
m.convertScreenPositionToNDC(e, t, this.mouseAtMouseDown),
|
|
this.mouseCouldBeClickToMove = !0,
|
|
this.mouseCouldBeClickToMove = !0,
|
|
this.mouseDown = !0;
|
|
this.mouseDown = !0;
|
|
- if (this.mouseCouldBeClickToMove) {
|
|
|
|
- //window.DownInterface && new DownInterface().state(this,Hot);
|
|
|
|
- window.Hotpoint && new Hotpoint().state(this,Hot);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
,
|
|
,
|
|
|
|
|
|
@@ -22554,9 +22576,7 @@ window.Modernizr = function(n, e, t) {
|
|
,
|
|
,
|
|
n.prototype.start = function(e) {
|
|
n.prototype.start = function(e) {
|
|
//-------------------
|
|
//-------------------
|
|
- window.initOverlay(r)
|
|
|
|
- this.model.loadOverlays()
|
|
|
|
-
|
|
|
|
|
|
+
|
|
//-------------------
|
|
//-------------------
|
|
|
|
|
|
|
|
|
|
@@ -22611,7 +22631,7 @@ window.Modernizr = function(n, e, t) {
|
|
//add
|
|
//add
|
|
this.transitionPos({type:"beforeFlytopano", pano:this.currentPano, dur:0})
|
|
this.transitionPos({type:"beforeFlytopano", pano:this.currentPano, dur:0})
|
|
this.updateHotVisible()
|
|
this.updateHotVisible()
|
|
- Overlay.updateVisibles([this.currentPano])
|
|
|
|
|
|
+ Hot.updateVisibles([this.currentPano])
|
|
|
|
|
|
return this.mode = u.PANORAMA,
|
|
return this.mode = u.PANORAMA,
|
|
e.floor.enter(this.mode),
|
|
e.floor.enter(this.mode),
|
|
@@ -22795,18 +22815,16 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
|
|
|
|
if(e.cameraChanged){
|
|
if(e.cameraChanged){
|
|
- //this.controlVideosPlay()
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(e.cameraChanged2){
|
|
for(var i in this.model.hots){
|
|
for(var i in this.model.hots){
|
|
- this.model.hots[i].update(this.camera)
|
|
|
|
- }
|
|
|
|
- if(this.mode == 'panorama')this.overlayGroup.children.forEach(overlay=>{
|
|
|
|
- overlay.update()
|
|
|
|
- })
|
|
|
|
|
|
+ this.model.hots[i].update(this)
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
this.model.supportsTiles && (this.updateTileDownloader(t),
|
|
this.model.supportsTiles && (this.updateTileDownloader(t),
|
|
this.updatePanoRenderer(t)),
|
|
this.updatePanoRenderer(t)),
|
|
this.updatePreRendering(t),
|
|
this.updatePreRendering(t),
|
|
@@ -23030,9 +23048,9 @@ window.Modernizr = function(n, e, t) {
|
|
var t = a && this.mouse.equals(this.previousState.mouse) && this.model.allFloorsVisible === this.previousState.allFloorsVisible /* && this.getLabelScaleFactor() === this.previousState.labelScaleFactor */ && this.model.currentFloor === this.previousState.currentFloor && null === this.nextPano ;
|
|
var t = a && this.mouse.equals(this.previousState.mouse) && this.model.allFloorsVisible === this.previousState.allFloorsVisible /* && this.getLabelScaleFactor() === this.previousState.labelScaleFactor */ && this.model.currentFloor === this.previousState.currentFloor && null === this.nextPano ;
|
|
e.cameraChanged = !a;
|
|
e.cameraChanged = !a;
|
|
|
|
|
|
- /* if(!t){//主要判断相机是否旋转
|
|
|
|
|
|
+ if(e.cameraChanged){//
|
|
e.cameraChanged2 = !MathLight.closeTo(this.quaternion, this.previousState.quaternion, 3) || !MathLight.closeTo(this.position, this.previousState.position, 4)
|
|
e.cameraChanged2 = !MathLight.closeTo(this.quaternion, this.previousState.quaternion, 3) || !MathLight.closeTo(this.position, this.previousState.position, 4)
|
|
- }else e.cameraChanged2 = false */
|
|
|
|
|
|
+ }else e.cameraChanged2 = false
|
|
|
|
|
|
|
|
|
|
e.allFloorsVisible = this.model.allFloorsVisible !== this.previousState.allFloorsVisible,
|
|
e.allFloorsVisible = this.model.allFloorsVisible !== this.previousState.allFloorsVisible,
|
|
@@ -23071,10 +23089,44 @@ window.Modernizr = function(n, e, t) {
|
|
, t = this.isOutsideMode() && this.cameraControls.controls[this.mode].isEngaged()
|
|
, t = this.isOutsideMode() && this.cameraControls.controls[this.mode].isEngaged()
|
|
, i = y.getById(V.LookTransition)
|
|
, i = y.getById(V.LookTransition)
|
|
, n = !(e || t || this.isTouchEvent || i.length && i[0].running);
|
|
, n = !(e || t || this.isTouchEvent || i.length && i[0].running);
|
|
- //this.tagManager.intersecttag(this.mouse, n, this.camera) || (this.intersect = this.getMouseIntersect(),//--MP
|
|
|
|
- this.intersect = this.getMouseIntersect(); //xzw change
|
|
|
|
|
|
+
|
|
|
|
+ {//clear:
|
|
|
|
+ if(this.intersectHot) this.intersectHot.hideTitle()
|
|
|
|
+ this.intersectHot = null
|
|
|
|
+ $("#player").css("cursor", "")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var deal = ()=>{
|
|
|
|
+ if(this.intersect && this.intersect.object.visible ){
|
|
|
|
+ if("hotSprite" == this.intersect.object.type){
|
|
|
|
+ this.intersectHot = this.intersect.object
|
|
|
|
+ while(!(this.intersectHot instanceof Hot)){
|
|
|
|
+ this.intersectHot = this.intersectHot.parent
|
|
|
|
+ }
|
|
|
|
+ $(`.toolRight .spotList ul li[data-spid=${this.intersectHot.sid}]`).addClass("active")
|
|
|
|
+ this.intersectHot.showTitle()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(this.model.hotGroup){
|
|
|
|
+
|
|
|
|
+ var hots = this.model.hotGroup.children.filter(e=> e.info.actionType.examine || e.info.actionType.openHot )
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.intersect = this.getMouseIntersect(null, hots.concat(this.model.colliders));
|
|
|
|
+ if(this.intersect){
|
|
|
|
+ deal()
|
|
|
|
+ this.intersectHot && $("#player").css("cursor", "pointer");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.intersect = this.getMouseIntersect(),
|
|
this.intersect && this.updateClosestPano(this.intersect),
|
|
this.intersect && this.updateClosestPano(this.intersect),
|
|
- // this.intersect && console.log(this.intersect.point),
|
|
|
|
this.closestPano || this.closestPanoInDirection(this.getMouseDirection()) ? (this.reticule.updatePosition(this.position, this.intersect),
|
|
this.closestPano || this.closestPanoInDirection(this.getMouseDirection()) ? (this.reticule.updatePosition(this.position, this.intersect),
|
|
f.navigation.panoScores && !f.navigation.mouseDirection && this.closestPanoInDirection(this.getDirection())) : this.reticule.hide()
|
|
f.navigation.panoScores && !f.navigation.mouseDirection && this.closestPanoInDirection(this.getDirection())) : this.reticule.hide()
|
|
}
|
|
}
|
|
@@ -23171,51 +23223,22 @@ window.Modernizr = function(n, e, t) {
|
|
t = t || this.model.floors.reduce(function(e, t) {
|
|
t = t || this.model.floors.reduce(function(e, t) {
|
|
return t.hidden ? e : e.concat(t.collider.children)
|
|
return t.hidden ? e : e.concat(t.collider.children)
|
|
}, this.mode === u.PANORAMA ? this.panoMarkers : []);
|
|
}, this.mode === u.PANORAMA ? this.panoMarkers : []);
|
|
- for(var i in this.model.hots){
|
|
|
|
- t.push(this.model.hots[i].mesh);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.overlayGroup && (t = t.concat(this.overlayGroup.children.filter(e=>e.overlayType == "video")));
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
var i = new r.Vector3(e.x,e.y,-1).unproject(this.camera);
|
|
var i = new r.Vector3(e.x,e.y,-1).unproject(this.camera);
|
|
this.raycaster.set(i, this.getMouseDirection(e));
|
|
this.raycaster.set(i, this.getMouseDirection(e));
|
|
var n = this.raycaster.intersectObjects(t, true);//add true
|
|
var n = this.raycaster.intersectObjects(t, true);//add true
|
|
- // n[0] && console.log(n[0].point);
|
|
|
|
- if(g_HotStatus=="add"){
|
|
|
|
- var points = this.raycaster.intersectObjects(window.player.model.chunks);
|
|
|
|
- console.log(points[0]);
|
|
|
|
- points.length >= 1? ($('#player').css('cursor', 'cell'),window.hotPointPos = points[0].point): ($('#player').css('cursor', 'not-allowed'), window.hotPointsPos = false)
|
|
|
|
- }
|
|
|
|
- this.intersectHot && this.intersectHot.hideTitle()
|
|
|
|
- if (0 === n.length){
|
|
|
|
- this.intersectHot = null; //add
|
|
|
|
- if(g_HotStatus!="add") $("#player").css("cursor","");
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var o = n[0];
|
|
|
|
- if(o.object.type == "hotSprite"){ //add
|
|
|
|
- this.intersectHot = o.object.belongHot;
|
|
|
|
- this.intersectHot.showTitle()
|
|
|
|
- this.intersectHot.actionType == 'noAction' || $("#player").css("cursor","pointer");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
|
|
- this.intersectHot = null;
|
|
|
|
-
|
|
|
|
- var intersect = this.hoverOverlay(this.overlayGroup && o && o.object.parent.parent == this.overlayGroup && o.object)
|
|
|
|
-
|
|
|
|
- if(!intersect && g_HotStatus!="add") $("#player").css("cursor","");
|
|
|
|
- if (o.face) {
|
|
|
|
- o.normal = o.face.normal.applyQuaternion(o.object.quaternion);
|
|
|
|
- var a = this.position.clone().sub(o.point);
|
|
|
|
- a.dot(o.normal) < 0 && o.normal.negate(),
|
|
|
|
|
|
+
|
|
|
|
+ var o = n[0];
|
|
|
|
+
|
|
|
|
+ if(o){
|
|
|
|
+ o.face && (o.normal = o.face.normal.applyQuaternion(o.object.quaternion),
|
|
|
|
+ this.position.clone().sub(o.point).dot(o.normal) < 0 && o.normal.negate(),
|
|
this.currentPano ? o.onFloor = o.point.y < this.position.y - .5 * this.currentPano.height : o.onFloor = o.point.y < this.position.y - .5,
|
|
this.currentPano ? o.onFloor = o.point.y < this.position.y - .5 * this.currentPano.height : o.onFloor = o.point.y < this.position.y - .5,
|
|
- o.horizontal = o.normal.y > .8
|
|
|
|
|
|
+ o.horizontal = .8 < o.normal.y);
|
|
|
|
+ return o
|
|
}
|
|
}
|
|
- // console.log(o.point);
|
|
|
|
- return o
|
|
|
|
}
|
|
}
|
|
,
|
|
,
|
|
n.prototype.updateClosestPano = function(e) {
|
|
n.prototype.updateClosestPano = function(e) {
|
|
@@ -23494,7 +23517,7 @@ window.Modernizr = function(n, e, t) {
|
|
//---------before fly--------------- add
|
|
//---------before fly--------------- add
|
|
this.updateHotVisible(i); //更新热点显示
|
|
this.updateHotVisible(i); //更新热点显示
|
|
this.transitionPos({type:"beforeFlytopano", pano:i, dur:I})//add
|
|
this.transitionPos({type:"beforeFlytopano", pano:i, dur:I})//add
|
|
- Overlay.updateVisibles([this.currentPano, i])
|
|
|
|
|
|
+ Hot.updateVisibles([this.currentPano, i])
|
|
|
|
|
|
//地标变化
|
|
//地标变化
|
|
if(this.model.floorLogos){
|
|
if(this.model.floorLogos){
|
|
@@ -23542,7 +23565,7 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- Overlay.updateVisibles([this.currentPano])//add
|
|
|
|
|
|
+ Hot.updateVisibles([this.currentPano])//add
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.bind(this), 0, B, "camFly", V.FlyToPano)
|
|
.bind(this), 0, B, "camFly", V.FlyToPano)
|
|
@@ -23553,11 +23576,12 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
}
|
|
}
|
|
n.prototype.blackToPano = function(o={}) {//add 瞬间过渡
|
|
n.prototype.blackToPano = function(o={}) {//add 瞬间过渡
|
|
- o.panoId = "8bc9156b288d48459e4e0f74d7051ef1"
|
|
|
|
|
|
+ //o.panoId = "8bc9156b288d48459e4e0f74d7051ef1"
|
|
|
|
+ if(this.flying || this.isWarping() )return;
|
|
|
|
+
|
|
let oldPos = this.position.clone();
|
|
let oldPos = this.position.clone();
|
|
let oldPano = this.currentPano
|
|
let oldPano = this.currentPano
|
|
let pano = o.pano || this.model.panos.index[o.panoId]
|
|
let pano = o.pano || this.model.panos.index[o.panoId]
|
|
-
|
|
|
|
|
|
|
|
this.path.warpDestPano = pano
|
|
this.path.warpDestPano = pano
|
|
|
|
|
|
@@ -23565,11 +23589,16 @@ window.Modernizr = function(n, e, t) {
|
|
this.waitingToWarp = !1,
|
|
this.waitingToWarp = !1,
|
|
this.blackToPano(o)
|
|
this.blackToPano(o)
|
|
}
|
|
}
|
|
|
|
+
|
|
if (this.checkAndWaitForPanoLoad(pano, "high", "low", this.basePanoSize, retry))
|
|
if (this.checkAndWaitForPanoLoad(pano, "high", "low", this.basePanoSize, retry))
|
|
return void (this.waitingToWarp = !0)
|
|
return void (this.waitingToWarp = !0)
|
|
|
|
+
|
|
|
|
+ this.emit("pano.chosen", oldPano, pano)
|
|
|
|
|
|
- this.emit("pano.chosen", oldPano, pano),
|
|
|
|
-
|
|
|
|
|
|
+ /* if(window.momentTourBlackNewType == 1) { */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.flying = true
|
|
|
|
|
|
this.path.warpDestHeroLoc = {
|
|
this.path.warpDestHeroLoc = {
|
|
panoId : o.panoId,
|
|
panoId : o.panoId,
|
|
@@ -23584,6 +23613,10 @@ window.Modernizr = function(n, e, t) {
|
|
pano.enter()
|
|
pano.enter()
|
|
this.currentPano = pano
|
|
this.currentPano = pano
|
|
this.emit("flying.ended", pano.position, oldPos, pano, oldPano)
|
|
this.emit("flying.ended", pano.position, oldPos, pano, oldPano)
|
|
|
|
+ this.flying = false
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
} )
|
|
} )
|
|
|
|
|
|
}
|
|
}
|
|
@@ -23625,32 +23658,18 @@ window.Modernizr = function(n, e, t) {
|
|
return s
|
|
return s
|
|
}
|
|
}
|
|
var sid = o.pano != void 0 ? o.pano.id : "outside";
|
|
var sid = o.pano != void 0 ? o.pano.id : "outside";
|
|
- this.overlayGroup.children.forEach(overlay=>{
|
|
|
|
- var panoData = overlay.transformAtPanos[sid]
|
|
|
|
- var useCustom = !panoData
|
|
|
|
- //if(overlay.usingTransformData || !useCustom){
|
|
|
|
- var pos = useCustom ? overlay.posCustom : panoData.pos;
|
|
|
|
- var qua = useCustom ? overlay.quaCustom : panoData.qua;
|
|
|
|
- var scale = useCustom ? overlay.getScaleBySize(overlay.widthCustom, overlay.heightCustom) :
|
|
|
|
- overlay.getScaleBySize(panoData.width , panoData.height)
|
|
|
|
- scale = new THREE.Vector3(scale.x, scale.y, overlay.scale.z)
|
|
|
|
- begin(overlay, pos, qua, scale )
|
|
|
|
- //}
|
|
|
|
- overlay.usingTransformData = !useCustom
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
|
|
for(let i in this.model.hots){//是否判断visible?
|
|
for(let i in this.model.hots){//是否判断visible?
|
|
var hot = this.model.hots[i];
|
|
var hot = this.model.hots[i];
|
|
- var panoData = hot.transformAtPanos[sid];
|
|
|
|
|
|
+ var panoData = hot.info.transformAtPanos[sid];
|
|
var useCustom = !panoData
|
|
var useCustom = !panoData
|
|
|
|
|
|
//if(hot.usingTransformData || !useCustom){
|
|
//if(hot.usingTransformData || !useCustom){
|
|
- var pos = useCustom ? hot.position : panoData.pos;
|
|
|
|
- var qua = hot.isSprite ? null : (useCustom ? hot.quaternion : panoData.qua);
|
|
|
|
- begin(hot.mesh, pos, qua )
|
|
|
|
|
|
+ var pos = useCustom ? hot.info.position : panoData.pos;
|
|
|
|
+ begin(hot, pos/* , qua */ )
|
|
//}
|
|
//}
|
|
- hot.usingTransformData = !useCustom;
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -24121,10 +24140,10 @@ window.Modernizr = function(n, e, t) {
|
|
)
|
|
)
|
|
|
|
|
|
if(this.mode == u.PANORAMA){
|
|
if(this.mode == u.PANORAMA){
|
|
- Overlay.updateVisibles([this.currentPano])
|
|
|
|
|
|
+ Hot.updateVisibles([this.currentPano])
|
|
}else{
|
|
}else{
|
|
- Overlay.updateVisibles(true)
|
|
|
|
- this.overlayGroup.children.forEach(overlay=>{
|
|
|
|
|
|
+ Hot.updateVisibles(true)
|
|
|
|
+ this.model.hotGroup.children.forEach(overlay=>{
|
|
if(overlay.animateInfo){
|
|
if(overlay.animateInfo){
|
|
GifTexDeal.start(overlay.animation)
|
|
GifTexDeal.start(overlay.animation)
|
|
}
|
|
}
|
|
@@ -26803,7 +26822,7 @@ window.Modernizr = function(n, e, t) {
|
|
hideFloorDuration: 300,
|
|
hideFloorDuration: 300,
|
|
hideFloorDelay: 0,
|
|
hideFloorDelay: 0,
|
|
reticuleOpacityTransitionTime: 250,
|
|
reticuleOpacityTransitionTime: 250,
|
|
- reticuleColor: window.MP_PREFETCHED_MODELDATA.mouseMarkerColor || s.newBlue, // 方奕卓 配置鼠标标志颜色
|
|
|
|
|
|
+ reticuleColor: window.DATA.mouseMarkerColor || s.newBlue, // 方奕卓 配置鼠标标志颜色
|
|
markerOpacityTransitionTime: 500,
|
|
markerOpacityTransitionTime: 500,
|
|
guiAnimationSpeed: 250,
|
|
guiAnimationSpeed: 250,
|
|
highlightAnimationDuration: 500,
|
|
highlightAnimationDuration: 500,
|
|
@@ -26959,7 +26978,7 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
path: {
|
|
path: {
|
|
- color: window.MP_PREFETCHED_MODELDATA.floorMarkerColor || s.newBlue, // 方奕卓 配置导览标志颜色
|
|
|
|
|
|
+ color: window.DATA.floorMarkerColor || s.newBlue, // 方奕卓 配置导览标志颜色
|
|
colorUp: s._desat(s.newBlue, .5),
|
|
colorUp: s._desat(s.newBlue, .5),
|
|
colorDown: s._darken(s.newBlue, .35),
|
|
colorDown: s._darken(s.newBlue, .35),
|
|
opacity: .5,
|
|
opacity: .5,
|
|
@@ -27175,7 +27194,7 @@ window.Modernizr = function(n, e, t) {
|
|
p.path.meshFree && (p.path.typ = l.WALK),
|
|
p.path.meshFree && (p.path.typ = l.WALK),
|
|
p.zoom.max = p.zoom.overridemax || p.zoom.max,
|
|
p.zoom.max = p.zoom.overridemax || p.zoom.max,
|
|
p.zoom.min = p.zoom.overridemin || p.zoom.min,
|
|
p.zoom.min = p.zoom.overridemin || p.zoom.min,
|
|
- t.exports = p
|
|
|
|
|
|
+ window._settings = t.exports = p
|
|
}
|
|
}
|
|
, {
|
|
, {
|
|
"./constants": 8,
|
|
"./constants": 8,
|
|
@@ -30153,7 +30172,7 @@ window.Modernizr = function(n, e, t) {
|
|
},
|
|
},
|
|
get: function(e) {
|
|
get: function(e) {
|
|
//return this.urlContainer.get(e)
|
|
//return this.urlContainer.get(e)
|
|
- return window.MP_PREFETCHED_MODELDATA.files.templates[0].replace("{{filename}}", e)
|
|
|
|
|
|
+ return window.DATA.files.templates[0].replace("{{filename}}", e)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
t.exports = a
|
|
t.exports = a
|
|
@@ -30700,14 +30719,14 @@ window.Modernizr = function(n, e, t) {
|
|
, u = new c(i);
|
|
, u = new c(i);
|
|
window.URL = window.URL || window.webkitURL,
|
|
window.URL = window.URL || window.webkitURL,
|
|
window.MP_REQUEST_CACHE = window.MP_REQUEST_CACHE || {},
|
|
window.MP_REQUEST_CACHE = window.MP_REQUEST_CACHE || {},
|
|
- window.MP_PREFETCHED_MODELDATA = window.MP_PREFETCHED_MODELDATA || {}
|
|
|
|
|
|
+ window.DATA = window.DATA || {}
|
|
/* setTimeout(function() {//MP-- xzw delete
|
|
/* setTimeout(function() {//MP-- xzw delete
|
|
window.MP_REQUEST_CACHE = null,
|
|
window.MP_REQUEST_CACHE = null,
|
|
- window.MP_PREFETCHED_MODELDATA = {}
|
|
|
|
|
|
+ window.DATA = {}
|
|
}, 6e4),
|
|
}, 6e4),
|
|
window.onpageshow = function(e) {
|
|
window.onpageshow = function(e) {
|
|
e.persisted && (window.MP_REQUEST_CACHE = null,
|
|
e.persisted && (window.MP_REQUEST_CACHE = null,
|
|
- window.MP_PREFETCHED_MODELDATA = {})
|
|
|
|
|
|
+ window.DATA = {})
|
|
} */
|
|
} */
|
|
,
|
|
,
|
|
t.exports = {
|
|
t.exports = {
|
|
@@ -30720,7 +30739,7 @@ window.Modernizr = function(n, e, t) {
|
|
return n
|
|
return n
|
|
}
|
|
}
|
|
var o;
|
|
var o;
|
|
- return o = t.prefetchFrom && window.MP_PREFETCHED_MODELDATA[t.prefetchFrom] ? $.when(window.MP_PREFETCHED_MODELDATA[t.prefetchFrom]) : r("GET", e, t),
|
|
|
|
|
|
+ return o = t.prefetchFrom && window.DATA[t.prefetchFrom] ? $.when(window.DATA[t.prefetchFrom]) : r("GET", e, t),
|
|
i && l(e, t, o),
|
|
i && l(e, t, o),
|
|
o
|
|
o
|
|
},
|
|
},
|
|
@@ -30990,8 +31009,8 @@ window.Modernizr = function(n, e, t) {
|
|
return i;
|
|
return i;
|
|
if (e.heroImage)
|
|
if (e.heroImage)
|
|
i = o(e, t);
|
|
i = o(e, t);
|
|
- else if (window.MP_PREFETCHED_MODELDATA.camera_start) {
|
|
|
|
- var n = window.MP_PREFETCHED_MODELDATA.camera_start;
|
|
|
|
|
|
+ else if (window.DATA.camera_start) {
|
|
|
|
+ var n = window.DATA.camera_start;
|
|
try {
|
|
try {
|
|
Object.keys(n).length > 0 && !l.isEmptyQuaternion(n.camera.quaternion) && (i.mode = h.convertWorkshopModeInt(n.mode),
|
|
Object.keys(n).length > 0 && !l.isEmptyQuaternion(n.camera.quaternion) && (i.mode = h.convertWorkshopModeInt(n.mode),
|
|
i.position = n.camera.position,
|
|
i.position = n.camera.position,
|
|
@@ -31104,6 +31123,17 @@ window.Modernizr = function(n, e, t) {
|
|
getVFOVFromHFOV: a
|
|
getVFOVFromHFOV: a
|
|
}
|
|
}
|
|
window.MathLight = t.exports
|
|
window.MathLight = t.exports
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ MathLight.closeTo = function(e1,e2, precision){//xzw add 判断e1,e2是否接近
|
|
|
|
+ var prec = Math.pow(10, - (precision || 4));
|
|
|
|
+ var s1 = Math.abs(e1.x - e2.x) < prec && Math.abs(e1.y - e2.y) < prec && Math.abs(e1.z - e2.z) < prec
|
|
|
|
+ if(e1.w){
|
|
|
|
+ return s1 && Math.abs(e1.w - e2.w) < prec
|
|
|
|
+ }else return s1
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
, {
|
|
, {
|
|
"./MathLight": 176
|
|
"./MathLight": 176
|
|
@@ -31236,10 +31266,10 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
,
|
|
,
|
|
|
|
|
|
- getVisiblePano : function(positions = [], options={}){//add
|
|
|
|
|
|
+ getVisiblePano : function(positions = [], panos, options={}){//add
|
|
var visiblePanos = [];
|
|
var visiblePanos = [];
|
|
|
|
|
|
- var panos = options.panos || player.model.panos.list;
|
|
|
|
|
|
+
|
|
options.posAtPanos = options.posAtPanos || {}//在不同漫游点的positions
|
|
options.posAtPanos = options.posAtPanos || {}//在不同漫游点的positions
|
|
panos.forEach((pano)=>{
|
|
panos.forEach((pano)=>{
|
|
if(!pano.isAligned())return;
|
|
if(!pano.isAligned())return;
|
|
@@ -31254,7 +31284,7 @@ window.Modernizr = function(n, e, t) {
|
|
var o = ray.intersectObjects(options.model || player.model.colliders, true);
|
|
var o = ray.intersectObjects(options.model || player.model.colliders, true);
|
|
|
|
|
|
if (!o || !o.length){ //只要有一点可见,就算整体可见
|
|
if (!o || !o.length){ //只要有一点可见,就算整体可见
|
|
- visiblePanos.push(pano );
|
|
|
|
|
|
+ visiblePanos.push(pano.id);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -31777,8 +31807,16 @@ window.Modernizr = function(n, e, t) {
|
|
trueSide : pos.z<1, //trueSide为false时,即使在屏幕范围内可见,也是反方向的另一个不可以被渲染的点 参见Tag.update
|
|
trueSide : pos.z<1, //trueSide为false时,即使在屏幕范围内可见,也是反方向的另一个不可以被渲染的点 参见Tag.update
|
|
inSight : inSight //在屏幕范围内可见
|
|
inSight : inSight //在屏幕范围内可见
|
|
};
|
|
};
|
|
|
|
+ },
|
|
|
|
+ getDirByLonLat: function(lon, lat) {
|
|
|
|
+ var dir = new THREE.Vector3();
|
|
|
|
+ var phi = THREE.Math.degToRad(90 - lat);
|
|
|
|
+ var theta = THREE.Math.degToRad(lon);
|
|
|
|
+ dir.x = Math.sin(phi) * Math.cos(theta);
|
|
|
|
+ dir.y = Math.cos(phi);
|
|
|
|
+ dir.z = Math.sin(phi) * Math.sin(theta);
|
|
|
|
+ return dir.negate();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
}
|
|
}
|
|
window.math = t.exports
|
|
window.math = t.exports
|
|
@@ -32002,7 +32040,7 @@ window.Modernizr = function(n, e, t) {
|
|
}
|
|
}
|
|
}(),
|
|
}(),
|
|
modelDataPromisesTiles: function(e) {
|
|
modelDataPromisesTiles: function(e) {
|
|
- var vision_version = e.vision_version || window.MP_PREFETCHED_MODELDATA.vision_version
|
|
|
|
|
|
+ var vision_version = e.vision_version || window.DATA.vision_version
|
|
if (vision_version)
|
|
if (vision_version)
|
|
try {
|
|
try {
|
|
return l.visionVersionToInt(vision_version) >= l.visionVersionToInt(r.visionTilingStartVersion)
|
|
return l.visionVersionToInt(vision_version) >= l.visionVersionToInt(r.visionTilingStartVersion)
|
|
@@ -58720,7 +58758,7 @@ window.Modernizr = function(n, e, t) {
|
|
i.THREE = n) : this.THREE = n
|
|
i.THREE = n) : this.THREE = n
|
|
|
|
|
|
window.THREE = n
|
|
window.THREE = n
|
|
-
|
|
|
|
|
|
+ getObjLoader()
|
|
}
|
|
}
|
|
, {}]
|
|
, {}]
|
|
}, {}, [116]);
|
|
}, {}, [116]);
|
|
@@ -58899,6 +58937,20 @@ function initTransitionPass(THREE){
|
|
|
|
|
|
导览缩放的几处: 1 搜索smoothZoomFovTo 2 flightStepWalk里
|
|
导览缩放的几处: 1 搜索smoothZoomFovTo 2 flightStepWalk里
|
|
|
|
|
|
|
|
+ {
|
|
|
|
+ //到导览中某个点位(假设点位不重复)
|
|
|
|
|
|
-
|
|
|
|
- */
|
|
|
|
|
|
+ var id = 73
|
|
|
|
+ var p = player.model.heroLocations.find(e=>e.heroLocations && e.heroLocations.find(e=>e.panoId == id))
|
|
|
|
+ var i = player.model.heroLocations.indexOf(p)
|
|
|
|
+ var p1 = p.heroLocations.find(e=>e.panoId == id)
|
|
|
|
+ var j = p.heroLocations.indexOf(p1)
|
|
|
|
+ player.director.goToHighlight([i,j])
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ */
|
|
|
|
+
|