Bläddra i källkod

Fixed zoom bug in trackball control

michaelg 10 år sedan
förälder
incheckning
f2645597df
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      examples/js/controls/TrackballControls.js

+ 2 - 0
examples/js/controls/TrackballControls.js

@@ -278,12 +278,14 @@ THREE.TrackballControls = function ( object, domElement ) {
 			if ( _eye.lengthSq() > _this.maxDistance * _this.maxDistance ) {
 
 				_this.object.position.addVectors( _this.target, _eye.setLength( _this.maxDistance ) );
+				_zoomStart.copy( _zoomEnd );
 
 			}
 
 			if ( _eye.lengthSq() < _this.minDistance * _this.minDistance ) {
 
 				_this.object.position.addVectors( _this.target, _eye.setLength( _this.minDistance ) );
+				_zoomStart.copy( _zoomEnd );
 
 			}