Browse Source

Replaced distanceTo with distanceToSquared on line 245 in TrackballControls.js

minglars 13 years ago
parent
commit
7f13327b02
1 changed files with 1 additions and 1 deletions
  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 );
 		_this.object.lookAt( _this.target );
 
 
-		if ( lastPosition.distanceTo( _this.object.position ) > 0 ) {
+		if ( lastPosition.distanceToSquared( _this.object.position ) > 0 ) {
 
 
 			_this.dispatchEvent( changeEvent );
 			_this.dispatchEvent( changeEvent );