소스 검색

Changed TransformControls scaling factor implementation.

Aki Rodic 5 년 전
부모
커밋
f5a09b6a6b
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      examples/js/controls/TransformControls.js
  2. 1 1
      examples/jsm/controls/TransformControls.js

+ 1 - 1
examples/js/controls/TransformControls.js

@@ -1173,7 +1173,7 @@ THREE.TransformControlsGizmo = function () {
 
 			} else {
 
-				factor = this.worldPosition.distanceTo( this.cameraPosition ) * Math.min( 1.9 * Math.tan( Math.PI * this.camera.getEffectiveFOV() / 360 ), 7 );
+				factor = this.worldPosition.distanceTo( this.cameraPosition ) * Math.min( 1.9 * Math.tan( Math.PI * this.camera.fov / 360 ) / this.camera.zoom, 7 );
 
 			}
 

+ 1 - 1
examples/jsm/controls/TransformControls.js

@@ -1196,7 +1196,7 @@ var TransformControlsGizmo = function () {
 
 			} else {
 
-				factor = this.worldPosition.distanceTo( this.cameraPosition ) * Math.min( 1.9 * Math.tan( Math.PI * this.camera.getEffectiveFOV() / 360 ), 7 );
+				factor = this.worldPosition.distanceTo( this.cameraPosition ) * Math.min( 1.9 * Math.tan( Math.PI * this.camera.fov / 360 ) / this.camera.zoom, 7 );
 
 			}