|
@@ -5,7 +5,10 @@
|
|
|
window.common = null;
|
|
|
window.MathLight = null;
|
|
|
window.math = null
|
|
|
-
|
|
|
+window.easing = null
|
|
|
+window.lerp = null
|
|
|
+window.transitions = null
|
|
|
+window.browser = null
|
|
|
window.momentTourBlackNewType = 0//true
|
|
|
|
|
|
g_playAudio = null
|
|
@@ -30,31 +33,8 @@ g_tourAudio.oncanplaythrough = function() {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-var sortByScore = function(list, request, rank) {
|
|
|
- var i = common.filterAll(list, request);
|
|
|
- return 0 === i.length ? null : i = i.map(function(e) {
|
|
|
- return {
|
|
|
- item: e,
|
|
|
- score: rank.reduce(function(t, i) {
|
|
|
- return t + i(e);
|
|
|
- }, 0)
|
|
|
- };
|
|
|
- }).sort(function(e, t) {
|
|
|
- return t.score - e.score;
|
|
|
- });
|
|
|
-};
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
var dom = {//许钟文add
|
|
|
getOffset: function(type, element, parent) {
|
|
@@ -68,6 +48,178 @@ var dom = {//许钟文add
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+var convertTool = {
|
|
|
+ getPos2d : function(point, camera, dom){//获取一个三维坐标对应屏幕中的二维坐标
|
|
|
+ var camera = camera || player.camera;
|
|
|
+ var dom = dom || player.domElement;
|
|
|
+ var pos = point.clone().project(camera) //比之前hotspot的计算方式写得简单 project用于3转2(求法同shader); unproject用于2转3 :new r.Vector3(e.x, e.y, -1).unproject(this.camera);
|
|
|
+
|
|
|
+ var x,y;
|
|
|
+ x = (pos.x + 1) / 2 * dom.clientWidth;
|
|
|
+ y = (1 - (pos.y + 1) / 2) * dom.clientHeight;
|
|
|
+
|
|
|
+ var inSight = x <= dom.clientWidth && x >= 0 //是否在屏幕中
|
|
|
+ && y <= dom.clientHeight && y >= 0
|
|
|
+
|
|
|
+
|
|
|
+ return {
|
|
|
+ pos: new THREE.Vector2(x,y), // 屏幕像素坐标
|
|
|
+ vector: pos, //(范围 -1 ~ 1)
|
|
|
+ trueSide : pos.z<1, //trueSide为false时,即使在屏幕范围内可见,也是反方向的另一个不可以被渲染的点 参见Tag.update
|
|
|
+ inSight : inSight //在屏幕范围内可见
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ ifShelter: function(pos3d, pos2d){//检测某点在视线中是否被mesh遮挡
|
|
|
+ if(!pos2d) pos2d = this.getPos2d(pos3d);
|
|
|
+ var player = player;
|
|
|
+ var ori = new THREE.Vector3(pos2d.x, pos2d.y, -1).unproject(player.camera); //找到视线原点
|
|
|
+ var dir = pos3d.clone().sub(ori).normalize();
|
|
|
+ ray.set(ori, dir)//由外向里 因为模型从内侧是可见的所以从外侧
|
|
|
+
|
|
|
+
|
|
|
+ /* if(config.isEdit && publicObjectSet.editor.mainDesign.editing){
|
|
|
+ var o = ray.intersectObjects(publicObjectSet.editor.mainDesign.wallMeshes);
|
|
|
+ }else{ */
|
|
|
+ var o = ray.intersectObjects(player.model.colliders);
|
|
|
+ //}
|
|
|
+ var len = pos3d.distanceTo(ori);
|
|
|
+ if (o && o.length) {
|
|
|
+ for(var i=0;i<o.length;i++){
|
|
|
+ if(o[i].distance < len){ return true; }//有遮挡
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ /*
|
|
|
+ 拖拽时,获取鼠标在拖拽面上的位置(需要借助另一个intersectPlane面来计算,即和相机方向一样的面,可保证铺满屏幕)
|
|
|
+ 但是不一定能获取到,比如鼠标射线不朝向拖拽面时,即使获取也会是一个意外的反方向的交点。
|
|
|
+ */
|
|
|
+ getPosAtPlane : function(pos, info/* , mouse, camera */){ //pos:与intersectPlane的交点 见笔记
|
|
|
+ var A = pos;
|
|
|
+ var player = player;
|
|
|
+ var mouse = player.mouse;
|
|
|
+ var O = new THREE.Vector3(mouse.x, mouse.y, -1).unproject(player.camera);
|
|
|
+
|
|
|
+
|
|
|
+ if(info.y != void 0){//地面线的
|
|
|
+
|
|
|
+ var y = info.y;
|
|
|
+
|
|
|
+ if(player.mode == "floorplan"/* || Math.abs(O.x-pos.x)<0.0001 && Math.abs(O.z-pos.z)<0.0001) */){
|
|
|
+ //intersectPlane和地面平行,无交点
|
|
|
+ var x = pos.x, z = pos.z;
|
|
|
+
|
|
|
+ }else{
|
|
|
+
|
|
|
+ if(y<player.camera.position.y && O.y <= A.y /* || y>player.camera.position.y && O.y >= A.y */)return null; //鼠标射线向上。因为相机一定位于地面以上(地面不会抬高到相机上吧?),所以无交点。
|
|
|
+ if(O.y == A.y){console.log('一样??');return;}
|
|
|
+ if(A.y == y){console.log('一样2??');return;}
|
|
|
+ var r = (O.y-y)/(A.y-y);
|
|
|
+ var x = (r*A.x-O.x)/(r-1);
|
|
|
+ var z = (r*A.z-O.z)/(r-1);
|
|
|
+ }
|
|
|
+ }else{//垂直的也有越过消失点以后反向变化的情况,但使用时影响不大
|
|
|
+ var N = info.normalVec;
|
|
|
+ var P = info.pullPos;
|
|
|
+ if(N.y != 0 ){console.log('N.y != 0');return;} //仅仅支持垂直于地面的的墙壁,目前都是
|
|
|
+ if(O.z==A.z){console.log('O.z==A.z?');return;}
|
|
|
+ if(N.z!=0 && N.x != 0){//直接用这个通用的也可以,支持斜线的墙
|
|
|
+ //console.log('N.z==0 && N.x == 0?');
|
|
|
+ var c = ( N.x*(A.x-O.x) + N.y*(A.y-O.y) + N.z*(A.z-O.z));
|
|
|
+ if(c == 0){console.log("分母为0?? return;");return;}
|
|
|
+ var t = -((N.x*O.x + N.y*O.y + N.z*O.z) - (P.x*N.x + P.y*N.y + P.z*N.z) ) / c
|
|
|
+ var x = t * (A.x - O.x) + O.x;
|
|
|
+ var y = t * (A.y - O.y) + O.y;
|
|
|
+ var z = t * (A.z - O.z) + O.z;
|
|
|
+ /*原理: 已知空间直线L:(x-a)/m=(x-b)/n=(z-c)/p和空间平面π:Ax+By+Cz+D=0;
|
|
|
+ 求直线L与平面π的交点的坐标。
|
|
|
+ 把直线方程改写成参数形式:设(x-a)/m=(x-b)/n=(z-c)/p=t;
|
|
|
+ 则x=mt+a;y=nt+b;z=pt+c;代入平面π的方程得:
|
|
|
+ A(mt+a)+B(nt+b)+C(pt+c)+D=0
|
|
|
+ 由此解得t=-(Aa+Bb+Cc+D)/(Am+Bn+Cp)
|
|
|
+ 再代入参数方程即得交点的坐标(x,y,z). */
|
|
|
+ }else if(N.x ==0 ){ //z与pullPos相等
|
|
|
+ var z = P.z;
|
|
|
+ if(O.y == A.y){console.log('一样??');return;}
|
|
|
+ if(A.y == y){console.log('一样2??');return;}
|
|
|
+ if(A.z == z){console.log('一样3??');return;}
|
|
|
+ var r = (O.z-z)/(A.z-z);
|
|
|
+ var x = (r*A.x-O.x)/(r-1);
|
|
|
+ var y = (r*A.y-O.y)/(r-1);
|
|
|
+ }else if(N.z == 0){//x与pullPos相等
|
|
|
+ var x = P.x;
|
|
|
+ if(O.y == A.y){console.log('一样??');return;}
|
|
|
+ if(A.y == y){console.log('一样2??');return;}
|
|
|
+ if(A.x == x){console.log('一样3??');return;}
|
|
|
+ var r = (O.x-x)/(A.x-x);
|
|
|
+ var y = (r*A.y-O.y)/(r-1);
|
|
|
+ var z = (r*A.z-O.z)/(r-1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return new THREE.Vector3(x,y,z);
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ getMouseIntersect : function(camera, meshes, mouse){//获取鼠标和meshes交点
|
|
|
+ var raycaster = new THREE.Raycaster;
|
|
|
+ camera.updateMatrixWorld();
|
|
|
+ var origin = new THREE.Vector3(mouse.x,mouse.y,-1).unproject(camera)
|
|
|
+ , end = new THREE.Vector3(mouse.x,mouse.y,1).unproject(camera);
|
|
|
+ var dir = end.sub(origin).normalize()
|
|
|
+ raycaster.set(origin, dir);
|
|
|
+ var n = raycaster.intersectObjects(meshes);
|
|
|
+ if (0 === n.length)
|
|
|
+ return null;
|
|
|
+ return n[0];
|
|
|
+
|
|
|
+ },
|
|
|
+ ifIntersectChunks : function(A,B,options={}){//获取某个线段/射线和meshes的交点
|
|
|
+ var dir = B.clone().sub(A).normalize();
|
|
|
+ var len = options.InfinityLen ? Infinity : A.distanceTo(B) + (options.extLen||0);
|
|
|
+ var ray = new THREE.Raycaster(A.clone(), dir, 0, len);
|
|
|
+
|
|
|
+ var o = ray.intersectObjects(options.model || player.model.colliders);
|
|
|
+ if (o && o.length)return o;
|
|
|
+
|
|
|
+ if(options.throughWidth){ //允许最小宽度,防止穿过极小的缝隙导致撞墙感
|
|
|
+ var normal = math.getNormal({points:[{x:A.x, y:A.z},{x:B.x, y:B.z}]});//线段法线
|
|
|
+ normal.multiplyScalar(options.throughWidth)
|
|
|
+ var normalVec3 = new THREE.Vector3(normal.x, 0, normal.y);
|
|
|
+
|
|
|
+ var A2 = A.clone().add(normalVec3)
|
|
|
+ ray.set(A2, dir);
|
|
|
+ var o2 = ray.intersectObjects(options.model || player.model.colliders);
|
|
|
+ ray.set(A.clone().add(normalVec3.negate()), dir);
|
|
|
+ if (o2 && o2.length)return o2;
|
|
|
+ var o3 = ray.intersectObjects(options.model || player.model.colliders);
|
|
|
+ if (o3 && o3.length)return o3;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ },
|
|
|
+ getPosAtSphere : function(pos3d, toPanoPos){
|
|
|
+ var dir = pos3d.clone().sub(toPanoPos);
|
|
|
+ dir.normalize();//然后计算在球中
|
|
|
+ dir.multiplyScalar(Constants.skyRadius);
|
|
|
+ dir.add(toPanoPos);
|
|
|
+ return dir;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
!function() {
|
|
|
"use strict";
|
|
|
function t(t, i) {
|
|
@@ -3442,14 +3594,20 @@ window.Modernizr = function(n, e, t) {
|
|
|
, h = e("../util/browser");
|
|
|
n.prototype = Object.create(a.prototype),
|
|
|
n.prototype.zoomToContain = function(e) {
|
|
|
- var t = Math.max(e.x, e.z)
|
|
|
- , i = Math.min(e.x, e.z)
|
|
|
- , n = Math.max(t, i * this.camera.aspect)
|
|
|
- , r = Math.max(i, t * this.camera.aspect);
|
|
|
- this.absoluteScale = (h.aspectRatio() < 1 ? r : n) / 2 / o.orthoBase * 1.2,
|
|
|
+ this.absoluteScale = this.getDefaultAbsoluteScale(e);
|
|
|
this.currentScale = this.absoluteScale
|
|
|
}
|
|
|
,
|
|
|
+ n.prototype.getDefaultAbsoluteScale = function(modelSize) {
|
|
|
+ var t = Math.max(modelSize.x, modelSize.z)
|
|
|
+ , i = Math.min(modelSize.x, modelSize.z)
|
|
|
+ , n = Math.max(t, i * this.camera.aspect)
|
|
|
+ , r = Math.max(i, t * this.camera.aspect);
|
|
|
+ var absoluteScale = (h.aspectRatio() < 1 ? r : n) / 2 / o.orthoBase * 1.2
|
|
|
+ return absoluteScale
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
n.prototype.rotateToView = function(e, t) {
|
|
|
var i = 0
|
|
|
, n = h.aspectRatio() < 1
|
|
@@ -4242,8 +4400,15 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.rotationSpeed.x = this.rotationSpeed.x * (1 - a.rotationFriction) + this.rotationAcc.x * a.rotationAccelerationInside,
|
|
|
this.rotationSpeed.y = this.rotationSpeed.y * (1 - a.rotationFriction) + this.rotationAcc.y * a.rotationAccelerationInside,
|
|
|
this.lon += this.rotationSpeed.x * e,
|
|
|
- this.lat += this.rotationSpeed.y * e,
|
|
|
- this.lat = Math.max(a.insideLookLimitDown, Math.min(a.insideLookLimitUp, this.lat)),
|
|
|
+ this.lat += this.rotationSpeed.y * e
|
|
|
+
|
|
|
+
|
|
|
+ //this.lat = Math.max(a.insideLookLimitDown, Math.min(a.insideLookLimitUp, this.lat)),
|
|
|
+ var insideLookLimitDown = a.insideLookLimitDown - a.insideFOV/2 + this.camera.fov / 2
|
|
|
+ var insideLookLimitUp = a.insideLookLimitUp + a.insideFOV/2 - this.camera.fov / 2
|
|
|
+ this.lat = Math.max(insideLookLimitDown, Math.min(insideLookLimitUp, this.lat)); //通过预定义的俯仰角最大最小范围(insideLookLimitUp、insideLookLimitDown)来限制俯仰角。 注:这种数学计算很常见,因此API也很常见(clamp),等价于 this.lat = THREE.Math.clamp( this.lat, settings.insideLookLimitDown, settings.insideLookLimitUp );
|
|
|
+
|
|
|
+
|
|
|
this.phi = r.Math.degToRad(90 - this.lat),
|
|
|
this.theta = r.Math.degToRad(this.lon),
|
|
|
this.lookVector.x = Math.sin(this.phi) * Math.cos(this.theta),
|
|
@@ -4753,70 +4918,69 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
,
|
|
|
n.prototype.goToDestination = function(e, t, i, n) {
|
|
|
-
|
|
|
-<<<<<<< HEAD
|
|
|
- //音频
|
|
|
+ //音频
|
|
|
+ //if(this.destinationItem[1] == 0){//如果是每个folder的起始
|
|
|
var musicInfo = this.model.heroLocations[this.destinationItem[0]].musicInfo
|
|
|
if(musicInfo && musicInfo.music){
|
|
|
-
|
|
|
var o = musicInfo.music.includes(g_Prefix.slice(-10)) ? musicInfo.music : g_Prefix + musicInfo.music;
|
|
|
- g_tourAudio.src = manage.dealURL(o);
|
|
|
- g_tourAudio.load()
|
|
|
- }
|
|
|
-
|
|
|
-=======
|
|
|
- //音频
|
|
|
- //if(this.destinationItem[1] == 0){//如果是每个folder的起始
|
|
|
- var musicInfo = this.model.heroLocations[this.destinationItem[0]].musicInfo
|
|
|
- if(musicInfo && musicInfo.music){
|
|
|
- var o = musicInfo.music.includes(g_Prefix.slice(-10)) ? musicInfo.music : g_Prefix + musicInfo.music;
|
|
|
-
|
|
|
- let audioSrc1 = g_tourAudio.src.split('/').pop();
|
|
|
- let audioSrc2 = o.split('/').pop();
|
|
|
-
|
|
|
- if(audioSrc1 == audioSrc2){//应该是继续播放该folder
|
|
|
- if(this.destinationItem[1] == 0){//从头开始播放 因为可能暂停后然后再点该缩略图播
|
|
|
- g_tourAudio.currentTime = 0; g_tourAudio.play();
|
|
|
- }else if(g_tourAudio.paused && g_tourAudio.currentTime < g_tourAudio.duration){//未播完
|
|
|
- g_tourAudio.play()
|
|
|
- }
|
|
|
-
|
|
|
- }else{//很可能是该folder的起始
|
|
|
- g_tourAudio.src = manage.dealURL(o);
|
|
|
- g_tourAudio.load()
|
|
|
- }
|
|
|
+
|
|
|
+ let audioSrc1 = g_tourAudio.src.split('/').pop();
|
|
|
+ let audioSrc2 = o.split('/').pop();
|
|
|
+
|
|
|
+ if(audioSrc1 == audioSrc2){//应该是继续播放该folder
|
|
|
+ if(this.destinationItem[1] == 0){//从头开始播放 因为可能暂停后然后再点该缩略图播
|
|
|
+ g_tourAudio.currentTime = 0; g_tourAudio.play();
|
|
|
+ }else if(g_tourAudio.paused && g_tourAudio.currentTime < g_tourAudio.duration){//未播完
|
|
|
+ g_tourAudio.play()
|
|
|
+ }
|
|
|
|
|
|
+ }else{//很可能是该folder的起始
|
|
|
+ g_tourAudio.src = manage.dealURL(o);
|
|
|
+ g_tourAudio.load()
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
//}
|
|
|
->>>>>>> b82e8fc10c1f2cdf49d8cb4e20f09622457e33bb
|
|
|
-
|
|
|
if (this.onTheBus = !0,
|
|
|
this.emit("update.controls"),
|
|
|
this.player.updateLastView(),
|
|
|
- !n && this.atDestinationPano())
|
|
|
+ !n && this.atDestinationPano()){
|
|
|
+ /*
|
|
|
+ // 原地旋转时, 写到_warpCameraAim里,因那有时间
|
|
|
+ var r = this.model.getHeroDescriptorByIndex(this.destinationItem)
|
|
|
+ if(r.zoom && r.zoom != this.player.zoomLevel){//add
|
|
|
+ this.player.smoothZoomFovTo(null, r.zoom, a.warp.teleportTime) //瞬间过渡的时间
|
|
|
+ } */
|
|
|
return void this.arrivedAtDestination(!0);
|
|
|
+ }
|
|
|
if (this.player.flying || this.player.isWarping())
|
|
|
A.warn("Cannot go to new destination while player is flying or warping.");
|
|
|
else {
|
|
|
var r = this.model.getHeroDescriptorByIndex(this.destinationItem)
|
|
|
, o = null
|
|
|
- , a = null;
|
|
|
+ , a1 = null;
|
|
|
if (r.isPano()) {
|
|
|
|
|
|
//var s = 0 === this.destinationItem || e ? u.BLACK : this.nextWarpStyle;
|
|
|
//var walk = window.MP_PREFETCHED_MODELDATA.black ? 'black' : 'walk';
|
|
|
|
|
|
var s = this.getMomentTour(this.destinationItem) //window.MP_PREFETCHED_MODELDATA.momentTour || "walk";
|
|
|
- a = 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)
|
|
|
+
|
|
|
+ if(s=='black' && r.zoom && r.zoom != this.player.zoomLevel){//add
|
|
|
+ this.player.smoothZoomFovTo(null, r.zoom, a.warp.teleportTime) //瞬间过渡的时间
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
} else{
|
|
|
- a = this.player.warpToNonPanoByHeroIndex.bind(this.player, this.destinationItem, this.actionComplete.bind(this)),
|
|
|
+ a1 = this.player.warpToNonPanoByHeroIndex.bind(this.player, this.destinationItem, this.actionComplete.bind(this)),
|
|
|
o = this.arrivedAtDestination.bind(this, !1);
|
|
|
}
|
|
|
this.transitionStage = y.Moving,
|
|
|
this.model.fadePanoMarkers(0),
|
|
|
this.awaitCompletion(function() {
|
|
|
- a();
|
|
|
+ a1();
|
|
|
}
|
|
|
.bind(this), o),
|
|
|
this.emit("update.controls")
|
|
@@ -5055,7 +5219,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
|
|
|
|
|
|
- var momentTour = this.getMomentTour(this.destinationItem);
|
|
|
+ /* var momentTour = this.getMomentTour(this.destinationItem);
|
|
|
if ( "black" === momentTour) { // 方奕卓 瞬间过渡, 相机缩放至1
|
|
|
var zoomLevel = this.player.zoomLevel;
|
|
|
this.player.zoomEnabled = true;
|
|
@@ -5066,18 +5230,22 @@ window.Modernizr = function(n, e, t) {
|
|
|
s.start(zoom, 1500, function(){
|
|
|
|
|
|
}, 0, d.easeOutQuad, "zoom")
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
this.goToDestination()
|
|
|
}
|
|
|
,
|
|
|
n.prototype.getMomentTour = function(destinationItem) {//add
|
|
|
-
|
|
|
- if(!destinationItem || destinationItem[1] == 0) return window.MP_PREFETCHED_MODELDATA.momentTour || "walk";
|
|
|
+ var wholeMomentTour = window.MP_PREFETCHED_MODELDATA.momentTour || "walk"; //最外层
|
|
|
+
|
|
|
+ if(!destinationItem) return wholeMomentTour
|
|
|
else{
|
|
|
- var currentLocation = this.model.heroLocations[destinationItem[0]];
|
|
|
- return currentLocation.momentTour || "walk";
|
|
|
- }
|
|
|
+ var currentLocation = this.model.getHeroDescriptorByIndex(destinationItem)//最内层。 如果有使用最内层
|
|
|
+ if(currentLocation.momentTour)return currentLocation.momentTour;
|
|
|
+
|
|
|
+ var currentLocation_ = this.model.heroLocations[destinationItem[0]];
|
|
|
+ return currentLocation_.momentTour || wholeMomentTour; //若中间层或最内层有就使用,否则使用最外层
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -17422,6 +17590,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
sid: info.sid
|
|
|
}
|
|
|
var item = new s(l);
|
|
|
+ item.momentTour = info.momentTour
|
|
|
container.push(item)
|
|
|
return item
|
|
|
}
|
|
@@ -18328,19 +18497,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- /* n.prototype.setEyeDir = function(dir,pos) {//add
|
|
|
- this.skybox.material.setEyeDir(dir,pos),
|
|
|
- this.chunks.forEach(function(n) {
|
|
|
- n.materialInside.setEyeDir(dir,pos)
|
|
|
- })
|
|
|
- }
|
|
|
- ,
|
|
|
- n.prototype.setBendCameraQua = function(m) {//add
|
|
|
- this.skybox.material.setEyeDir(m),
|
|
|
- this.chunks.forEach(function(n) {
|
|
|
- n.materialInside.setEyeDir(m)
|
|
|
- })
|
|
|
- } */
|
|
|
+
|
|
|
|
|
|
,
|
|
|
|
|
@@ -20512,7 +20669,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.obj3d && this.obj3d.updateMatrixWorld()
|
|
|
}
|
|
|
,
|
|
|
- n.prototype.calcBurnsAmount = function(e) {
|
|
|
+ n.prototype.calcBurnsAmount = function(e) {//计算导览点旋转角
|
|
|
var t = r.Math.degToRad(c.warp.burnsAngle);
|
|
|
|
|
|
if (this.player.mode === a.PANORAMA) {
|
|
@@ -20574,6 +20731,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
var l = this.playerControls.cameras[a.PANORAMA];
|
|
|
n.setFromQuaternion(l.quaternion, c.warp.eOrder);
|
|
|
var u = r * s / i;
|
|
|
+ u = Math.sign(u) * Math.max(u, 0.0001) //add 如果音频长的话,使旋转可见,否则以为停住了
|
|
|
n.y += u,
|
|
|
o.set(0, 0, -1),
|
|
|
o.applyEuler(n),
|
|
@@ -20588,18 +20746,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.startWarpState(),
|
|
|
p.start(u, i, h, 0, d.easeInOutQuad, "wait")
|
|
|
|
|
|
- //zoom动画 方奕卓 相机缩放
|
|
|
- var currentGuide = player.model.getHeroDescriptorByIndex(player.director.currentItem)
|
|
|
- if(currentGuide.zoom && currentGuide.zoom != this.player.zoomLevel){
|
|
|
- this.player.zoomEnabled = true;
|
|
|
- var startZoom = this.player.zoomLevel
|
|
|
- var zoom = function(e, d) {
|
|
|
- var zoomLevel = currentGuide.zoom.toFixed(2) * e + startZoom * (1-e);
|
|
|
- this.player.zoomTo( zoomLevel, true)
|
|
|
-
|
|
|
- }.bind(this)
|
|
|
- p.start(zoom, 2000, null, 0, d.easeOutQuad, "zoom")
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
n.prototype.warpToNonPano = function(e) {
|
|
@@ -20672,7 +20819,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
e && e()
|
|
|
}
|
|
|
,
|
|
|
- n.prototype._warpCameraAim = function(e, t) {
|
|
|
+ n.prototype._warpCameraAim = function(e, t) {//到每个片段终点时转向终点朝向。
|
|
|
|
|
|
var i = this.warpDestHeroLoc.quaternion
|
|
|
, n = this.playerControls.cameras[a.PANORAMA]
|
|
@@ -20700,8 +20847,15 @@ window.Modernizr = function(n, e, t) {
|
|
|
void n.lookAt(A))
|
|
|
}
|
|
|
.bind(this);
|
|
|
- return u > c.warp.minRotation ? p.start(C, e, t, 0, d[c.warp.movementEasing]) : (y.info("Aim angle only is " + u.toPrecision(3) + " degrees, skipping explicit re-aim")
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return u > c.warp.minRotation ? (p.start(C, e, t, 0, d[c.warp.movementEasing])
|
|
|
+ ,(this.warpDestHeroLoc.zoom != this.player.zoomLevel) && //add 原地转向最终方位时
|
|
|
+ this.player.smoothZoomFovTo(null, this.warpDestHeroLoc.zoom , e)
|
|
|
+ ):
|
|
|
+ (y.info("Aim angle only is " + u.toPrecision(3) + " degrees, skipping explicit re-aim")
|
|
|
,void (t && t())
|
|
|
)
|
|
|
}
|
|
@@ -21052,7 +21206,13 @@ window.Modernizr = function(n, e, t) {
|
|
|
maxDistanceOverride: c.warp.walkMaxDist,
|
|
|
skipWarpingCheck: !1,
|
|
|
constantMoveSpeed: !0
|
|
|
- };
|
|
|
+ };
|
|
|
+
|
|
|
+ if(e == this.warpDestPano){//到达终点前,放大到终点的zoom
|
|
|
+ n.zoomLevel = this.warpDestHeroLoc.zoom
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
n.duration = u.call(this, e, t),
|
|
|
this.player.nonInterruptingFlyToPano(n, i)
|
|
|
} else
|
|
@@ -22055,12 +22215,12 @@ window.Modernizr = function(n, e, t) {
|
|
|
//window.DownInterface && new DownInterface().state(this,Hot);
|
|
|
window.Hotpoint && new Hotpoint().state(this,Hot);
|
|
|
}
|
|
|
- if( this.overlayGroup.children.length){
|
|
|
- this.overlayGroup.children.forEach((overlay)=>{
|
|
|
- overlay.overlayType == "video" /* && overlay.inSight */&& overlay.plane.material.map.image.play()
|
|
|
- })
|
|
|
- //this.overlayInitedPlay = true
|
|
|
- }
|
|
|
+
|
|
|
+ /* this.overlayGroup.children.forEach((overlay)=>{
|
|
|
+ overlay.overlayType == "video" && overlay.visible && overlay.inSight() && overlay.videoControl(true)
|
|
|
+ }) */
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
|
|
@@ -22401,8 +22561,16 @@ window.Modernizr = function(n, e, t) {
|
|
|
for(var i in this.model.hots){
|
|
|
this.model.hots[i].update(this.camera)
|
|
|
}
|
|
|
+ if(this.mode == 'panorama')this.overlayGroup.children.forEach(overlay=>{
|
|
|
+ if(overlay.overlayType == "video"){
|
|
|
+ if(overlay.visible && overlay.inSight()){
|
|
|
+ overlay.videoControl(true)
|
|
|
+ }else{
|
|
|
+ overlay.videoControl(false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -22740,8 +22908,8 @@ window.Modernizr = function(n, e, t) {
|
|
|
var plane = overlay.plane;
|
|
|
|
|
|
if(overlay.overlayType == "video"){
|
|
|
- if(plane.material.map.image.paused)plane.material.map.image.play()
|
|
|
- else plane.material.map.image.pause();
|
|
|
+ if(plane.material.map.image.paused) plane.material.map.image.play()
|
|
|
+ else plane.material.map.image.pause()
|
|
|
}
|
|
|
|
|
|
/* if(window.EditOverlay &&EditOverlay.editing){
|
|
@@ -22764,7 +22932,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
for(var i in this.model.hots){
|
|
|
t.push(this.model.hots[i].mesh);
|
|
|
}
|
|
|
- this.overlayGroup && (t = t.concat(this.overlayGroup.children));
|
|
|
+
|
|
|
+ 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);
|
|
|
this.raycaster.set(i, this.getMouseDirection(e));
|
|
|
var n = this.raycaster.intersectObjects(t, true);//add true
|
|
@@ -22966,18 +23137,34 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
hots[index].mesh.visible = visible;
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
n.prototype.flyToPano = function(e, t) {
|
|
|
var i = e.pano
|
|
|
- , n = e.lookAtPoint
|
|
|
+ , aim = e.lookAtPoint
|
|
|
+ , aimQua = e.quaternion //ADD
|
|
|
, o = e.duration
|
|
|
, a = e.aimDuration
|
|
|
, s = e.maxDistanceOverride
|
|
|
, l = e.skipWarpingCheck
|
|
|
, c = e.constantMoveSpeed
|
|
|
, h = null
|
|
|
- , p = null;
|
|
|
- window.specialScene && specialScene.special().specifySpot && specialScene.special().specifySpot(i);
|
|
|
+ , p = null
|
|
|
+
|
|
|
+ if (aim){
|
|
|
+ var _ = (new r.Matrix4).lookAt(i.position, aim, d.UP)
|
|
|
+ aimQua = (new r.Quaternion).setFromRotationMatrix(_)
|
|
|
+ }
|
|
|
+ else aimQua = aimQua
|
|
|
+
|
|
|
+ var zoomLevel = e.zoomLevel || 1 //add
|
|
|
+
|
|
|
+ if(this.flying) return t && t(e)
|
|
|
+ window.specialScene && specialScene.special().specifySpot && specialScene.special().specifySpot(i);
|
|
|
+
|
|
|
+
|
|
|
if (this.isWarping() && !l && (this.path.activeTransType === x.BLACK || this.path.activeTransType === x.STD))
|
|
|
return F.warn("Player.flyToPano() -> Cannot fly when warping"),
|
|
|
t && t(),
|
|
@@ -22985,12 +23172,11 @@ window.Modernizr = function(n, e, t) {
|
|
|
if (this.updateLastView(),
|
|
|
this.mode !== u.PANORAMA) {
|
|
|
var m;
|
|
|
- return n && (m = (new r.Quaternion).setFromUnitVectors(d.FORWARD, n.sub(i.position).normalize())),
|
|
|
void this.flyToNewMode({
|
|
|
mode: u.PANORAMA,
|
|
|
pano: i,
|
|
|
duration: o,
|
|
|
- quaternion: m,
|
|
|
+ quaternion: aimQua ,
|
|
|
callback: t
|
|
|
})
|
|
|
}
|
|
@@ -23016,40 +23202,44 @@ window.Modernizr = function(n, e, t) {
|
|
|
var E = s || f.transition.flytimeMaxDistanceThreshold;
|
|
|
I = Math.min(this.currentPano.position.distanceTo(i.position), E) * f.transition.flytimeDistanceMultiplier + f.transition.flyTime
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
if (f.transition.flySpeed > .01 && (I = 1e3 * this.currentPano.position.distanceTo(i.position) / f.transition.flySpeed),
|
|
|
- 1 !== this.zoomLevel)
|
|
|
+ zoomLevel !== this.zoomLevel)
|
|
|
switch (f.zoom.transitionStyle) {
|
|
|
- case 1:
|
|
|
- this.smoothZoomToDefault(I / 2);
|
|
|
+ case 1:
|
|
|
+ this.smoothZoomFovTo(null, zoomLevel, zoomLevel == 1 ? I / 2 : I); //改
|
|
|
break;
|
|
|
case 2:
|
|
|
return h = g.deepExtend(e),
|
|
|
p = this.flyToPano.bind(this, h, t),
|
|
|
- void this.smoothZoomToDefault(f.zoom.restoreTime * (this.zoomLevel - 1), p)
|
|
|
+ void this.smoothZoomFovTo(null, zoomLevel, f.zoom.restoreTime * (this.zoomLevel - 1), p)
|
|
|
}
|
|
|
- if (n) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (aimQua) {
|
|
|
y.cancelById(V.LookTransition),
|
|
|
I *= f.transition.aimSlowFactor;
|
|
|
var b = this.cameraControls.activeControl.camera.quaternion.clone()
|
|
|
- , _ = (new r.Matrix4).lookAt(i.position, n, d.UP)
|
|
|
- , T = (new r.Quaternion).setFromRotationMatrix(_)
|
|
|
+
|
|
|
, S = b.clone()
|
|
|
, M = new r.Vector3;
|
|
|
if (i === this.currentPano) {
|
|
|
var R = d.FORWARD.clone().applyQuaternion(b)
|
|
|
- , P = d.FORWARD.clone().applyQuaternion(T)
|
|
|
+ , P = d.FORWARD.clone().applyQuaternion(aimQua)
|
|
|
, O = R.angleTo(P);
|
|
|
return void 0 !== a && null !== a || (a = 1 * Math.sqrt(O) / f.tags.navigate.rotateSpeedFactor * 1e3),
|
|
|
void y.start(function(e) {
|
|
|
S.copy(b),
|
|
|
- v.quaternion(S, T)(e),
|
|
|
+ v.quaternion(S, aimQua)(e),
|
|
|
M.copy(d.FORWARD).applyQuaternion(S).add(this.cameraControls.activeControl.camera.position),
|
|
|
this.cameraControls.activeControl.lookAt(M)
|
|
|
}
|
|
|
.bind(this), a, C, 0, A[f.transition.movementEasing], null, V.LookTransition)
|
|
|
}
|
|
|
}
|
|
|
- if (i === this.currentPano || this.flying)
|
|
|
+ if (i === this.currentPano )
|
|
|
return void C();
|
|
|
this.flying = !0;
|
|
|
var L = this.position.clone()
|
|
@@ -23076,9 +23266,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
//=======================================
|
|
|
|
|
|
|
|
|
- n && y.start(function(e) {
|
|
|
+ aimQua && y.start(function(e) {
|
|
|
S.copy(b),
|
|
|
- v.quaternion(S, T)(e),
|
|
|
+ v.quaternion(S, aimQua)(e),
|
|
|
M.copy(d.FORWARD).applyQuaternion(S).add(this.cameraControls.activeControl.camera.position),
|
|
|
this.cameraControls.activeControl.lookAt(M)
|
|
|
}
|
|
@@ -23101,12 +23291,15 @@ window.Modernizr = function(n, e, t) {
|
|
|
C(e)
|
|
|
|
|
|
//add:
|
|
|
- if(this.mode == "panorama" && this.model.floorLogos){
|
|
|
- this.model.floorLogos[0].position.copy(this.model.floorLogos[1].position)
|
|
|
- //this.model.adjustfloorLogoHeight()
|
|
|
- this.model.changefloorLogoOpa({index:0,opa:1,dur:0});//this.model.floorLogos[0].material.uniforms.opacity.value = 1;
|
|
|
- this.model.floorLogos[1].visible = false;
|
|
|
+ if(this.mode == "panorama" ){
|
|
|
+ if(this.model.floorLogos){
|
|
|
+ this.model.floorLogos[0].position.copy(this.model.floorLogos[1].position)
|
|
|
+ //this.model.adjustfloorLogoHeight()
|
|
|
+ this.model.changefloorLogoOpa({index:0,opa:1,dur:0});//this.model.floorLogos[0].material.uniforms.opacity.value = 1;
|
|
|
+ this.model.floorLogos[1].visible = false;
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
Overlay.updateVisibles([this.currentPano])//add
|
|
|
}
|
|
|
}
|
|
@@ -23168,6 +23361,53 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ window._tranOutsideFocus = 4399
|
|
|
+ n.prototype.focusPoint = function(o={}){//当在外时,聚焦相机到这一点
|
|
|
+ console.log("focusPoint")
|
|
|
+ if(this.mode == "floorplan"){
|
|
|
+ var modelSize = o.modelSize || new THREE.Vector3(8,8,8);//可视范围
|
|
|
+ var control = this.cameraControls.controls.floorplan;
|
|
|
+ var absoluteScale = control.getDefaultAbsoluteScale(modelSize)
|
|
|
+ var currentScale = control.absoluteScale;
|
|
|
+ var currentTarget = control.target.clone()
|
|
|
+
|
|
|
+ y.cancelById(window._tranOutsideFocus, true);
|
|
|
+ y.start(function(progress){
|
|
|
+ control.absoluteScale = absoluteScale*progress + currentScale*(1-progress);
|
|
|
+ control.target = o.aim.clone().multiplyScalar(progress).add(currentTarget.clone().multiplyScalar(1-progress))
|
|
|
+ control.camera.position.copy(control.target.clone().add(control.offset)) //维持角度
|
|
|
+ }.bind(this) , o.dur || 600, null/* cancelFuc */, 0, A[f.transition.movementEasing], "outsideFocus", window._tranOutsideFocus, null/* cancelFuc */);
|
|
|
+
|
|
|
+ }else if(player.mode == "dollhouse"){
|
|
|
+ var control = player.cameraControls.controls.dollhouse;
|
|
|
+ var radius = o.radius || 8;
|
|
|
+ var currentTarget = control.target.clone()
|
|
|
+ var dir = control.offset.clone().normalize()
|
|
|
+ var currentRadius = control.offset.length();
|
|
|
+
|
|
|
+
|
|
|
+ y.cancelById(window._tranOutsideFocus, true);
|
|
|
+ y.start(function(progress){
|
|
|
+ control.target = o.aim.clone().multiplyScalar(progress).add(currentTarget.clone().multiplyScalar(1-progress))
|
|
|
+ let radius_ = radius*progress+currentRadius*(1-progress)
|
|
|
+ control.camera.position.copy(control.target.clone().add(dir.clone().multiplyScalar(radius_)))
|
|
|
+ }.bind(this) , o.dur || 600, null/* cancelFuc */, 0, A[f.transition.movementEasing], "outsideFocus", window._tranOutsideFocus, null/* cancelFuc */);
|
|
|
+ }else if(this.mode == 'panorama'){
|
|
|
+ this.flyToPano({
|
|
|
+ lookAtPoint: o.aim.clone() ,
|
|
|
+ pano: this.currentPano,
|
|
|
+ aimDuration: o.dur || 600
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
n.prototype.fastForwardActivePanoFlight = function(e) {
|
|
|
e = e || f.transition.fastForwardFactor / 10 * 4 + 1,
|
|
|
y.adjustSpeed(V.FlyToPano, e),
|
|
@@ -23764,20 +24004,20 @@ window.Modernizr = function(n, e, t) {
|
|
|
var currentLocation = this.model.heroLocations[this.director.currentItem[0]]
|
|
|
var restChildCount = currentLocation.heroLocations ? (currentLocation.heroLocations.length-this.director.currentItem[1]-1) : 0
|
|
|
var current = g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0
|
|
|
- var waitTime = currentLocation && currentLocation.musicInfo.music ? currentLocation.musicInfo.time - current : 2e3;
|
|
|
+ var rotTime = currentLocation && currentLocation.musicInfo.music ? currentLocation.musicInfo.time - current : 2e3;
|
|
|
|
|
|
if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
|
|
|
var timeEachItem = 2000;//假设每个item飞的时间
|
|
|
- var waitTime = (waitTime-timeEachItem*restChildCount) / (restChildCount+1);
|
|
|
+ var rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);
|
|
|
|
|
|
}
|
|
|
- waitTime = Math.max(0, waitTime)
|
|
|
- console.log("waitTime "+waitTime +" at item "+this.director.currentItem + ",musicCurrentTime:"+current)
|
|
|
+ rotTime = Math.max(0, rotTime)
|
|
|
+ console.log("rotTime "+rotTime +" at item "+this.director.currentItem + ",musicCurrentTime:"+current)
|
|
|
|
|
|
|
|
|
this.path.waitNextStep(e, function() {
|
|
|
t && t()
|
|
|
- }.bind(this), waitTime)
|
|
|
+ }.bind(this), rotTime)
|
|
|
}
|
|
|
,
|
|
|
n.prototype.stopInterlude = function() {
|
|
@@ -23814,12 +24054,26 @@ window.Modernizr = function(n, e, t) {
|
|
|
,
|
|
|
n.prototype.getCurrentNodePanos = function(e) {
|
|
|
this.model.panos.map;
|
|
|
- if (e.length = 0,
|
|
|
- this.path.nodes)
|
|
|
- for (var t = 0; t < this.path.nodes.length; t++) {
|
|
|
- var i = this.path.nodes[t];
|
|
|
- e.push(this.model.panos.get(i))
|
|
|
+ if (e.length = 0, this.path.nodes){
|
|
|
+
|
|
|
+ var momentTour = this.director.getMomentTour(this.director.destinationItem)
|
|
|
+ if(momentTour == 'black'){ //改 upcomingPanos如果是black的只需要起点和终点
|
|
|
+ if(this.path.nodes.length){
|
|
|
+ e.push(this.model.panos.get(this.path.nodes[0]))
|
|
|
+ }
|
|
|
+ if(this.path.nodes.length>1){
|
|
|
+ e.push(this.model.panos.get(this.path.nodes[this.path.nodes.length-1]))
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ for (var t = 0; t < this.path.nodes.length; t++) {
|
|
|
+ var i = this.path.nodes[t];
|
|
|
+ e.push(this.model.panos.get(i))
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
,
|
|
|
n.prototype.zoomIncrementally = function(e) {
|
|
@@ -23908,6 +24162,23 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
y.start(r, e, o, null, 0, A[f.transition.blendEasing])
|
|
|
}
|
|
|
+
|
|
|
+ n.prototype.smoothZoomFovTo = function (fov, zoomLevel, dur, callback) {//add
|
|
|
+
|
|
|
+ var i,
|
|
|
+ n = this.zoomLevel,
|
|
|
+ aimLevel = zoomLevel || this.baseFov / fov
|
|
|
+
|
|
|
+ if (n == aimLevel) return
|
|
|
+
|
|
|
+ var fun = function (e) {
|
|
|
+ e > 1 && (e = 1), (i = n * (1 - e) + e * aimLevel),
|
|
|
+ this.zoomTo(i, !0)
|
|
|
+ }.bind(this)
|
|
|
+
|
|
|
+ y.start(fun, dur, callback, null, 0, A[f.transition.blendEasing])
|
|
|
+ }
|
|
|
+
|
|
|
,
|
|
|
n.prototype.updateZoomPano = function() {
|
|
|
if (!this.panoRenderer.zoomPanoRenderingDisabled && this.mode === u.PANORAMA) {
|
|
@@ -24298,6 +24569,11 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
u.profiling.enabled && this.overrideTextures(),
|
|
|
e.appendChild(this.renderer.domElement)
|
|
|
+
|
|
|
+ /* window.stats = new Stats();
|
|
|
+ e.appendChild( stats.dom ); */
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
n.prototype.overrideTextures = function() {
|
|
@@ -24913,6 +25189,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
this.updateComponents(),
|
|
|
this.updateTextureMemory(),
|
|
|
this.render(),
|
|
|
+ window.stats && (window.fps = stats.update()),
|
|
|
this.emit(a.AfterRender))
|
|
|
};
|
|
|
n.prototype.getImageData = function() {
|
|
@@ -26731,7 +27008,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
const vec4 GREY = vec4(0.5, 0.5, 0.5, 1.0);
|
|
|
vec4 colorFromPanos;
|
|
|
if (blackout == 5){
|
|
|
- colorFromPanos = textureCube( pano1Map, vWorldPosition1.xyz);
|
|
|
+ colorFromPanos = textureCube( pano1Map, vWorldPosition1.xyz) ;
|
|
|
}else{
|
|
|
vec4 colorFromPano0 = textureCube( pano0Map, vWorldPosition0.xyz);
|
|
|
vec4 colorFromPano1 = textureCube( pano1Map, vWorldPosition1.xyz);
|
|
@@ -29713,7 +29990,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
var t = e.neighbourPanos || e.findNeighourPanos()
|
|
|
, i = [];
|
|
|
for (var n in t)
|
|
|
- i.push(this.index[n]);
|
|
|
+ t[n] && i.push(this.index[n]); //add: t[n] &&
|
|
|
return i
|
|
|
}
|
|
|
.bind(this),
|
|
@@ -30178,7 +30455,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
}
|
|
|
var r = e("../exception/DeviceMismatchException");
|
|
|
- t.exports = {
|
|
|
+ window.browser = t.exports = {
|
|
|
isFullscreen: function() {
|
|
|
return document.fullscreenElement || document.mozFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement
|
|
|
},
|
|
@@ -30350,6 +30627,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
return "boolean" == typeof t ? "true" === r || "1" === r : "number" == typeof t ? parseFloat(r) : window.decodeURIComponent(r)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ changeLog()
|
|
|
}
|
|
|
, {
|
|
|
"../exception/DeviceMismatchException": 56
|
|
@@ -30658,7 +30938,21 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
return visiblePanos
|
|
|
}
|
|
|
-
|
|
|
+ ,
|
|
|
+ sortByScore : function(list, request, rank) {
|
|
|
+ var i = this.filterAll(list, request);
|
|
|
+ return 0 === i.length ? null : i = i.map(function(e) {
|
|
|
+ return {
|
|
|
+ item: e,
|
|
|
+ score: rank.reduce(function(t, i) {
|
|
|
+ return t + i(e);
|
|
|
+ }, 0)
|
|
|
+ };
|
|
|
+ }).sort(function(e, t) {
|
|
|
+ return t.score - e.score;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
Math.sign = function(e) {
|
|
@@ -30844,6 +31138,9 @@ window.Modernizr = function(n, e, t) {
|
|
|
}
|
|
|
,
|
|
|
t.exports = n
|
|
|
+
|
|
|
+
|
|
|
+ window.easing = n
|
|
|
}
|
|
|
, {}],
|
|
|
187: [function(e, t, i) {
|
|
@@ -30894,7 +31191,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}],
|
|
|
188: [function(e, t, i) {
|
|
|
"use strict";
|
|
|
- t.exports = {
|
|
|
+ window.lerp = t.exports = {
|
|
|
vector: function(e, t) {
|
|
|
var i = e.clone();
|
|
|
return t = t.clone(),
|
|
@@ -31453,7 +31750,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
195: [function(e, t, i) {
|
|
|
"use strict";
|
|
|
var n = e("./easing");
|
|
|
- t.exports = {
|
|
|
+ window.transitions = t.exports = {
|
|
|
globalDone: null,
|
|
|
funcs: [],
|
|
|
counter: 0,
|
|
@@ -58265,3 +58562,11 @@ function initTransitionPass(THREE){
|
|
|
}
|
|
|
|
|
|
|
|
|
+/*
|
|
|
+ 笔记:
|
|
|
+
|
|
|
+ 导览缩放的几处: 1 搜索smoothZoomFovTo 2 flightStepWalk里
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ */
|