Преглед на файлове

Merge remote-tracking branch 'bhouston/test-suite' into dev

Mr.doob преди 12 години
родител
ревизия
3fceabf4c6
променени са 3 файла, в които са добавени 8 реда и са изтрити 5 реда
  1. 1 1
      src/core/Box2.js
  2. 7 2
      test/core/Box2.js
  3. 0 2
      test/core/Plane.js

+ 1 - 1
src/core/Box2.js

@@ -112,7 +112,7 @@ THREE.Box2.prototype = {
 
 	},
 
-	volume: function () {
+	area: function () {
 
 		return ( this.max.x - this.min.x ) * ( this.max.y - this.min.y );
 

+ 7 - 2
test/core/Box2.js

@@ -51,9 +51,9 @@ test( "empty/makeEmpty", function() {
 	ok( a.empty(), "Passed!" );
 });
 
-test( "volume", function() {
+test( "area", function() {
 	var a = new THREE.Box2( zero, one );
-	ok( a.volume() == 1, "Passed!" );
+	ok( a.area() == 1, "Passed!" );
 });
 
 test( "center", function() {
@@ -86,16 +86,21 @@ test( "expandByPoint", function() {
 
 	a.expandByPoint( one.clone().negate() );
 	ok( a.size().equals( one.clone().multiplyScalar( 2 ) ), "Passed!" );
+	console.log( a );
+	console.log( a.center() );
 	ok( a.center().equals( zero ), "Passed!" );
 });
 
 test( "expandByVector", function() {
 	var a = new THREE.Box2( zero );
+	console.log( a );
 
 	a.expandByVector( zero );
+	console.log( a );
 	ok( a.size().equals( zero ), "Passed!" );
 
 	a.expandByVector( one );
+	console.log( a );
 	ok( a.size().equals( one.clone().multiplyScalar( 2 ) ), "Passed!" );
 	ok( a.center().equals( zero ), "Passed!" );
 });

+ 0 - 2
test/core/Plane.js

@@ -11,8 +11,6 @@ test( "constructor", function() {
 	ok( a.normal.z == 0, "Passed!" );
 	ok( a.constant == 0, "Passed!" );
 
-	console.log( one );
-
 	a = new THREE.Plane( one, 0 );
 	ok( a.normal.x == 1, "Passed!" );
 	ok( a.normal.y == 1, "Passed!" );