Explorar o código

Fixed zoom bug in trackball control

michaelg %!s(int64=10) %!d(string=hai) anos
pai
achega
f2645597df
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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 );
 
 			}