提交 5d70541b 编写于 作者: B Ben Houston

incorporated more feedback from @gero3.

上级 c4072ef9
......@@ -39,8 +39,8 @@ THREE.Plane.prototype = {
setFromCoplanarPoints: function ( a, b, c ) {
var normal = new THREE.Vector3().sub( b, a ).cross(
new THREE.Vector3().sub( c, a ) );
var normal = THREE.Plane3.__v1.sub( b, a ).cross(
THREE.Plane3.__v2.sub( c, a ) );
// Q: should an error be thrown if normal is zero (e.g. degenerate plane)?
this.setFromNormalAndCoplanarPoint( normal, a );
......@@ -51,7 +51,7 @@ THREE.Plane.prototype = {
copy: function ( plane ) {
this.normal.copy( plane.normal );
this.constant = plane.constant.clone();
this.constant = new Number( plane.constant );
return this;
},
......@@ -118,4 +118,7 @@ THREE.Plane.prototype = {
return this;
}
};
\ No newline at end of file
};
THREE.Plane.__v1 = new THREE.Vector3();
THREE.Plane.__v2 = new THREE.Vector3();
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册