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

fix copy() methods in Box3, Plane and Sphere to actually copy objects rather than just references.

上级 82517012
......@@ -79,8 +79,8 @@ THREE.Box3.prototype = {
copy: function ( box ) {
this.min = box.min;
this.max = box.max;
this.min.copy( box.min );
this.max.copy( box.max );
return this;
},
......
......@@ -50,8 +50,8 @@ THREE.Plane.prototype = {
copy: function ( plane ) {
this.normal = plane.normal;
this.constant = plane.constant;
this.normal.copy( plane.normal );
this.constant = plane.constant.clone();
return this;
},
......
......@@ -37,8 +37,8 @@ THREE.Sphere.prototype = {
copy: function ( sphere ) {
this.center = sphere.center;
this.radius = sphere.radius;
this.center.copy( sphere.center );
this.radius = sphere.radius.clone();
return this;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册