提交 cc30fe40 编写于 作者: M Mr.doob

BufferGeometry: Cleaned up copy.

上级 e5923ceb
......@@ -1127,18 +1127,20 @@ THREE.BufferGeometry.prototype = {
copy: function ( source ) {
for ( var attr in source.attributes ) {
var attributes = source.attributes;
var drawcalls = source.drawcalls;
var sourceAttr = source.attributes[ attr ];
this.addAttribute( attr, sourceAttr.clone() );
for ( var name in attributes ) {
}
var attribute = attributes[ name ];
this.addAttribute( name, attribute.clone() );
for ( var i = 0, il = source.drawcalls.length; i < il; i ++ ) {
}
var offset = source.drawcalls[ i ];
for ( var i = 0, l = drawcalls.length; i < l; i ++ ) {
this.addDrawCall( offset.start, offset.count );
var drawcall = drawcalls[ i ];
this.addDrawCall( drawcall.start, drawcall.count );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册