提交 d2ec2d88 编写于 作者: B Ben Houston

add some missing ;'s, spread around code credits, add some comments.

上级 ef2d6906
/**
* @author mrdoob / http://mrdoob.com/
* @author bhouston / http://exocortex.com/
*/
( function ( THREE ) {
......
/**
* @author bhouston / http://exocortex.com
* @author mrdoob / http://mrdoob.com/
*/
THREE.Sphere = function ( center, radius ) {
......
/**
* @author bhouston / http://exocortex.com
* @author mrdoob / http://mrdoob.com/
*/
THREE.Triangle3 = function ( a, b, c ) {
......@@ -48,14 +49,15 @@ THREE.Triangle3.barycoordFromPoint = function ( point, a, b, c, optionalTarget )
// barycoordinates must always sum to 1
return result.set( 1 - u - v, v, u );
}
};
THREE.Triangle3.containsPoint = function ( point, a, b, c ) {
// NOTE: need to use __v3 here because __v0, __v1 and __v2 are used in barycoordFromPoint.
var result = THREE.Triangle3.barycoordFromPoint( point, a, b, c, THREE.Triangle3.__v3 );
return ( result.x >= 0 ) && ( result.y >= 0 ) && ( ( result.x + result.y ) <= 1 );
}
};
THREE.Triangle3.prototype = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册