|
@@ -18312,8 +18312,50 @@ window.Modernizr = function(n, e, t) {
|
|
|
e
|
|
|
}
|
|
|
,
|
|
|
- n.prototype.fadePanoMarkers = function(e, t) {
|
|
|
- this.panos.fadeMarkerOpacity(e, t)
|
|
|
+ n.prototype.fadePanoMarkers = function(/* e, t */opacity, dur, o = {}) {//改
|
|
|
+ //this.panos.fadeMarkerOpacity(e, t)
|
|
|
+
|
|
|
+ if(window.DATA.hideFloorMarker)return
|
|
|
+ var currentPano = player.currentPano
|
|
|
+ opacity = void 0 == opacity ? _settings.panorama.markerOpacity : opacity //不传opacity代表显示
|
|
|
+
|
|
|
+ var hideWhenFlyOut = () => {
|
|
|
+ var shows = [],
|
|
|
+ hides = []
|
|
|
+ player.model.panos.forEach(pano => {
|
|
|
+ hides.push(pano)
|
|
|
+ })
|
|
|
+ this.panos.fadeMarkerOpacity(0, dur, [{ toOp: 0, member: hides }])
|
|
|
+ }
|
|
|
+
|
|
|
+ if (opacity == 0) {
|
|
|
+ hideWhenFlyOut()
|
|
|
+ } else {
|
|
|
+ if (player.mode == 'panorama' && currentPano) {
|
|
|
+ var shows = [], hides = []
|
|
|
+
|
|
|
+ player.model.panos.forEach(pano => { //是邻近点就显示否则隐藏
|
|
|
+ if (currentPano.neighbourPanos[pano.id]) {
|
|
|
+ shows.push(pano)
|
|
|
+ } else {
|
|
|
+ hides.push(pano)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.panos.fadeMarkerOpacity(opacity, dur, [
|
|
|
+ { toOp: opacity, member: shows },
|
|
|
+ { toOp: 0, member: hides },
|
|
|
+ ])
|
|
|
+ } else if (player.modeTran.split('-')[1] != 'panorama') {
|
|
|
+ //飞出后marker隐藏
|
|
|
+
|
|
|
+ hideWhenFlyOut()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
n.prototype.setSweepVisibility = function(e) {
|
|
@@ -19084,22 +19126,46 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.skyboxMesh.updateMatrixWorld(),
|
|
|
this.marker = null,
|
|
|
this.showFloorMarker = !window.DATA.hideFloorMarker;
|
|
|
- this.isAligned() && (this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
|
|
|
- map: w,
|
|
|
- side: r.DoubleSide,
|
|
|
- opacity: 0,
|
|
|
- transparent: !0,
|
|
|
- depthWrite: !1
|
|
|
- })),
|
|
|
- this.marker.visible = this.showFloorMarker,
|
|
|
- this.marker.renderOrder = s.panoMarker,
|
|
|
- this.marker.name = "marker",
|
|
|
- this.marker.pano = this,
|
|
|
- this.marker.layers.set(v.PANOMARKERS),
|
|
|
- this.marker.updateMatrixWorld(),
|
|
|
- a.colorMarkerOnLoad && this.on("load", function() {
|
|
|
- this.marker.material.color.set(65280)
|
|
|
- })),
|
|
|
+
|
|
|
+
|
|
|
+ if(this.isAligned() ){
|
|
|
+ this.marker = new r.Mesh(b,new r.MeshBasicMaterial({
|
|
|
+ map: w,
|
|
|
+ side: r.DoubleSide,
|
|
|
+ opacity: 0,
|
|
|
+ transparent: !0,
|
|
|
+ depthWrite: !1
|
|
|
+ })),
|
|
|
+ this.marker.visible = false //改:先不显示,之后根据opacity显示
|
|
|
+
|
|
|
+ this.marker.renderOrder = s.panoMarker,
|
|
|
+ this.marker.name = "marker",
|
|
|
+ this.marker.pano = this,
|
|
|
+ this.marker.layers.set(v.PANOMARKERS),
|
|
|
+ this.marker.updateMatrixWorld()
|
|
|
+
|
|
|
+
|
|
|
+ if(!window.DATA.hideFloorMarker){//xzw
|
|
|
+ let opa = this.marker.material.opacity
|
|
|
+ Object.defineProperty(this.marker.material, 'opacity', {
|
|
|
+ get: function () {
|
|
|
+ return opa
|
|
|
+ },
|
|
|
+ set: (o)=>{
|
|
|
+ opa = o
|
|
|
+
|
|
|
+ convertTool.updateVisible(this.marker, 'hideWhenZeroOpa', o > 0)
|
|
|
+ //if(o==0)console.log('o==0',this.id,this.marker.visible)
|
|
|
+
|
|
|
+ //console.log(o,this.id,this.marker.visible)
|
|
|
+
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ a.colorMarkerOnLoad && this.on("load", function() {
|
|
|
+ this.marker.material.color.set(65280)
|
|
|
+ })
|
|
|
+ }
|
|
|
this.debugColor = (new r.Color).setHSL(.06 + .53 * Math.random(), .8 + .2 * Math.random(), .5 + .2 * Math.random()),
|
|
|
this.floorPosition = i.puck ? i.puck.clone() : null,
|
|
|
this.tiled = n,
|
|
@@ -23229,7 +23295,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.model.floorLogos[1].visible = false;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ this.model.fadePanoMarkers()//add
|
|
|
Hot.updateVisibles([this.currentPano])//add
|
|
|
}
|
|
|
}
|
|
@@ -23852,6 +23918,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
if(this.mode == u.PANORAMA){
|
|
|
Hot.updateVisibles([this.currentPano])
|
|
|
+ this.model.fadePanoMarkers()
|
|
|
}else{
|
|
|
Hot.updateVisibles(true)
|
|
|
this.model.hotGroup.children.forEach(overlay=>{
|
|
@@ -26845,7 +26912,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
},
|
|
|
input: {
|
|
|
longTapThreshold: 200,
|
|
|
- moveToleranceNDC: .08,
|
|
|
+ moveToleranceNDC: 0.01,//.08,
|
|
|
touchMoveThreshold: 25
|
|
|
},
|
|
|
help: {
|
|
@@ -27714,11 +27781,20 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.maxBaseUploadsPerFrame = x,
|
|
|
this.maxNonBaseUploadsPerFrame = T
|
|
|
}
|
|
|
- function c() {
|
|
|
+ function c() {
|
|
|
this.uploadIntervalCancelled || (this.overlayTilesLoaded || !this.usingTileOverlay ? (b = !0,
|
|
|
- this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame),
|
|
|
+ this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame),
|
|
|
this.peekNextFromUploadQueue() ? this.refreshUploadInterval(w) : this.uploadInterval = null) : this.refreshUploadInterval(this.uploadIntervalDelay))
|
|
|
- }
|
|
|
+ }
|
|
|
+ /* function c() {
|
|
|
+ this.uploadIntervalCancelled || (this.overlayTilesLoaded || !this.usingTileOverlay ? (b = !0,
|
|
|
+ this.updateUploadQueue(1, 2),
|
|
|
+ w = 18,
|
|
|
+ this.peekNextFromUploadQueue() ? this.refreshUploadInterval(w) : this.uploadInterval = null) : this.refreshUploadInterval(this.uploadIntervalDelay))
|
|
|
+ } */
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
var h = e("three")
|
|
|
, u = e("../exception/BasicException")
|
|
|
, d = e("../settings")
|
|
@@ -30509,7 +30585,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
}
|
|
|
}(),
|
|
|
- n.prototype.fadeMarkerOpacity = function(e, t) {
|
|
|
+ /* n.prototype.fadeMarkerOpacity = function(e, t) {
|
|
|
var i = void 0 === e ? a.panorama.markerOpacity : e
|
|
|
, n = this.list.findIndex(function(e) {
|
|
|
return e.marker
|
|
@@ -30531,6 +30607,60 @@ window.Modernizr = function(n, e, t) {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ } */
|
|
|
+ n.prototype.fadeMarkerOpacity = function(e, t, gr) {
|
|
|
+
|
|
|
+
|
|
|
+ d.cancelById('fadeMarkerOpacity')
|
|
|
+
|
|
|
+ var n = this.list.findIndex(function (e) {
|
|
|
+ //why? 难道没有marker的pano吗 findeIndex:获取数组中函数返回值不为fasle的第一个元素索引位置
|
|
|
+ return e.marker
|
|
|
+ })
|
|
|
+ if (n < 0) {
|
|
|
+ //logger.info('marker findIndex<0')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var group
|
|
|
+
|
|
|
+ var tran = function (list, index) {
|
|
|
+ list.member = list.member.filter(function (m) {
|
|
|
+ return m.marker && m.marker.material.opacity != list.toOp
|
|
|
+ })
|
|
|
+ transitions.trigger({
|
|
|
+ func: function (e, t) {
|
|
|
+ //e:0-1
|
|
|
+ list.member.forEach(function (m) {
|
|
|
+ var o = m.marker.oldOpacity
|
|
|
+ var i = o + e * (list.toOp - o)
|
|
|
+ m.marker && (m.marker.material.opacity = i)
|
|
|
+ })
|
|
|
+ }.bind(this),
|
|
|
+ duration: void 0 == t ? a.markerOpacityTransitionTime : t,
|
|
|
+ name: '_fpm_' + index,
|
|
|
+ id: 'fadeMarkerOpacity',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.forEach(function (e) {
|
|
|
+ //先记录旧的opacity
|
|
|
+ e.marker && (e.marker.oldOpacity = e.marker.material.opacity)
|
|
|
+ })
|
|
|
+
|
|
|
+ group = gr
|
|
|
+ /* if (e > 0 && gr) {
|
|
|
+ group = gr
|
|
|
+ } else {
|
|
|
+ group = [
|
|
|
+ {
|
|
|
+ member: this.list,
|
|
|
+ toOp: 0,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ } */
|
|
|
+
|
|
|
+ for (var i = 0; i < group.length; i++) {
|
|
|
+ tran(group[i], i)
|
|
|
+ }
|
|
|
}
|
|
|
,
|
|
|
t.exports = n
|