|
@@ -1174,18 +1174,20 @@ window.initHot = function(model){
|
|
|
|
|
|
examine(options={}) {
|
|
examine(options={}) {
|
|
var openHot = this.info.link && this.info.actionType.openHot && !options.dontOpen
|
|
var openHot = this.info.link && this.info.actionType.openHot && !options.dontOpen
|
|
- var fastTran = !options.dontFastTran && this.info.actionType.fastTran
|
|
|
|
- if(fastTran){
|
|
|
|
- let info = this.info.cameraData
|
|
|
|
- player.blackToPano({
|
|
|
|
- pano: player.model.panos.index[info.pano.uuid],
|
|
|
|
- quaternion: new THREE.Quaternion().fromArray(info.camera.quaternion)
|
|
|
|
- })
|
|
|
|
|
|
+ var fastTran = !options.dontFastTran && ( this.info.actionType.fastTran || settings.hotFastTran || options.fastTran)
|
|
|
|
+ if(fastTran){//瞬间过渡 1到固定方位 2到和普通过渡一样的位置,也就是最适合的位置
|
|
|
|
+ let info = this.info.cameraData
|
|
|
|
+ if(info){
|
|
|
|
+ player.blackToPano({
|
|
|
|
+ pano: player.model.panos.index[info.pano.uuid],
|
|
|
|
+ quaternion: new THREE.Quaternion().fromArray(info.camera.quaternion)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- var needExamine = !fastTran && (options.examine || (!settings.dontExamHot && this.info.actionType.examine))
|
|
|
|
|
|
+ var needExamine = !this.info.cameraData && (options.examine || (!settings.dontExamHot && this.info.actionType.examine))
|
|
if(!openHot && !needExamine)return;
|
|
if(!openHot && !needExamine)return;
|
|
|
|
|
|
|
|
|
|
@@ -1310,7 +1312,18 @@ window.initHot = function(model){
|
|
aimDuration: options.aimDuration,
|
|
aimDuration: options.aimDuration,
|
|
|
|
|
|
};
|
|
};
|
|
- player.flyToPano(d, done)
|
|
|
|
|
|
+ if(fastTran){
|
|
|
|
+ let f = (new THREE.Matrix4).lookAt(c.position, h, new THREE.Vector3(0,1,0));
|
|
|
|
+ let quaternion = (new THREE.Quaternion).setFromRotationMatrix(f)
|
|
|
|
+ player.blackToPano({
|
|
|
|
+ pano:c,
|
|
|
|
+ quaternion,
|
|
|
|
+ })
|
|
|
|
+ done()
|
|
|
|
+ }else{
|
|
|
|
+ player.flyToPano(d, done)
|
|
|
|
+ }
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
var p = {
|
|
var p = {
|
|
pano: c
|
|
pano: c
|