Browse Source

Changed less than to less or equal than for orbit control's theta min max check.

Luna 4 years ago
parent
commit
806fe595a4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/js/controls/OrbitControls.js
  2. 1 1
      examples/jsm/controls/OrbitControls.js

+ 1 - 1
examples/js/controls/OrbitControls.js

@@ -173,7 +173,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 
 				if ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;
 				if ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;
 
 
-				if ( min < max ) {
+				if ( min <= max ) {
 
 
 					spherical.theta = Math.max( min, Math.min( max, spherical.theta ) );
 					spherical.theta = Math.max( min, Math.min( max, spherical.theta ) );
 
 

+ 1 - 1
examples/jsm/controls/OrbitControls.js

@@ -183,7 +183,7 @@ var OrbitControls = function ( object, domElement ) {
 
 
 				if ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;
 				if ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;
 
 
-				if ( min < max ) {
+				if ( min <= max ) {
 
 
 					spherical.theta = Math.max( min, Math.min( max, spherical.theta ) );
 					spherical.theta = Math.max( min, Math.min( max, spherical.theta ) );