|
@@ -16196,7 +16196,11 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
this.infoAttribute = d.infoAttribute || {};
|
|
|
this.styleTex = [] // 存储热点icon的图片 [{src:...}, {src:...} ] 最多两个,里面是带有src的object, 可以是img
|
|
|
-
|
|
|
+ this.transformAtPanos = d.transformAtPanos || {}
|
|
|
+ for (let i in this.transformAtPanos) {
|
|
|
+ this.transformAtPanos[i].pos = new THREE.Vector3().fromArray(this.transformAtPanos[i].pos)
|
|
|
+ this.transformAtPanos[i].qua && (this.transformAtPanos[i].qua = new THREE.Quaternion().fromArray(this.transformAtPanos[i].qua))
|
|
|
+ }
|
|
|
|
|
|
this.build();
|
|
|
d.infoAttribute && d.infoAttribute.title && this.setTitleElem(d.infoAttribute.title)
|
|
@@ -23812,14 +23816,14 @@ window.Modernizr = function(n, e, t) {
|
|
|
},0, A[f.transition.movementEasing], "transitionPos", _transitionPosId)
|
|
|
}
|
|
|
|
|
|
- if(!same(object.quaternion, qua, 1e-6)){
|
|
|
+ if(qua && !same(object.quaternion, qua, 1e-6)){
|
|
|
y.start(v.quaternion(object.quaternion, qua), o.dur, (e)=>{
|
|
|
|
|
|
},0, A[f.transition.movementEasing], "transitionPos", _transitionPosId)
|
|
|
}
|
|
|
|
|
|
|
|
|
- if(!same(object.scale, scale, 0.001)){
|
|
|
+ if(scale && !same(object.scale, scale, 0.001)){
|
|
|
y.start(v.vector(object.scale, scale), o.dur, (e)=>{
|
|
|
|
|
|
},0, A[f.transition.movementEasing], "transitionPos", _transitionPosId)
|
|
@@ -23833,22 +23837,38 @@ window.Modernizr = function(n, e, t) {
|
|
|
if(s && vec1.w) s = Math.abs(vec1.w-vec2.w) < diff
|
|
|
return s
|
|
|
}
|
|
|
- this.overlayGroup.children.forEach(overlay=>{
|
|
|
- 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
|
|
|
- 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 )
|
|
|
-
|
|
|
+ //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?
|
|
|
+ var hot = this.model.hots[i];
|
|
|
+ var panoData = hot.transformAtPanos[sid];
|
|
|
+ var useCustom = !panoData
|
|
|
+
|
|
|
+ //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 )
|
|
|
+ //}
|
|
|
+ hot.usingTransformData = !useCustom;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
window._tranOutsideFocus = 4399
|
|
|
n.prototype.focusPoint = function(o={}){//当在外时,聚焦相机到这一点
|
|
|
console.log("focusPoint")
|