浏览代码

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

Luna 4 年之前
父节点
当前提交
806fe595a4
共有 2 个文件被更改,包括 2 次插入2 次删除
  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 ( min < max ) {
+				if ( min <= max ) {
 
 					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 ( min < max ) {
+				if ( min <= max ) {
 
 					spherical.theta = Math.max( min, Math.min( max, spherical.theta ) );