|
@@ -21966,17 +21966,23 @@ function o(a, s, l) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- var getQuaByAim = function (aim, center) {
|
|
|
|
|
|
+ /* var getQuaByAim = function (aim, center) {
|
|
return new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 0, -1), aim.clone().sub(center).normalize())
|
|
return new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 0, -1), aim.clone().sub(center).normalize())
|
|
//或var _ = (new THREE.Matrix4).lookAt(pano.position, aim, new THREE.Vector3(0,1,0)); aimQua = (new THREE.Quaternion).setFromRotationMatrix(_);
|
|
//或var _ = (new THREE.Matrix4).lookAt(pano.position, aim, new THREE.Vector3(0,1,0)); aimQua = (new THREE.Quaternion).setFromRotationMatrix(_);
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ } */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
t.prototype.flyToPano = function(e, t) {
|
|
t.prototype.flyToPano = function(e, t) {
|
|
|
|
|
|
var i, n = e.pano, aim = e.lookAtPoint, aimQua = e.quaternion,//ADD
|
|
var i, n = e.pano, aim = e.lookAtPoint, aimQua = e.quaternion,//ADD
|
|
o = e.duration, a = e.aimDuration, s = e.maxDistanceOverride,
|
|
o = e.duration, a = e.aimDuration, s = e.maxDistanceOverride,
|
|
l = e.skipWarpingCheck, c = e.constantMoveSpeed, h = null, u = null
|
|
l = e.skipWarpingCheck, c = e.constantMoveSpeed, h = null, u = null
|
|
- if (aim) aimQua = getQuaByAim(aim, n.position)
|
|
|
|
|
|
+
|
|
|
|
+ if (aim){
|
|
|
|
+ var m = (new B.Matrix4).lookAt(n.position, r, T.UP)
|
|
|
|
+ aimQua = (new B.Quaternion).setFromRotationMatrix(m)
|
|
|
|
+ }
|
|
else aimQua = aimQua
|
|
else aimQua = aimQua
|
|
|
|
|
|
var zoomLevel = e.zoomLevel || 1 //add
|
|
var zoomLevel = e.zoomLevel || 1 //add
|
|
@@ -22045,10 +22051,12 @@ function o(a, s, l) {
|
|
G.cancelById(q.LookTransition),
|
|
G.cancelById(q.LookTransition),
|
|
p *= k.transition.aimSlowFactor;
|
|
p *= k.transition.aimSlowFactor;
|
|
var g = this.cameraControls.activeControl.camera.quaternion.clone()
|
|
var g = this.cameraControls.activeControl.camera.quaternion.clone()
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
, y = g.clone()
|
|
, y = g.clone()
|
|
, A = new B.Vector3;
|
|
, A = new B.Vector3;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if (n === this.currentPano) {
|
|
if (n === this.currentPano) {
|
|
var C = T.FORWARD.clone().applyQuaternion(g)
|
|
var C = T.FORWARD.clone().applyQuaternion(g)
|
|
, I = T.FORWARD.clone().applyQuaternion(aimQua)
|
|
, I = T.FORWARD.clone().applyQuaternion(aimQua)
|