提交 8fd03ba7 编写于 作者: B Ben Houston

minor fixes to Line3, removing debug info.

上级 3c5986bf
...@@ -39,7 +39,7 @@ test( "at", function() { ...@@ -39,7 +39,7 @@ test( "at", function() {
var a = new THREE.Line3( one3.clone(), new THREE.Vector3( 1, 1, 2 ) ); var a = new THREE.Line3( one3.clone(), new THREE.Vector3( 1, 1, 2 ) );
ok( a.at( -1 ).distanceTo( new THREE.Vector3( 1, 1, 0 ) ) < 0.0001, "Passed!" ); ok( a.at( -1 ).distanceTo( new THREE.Vector3( 1, 1, 0 ) ) < 0.0001, "Passed!" );
ok( a.at( 0 ).distanceTo( one3 ) < 0.0001, "Passed!" ); ok( a.at( 0 ).distanceTo( one3.clone() ) < 0.0001, "Passed!" );
ok( a.at( 1 ).distanceTo( new THREE.Vector3( 1, 1, 2 ) ) < 0.0001, "Passed!" ); ok( a.at( 1 ).distanceTo( new THREE.Vector3( 1, 1, 2 ) ) < 0.0001, "Passed!" );
ok( a.at( 2 ).distanceTo( new THREE.Vector3( 1, 1, 3 ) ) < 0.0001, "Passed!" ); ok( a.at( 2 ).distanceTo( new THREE.Vector3( 1, 1, 3 ) ) < 0.0001, "Passed!" );
}); });
...@@ -49,8 +49,7 @@ test( "closestPointToPoint", function() { ...@@ -49,8 +49,7 @@ test( "closestPointToPoint", function() {
var a = new THREE.Line3( one3.clone(), new THREE.Vector3( 1, 1, 2 ) ); var a = new THREE.Line3( one3.clone(), new THREE.Vector3( 1, 1, 2 ) );
// nearby the ray // nearby the ray
var b1 = a.closestPointToPoint( zero3 ); var b1 = a.closestPointToPoint( zero3.clone() );
console.log( b1 );
ok( b1.distanceTo( new THREE.Vector3( 1, 1, 1 ) ) < 0.0001, "Passed!" ); ok( b1.distanceTo( new THREE.Vector3( 1, 1, 1 ) ) < 0.0001, "Passed!" );
// nearby the ray // nearby the ray
...@@ -58,6 +57,6 @@ test( "closestPointToPoint", function() { ...@@ -58,6 +57,6 @@ test( "closestPointToPoint", function() {
ok( b.distanceTo( new THREE.Vector3( 1, 1, 2 ) ) < 0.0001, "Passed!" ); ok( b.distanceTo( new THREE.Vector3( 1, 1, 2 ) ) < 0.0001, "Passed!" );
// exactly on the ray // exactly on the ray
var c = a.closestPointToPoint( one3 ); var c = a.closestPointToPoint( one3.clone() );
ok( c.distanceTo( one3 ) < 0.0001, "Passed!" ); ok( c.distanceTo( one3.clone() ) < 0.0001, "Passed!" );
}); });
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册