提交 3fceabf4 编写于 作者: M Mr.doob

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

...@@ -112,7 +112,7 @@ THREE.Box2.prototype = { ...@@ -112,7 +112,7 @@ THREE.Box2.prototype = {
}, },
volume: function () { area: function () {
return ( this.max.x - this.min.x ) * ( this.max.y - this.min.y ); return ( this.max.x - this.min.x ) * ( this.max.y - this.min.y );
......
...@@ -51,9 +51,9 @@ test( "empty/makeEmpty", function() { ...@@ -51,9 +51,9 @@ test( "empty/makeEmpty", function() {
ok( a.empty(), "Passed!" ); ok( a.empty(), "Passed!" );
}); });
test( "volume", function() { test( "area", function() {
var a = new THREE.Box2( zero, one ); var a = new THREE.Box2( zero, one );
ok( a.volume() == 1, "Passed!" ); ok( a.area() == 1, "Passed!" );
}); });
test( "center", function() { test( "center", function() {
...@@ -86,16 +86,21 @@ test( "expandByPoint", function() { ...@@ -86,16 +86,21 @@ test( "expandByPoint", function() {
a.expandByPoint( one.clone().negate() ); a.expandByPoint( one.clone().negate() );
ok( a.size().equals( one.clone().multiplyScalar( 2 ) ), "Passed!" ); ok( a.size().equals( one.clone().multiplyScalar( 2 ) ), "Passed!" );
console.log( a );
console.log( a.center() );
ok( a.center().equals( zero ), "Passed!" ); ok( a.center().equals( zero ), "Passed!" );
}); });
test( "expandByVector", function() { test( "expandByVector", function() {
var a = new THREE.Box2( zero ); var a = new THREE.Box2( zero );
console.log( a );
a.expandByVector( zero ); a.expandByVector( zero );
console.log( a );
ok( a.size().equals( zero ), "Passed!" ); ok( a.size().equals( zero ), "Passed!" );
a.expandByVector( one ); a.expandByVector( one );
console.log( a );
ok( a.size().equals( one.clone().multiplyScalar( 2 ) ), "Passed!" ); ok( a.size().equals( one.clone().multiplyScalar( 2 ) ), "Passed!" );
ok( a.center().equals( zero ), "Passed!" ); ok( a.center().equals( zero ), "Passed!" );
}); });
......
...@@ -11,8 +11,6 @@ test( "constructor", function() { ...@@ -11,8 +11,6 @@ test( "constructor", function() {
ok( a.normal.z == 0, "Passed!" ); ok( a.normal.z == 0, "Passed!" );
ok( a.constant == 0, "Passed!" ); ok( a.constant == 0, "Passed!" );
console.log( one );
a = new THREE.Plane( one, 0 ); a = new THREE.Plane( one, 0 );
ok( a.normal.x == 1, "Passed!" ); ok( a.normal.x == 1, "Passed!" );
ok( a.normal.y == 1, "Passed!" ); ok( a.normal.y == 1, "Passed!" );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册