Browse Source

Replaced distanceTo with distanceToSquared on line 245 in TrackballControls.js

minglars 13 năm trước cách đây
mục cha
commit
7f13327b02
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/extras/controls/TrackballControls.js

+ 1 - 1
src/extras/controls/TrackballControls.js

@@ -253,7 +253,7 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 		_this.object.lookAt( _this.target );
 
-		if ( lastPosition.distanceTo( _this.object.position ) > 0 ) {
+		if ( lastPosition.distanceToSquared( _this.object.position ) > 0 ) {
 
 			_this.dispatchEvent( changeEvent );