checkDistances method

dynamic checkDistances()

Implementation

checkDistances() {
  if (!scope.noZoom || !scope.noPan) {
    if (_eye.lengthSq() > scope.maxDistance * scope.maxDistance) {
      scope.object.position
          .addVectors(scope.target, _eye.setLength(scope.maxDistance));
      _zoomStart.copy(_zoomEnd);
    }

    if (_eye.lengthSq() < scope.minDistance * scope.minDistance) {
      scope.object.position
          .addVectors(scope.target, _eye.setLength(scope.minDistance));
      _zoomStart.copy(_zoomEnd);
    }
  }
}