提交 e93c6b30 编写于 作者: D dubejf

Geometry clone now accepts a target

Clear the target data before pushing new vertices and faces
上级 48ca3777
......@@ -1046,9 +1046,19 @@ THREE.Geometry.prototype = {
},
clone: function () {
clone: function ( geometry ) {
var geometry = new THREE.Geometry();
if ( geometry === undefined ) {
geometry = new THREE.Geometry();
} else {
geometry.vertices = [];
geometry.faces = [];
geometry.faceVertexUvs = [ [] ];
}
var vertices = this.vertices;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册