xzw vor 2 Jahren
Ursprung
Commit
b53a284ec1
3 geänderte Dateien mit 34 neuen und 16 gelöschten Zeilen
  1. 14 13
      js/TransformControls.js
  2. 19 2
      js/main_2020_show.js
  3. 1 1
      js/manage.js

+ 14 - 13
js/TransformControls.js

@@ -1262,6 +1262,18 @@ var TransformControlsGizmo = function (options) {
 		handles = handles.concat( this.gizmo[ this.mode ].children );
 		handles = handles.concat( this.helper[ this.mode ].children );
 
+        var eyeDistance = this.worldPosition.distanceTo( this.cameraPosition );
+        
+        //俯视图的透视和距离无关,因此在两种相机切换切换时大小过渡比较困难
+        if(player.mode == "transitioning" && (player.modeTran.split('-')[0] == "floorplan" || player.modeTran.split('-')[1] == "floorplan")){
+            eyeDistance = Math.min(eyeDistance, 6.5)//从一开始很小的距离过渡到俯视图50的高度,会变得很大。
+        }else if(player.mode == "floorplan"){
+            var flcamera = player.cameraControls.cameras.floorplan; 
+            eyeDistance = (flcamera.right - flcamera.left ) / flcamera.aspect ;
+        }
+
+        let scale = eyeDistance * this.size / 7
+
 		for ( var i = 0; i < handles.length; i ++ ) {
 
 			var handle = handles[ i ];
@@ -1271,19 +1283,8 @@ var TransformControlsGizmo = function (options) {
 			handle.visible = true;
 			handle.rotation.set( 0, 0, 0 );
 			handle.position.copy( this.worldPosition );
-
-			var eyeDistance = this.worldPosition.distanceTo( this.cameraPosition );
-			
-			//俯视图的透视和距离无关,因此在两种相机切换切换时大小过渡比较困难
-			if(player.mode == "transitioning" && (player.modeTran.split('-')[0] == "floorplan" || player.modeTran.split('-')[1] == "floorplan")){
- 				eyeDistance = Math.min(eyeDistance, 6.5)//从一开始很小的距离过渡到俯视图50的高度,会变得很大。
- 			}else if(player.mode == "floorplan"){
-				var flcamera = player.cameraControls.cameras.floorplan; 
-				eyeDistance = (flcamera.right - flcamera.left ) / flcamera.aspect ;
- 			}
-			
-			
-			handle.scale.set( 1, 1, 1 ).multiplyScalar( eyeDistance * this.size / 7 );
+ 
+			handle.scale.set( 1, 1, 1 ).multiplyScalar( scale );
 
 			// TODO: simplify helpers and consider decoupling from gizmo
 

+ 19 - 2
js/main_2020_show.js

@@ -14944,7 +14944,7 @@ window.Modernizr = function(n, e, t) {
 					//----许钟文-----------------模型进度条向后调整
 					isNaN(e.totalPercentageLoaded) && (e.totalPercentageLoaded = 0);
 					e.totalPercentageLoaded = modelProgressBase + (1-modelProgressBase)*e.totalPercentageLoaded;
-					console.log('pro:'+e.totalPercentageLoaded)
+					//console.log('pro:'+e.totalPercentageLoaded)
 					//--------------------------- 
 					e.progressCallback && e.progressCallback(100 * e.totalPercentageLoaded)
 				}
@@ -23350,10 +23350,27 @@ window.Modernizr = function(n, e, t) {
             n.prototype.blackToPano = function(o={}) {//add 瞬间过渡
                 //o.panoId = "8bc9156b288d48459e4e0f74d7051ef1"
                 if(this.flying || this.isWarping() )return;
+                let pano = o.pano || this.model.panos.index[o.panoId] 
+                
+                if (this.mode !== u.PANORAMA) {
+                    var m;
+                    void this.flyToNewMode({
+                        mode: u.PANORAMA,
+                        pano ,
+                        duration: o.duration,
+                        quaternion: o.quaternion ,
+                        //callback: t
+                    })
+                }
+               
+                
+                
+                
+                
                 
                 let oldPos = this.position.clone();
                 let oldPano = this.currentPano
-                let pano = o.pano || this.model.panos.index[o.panoId] 
+                
 
                 this.path.warpDestPano = pano
  

+ 1 - 1
js/manage.js

@@ -1105,7 +1105,7 @@ var GifTexDeal = {
         if(count <= 1)return;
         
         transitions.start( (progress)=>{
-            var index = Math.floor(count * progress);
+            var index = Math.floor((count-1) * progress);
             var indexX =  index % info.cellXcount
             var indexY =  info.cellYcount - Math.floor(index /info.cellXcount ) - 1;  //uv.offset.y是从下到上的
             object.animation.texture.offset.x = indexX / info.cellXcount;