Browse Source

Box2/Box3: Renamed .empty() to .isEmpty().

Mr.doob 9 years ago
parent
commit
2e37f1170e
3 changed files with 14 additions and 2 deletions
  1. 12 0
      src/Three.Legacy.js
  2. 1 1
      src/math/Box2.js
  3. 1 1
      src/math/Box3.js

+ 12 - 0
src/Three.Legacy.js

@@ -3,6 +3,12 @@
  */
 
 Object.defineProperties( THREE.Box2.prototype, {
+	empty: {
+		value: function () {
+			console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
+			return this.isEmpty();
+		}
+	},
 	isIntersectionBox: {
 		value: function ( box ) {
 			console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
@@ -12,6 +18,12 @@ Object.defineProperties( THREE.Box2.prototype, {
 } );
 
 Object.defineProperties( THREE.Box3.prototype, {
+	empty: {
+		value: function () {
+			console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
+			return this.isEmpty();
+		}
+	},
 	isIntersectionBox: {
 		value: function ( box ) {
 			console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );

+ 1 - 1
src/math/Box2.js

@@ -76,7 +76,7 @@ THREE.Box2.prototype = {
 
 	},
 
-	empty: function () {
+	isEmpty: function () {
 
 		// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes
 

+ 1 - 1
src/math/Box3.js

@@ -121,7 +121,7 @@ THREE.Box3.prototype = {
 
 	},
 
-	empty: function () {
+	isEmpty: function () {
 
 		// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes