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

BufferAttribute: Added copyAt() to simplify item copying. (Not sure about naming)

上级 fe69ad0c
......@@ -19,6 +19,19 @@ THREE.BufferAttribute.prototype = {
},
copyAt: function ( index1, attribute, index2 ) {
index1 *= this.itemSize;
index2 *= attribute.itemSize;
for ( var i = 0, l = this.itemSize; i < l; i ++ ) {
this.array[ index1 + i ] = attribute.array[ index2 + i ];
}
},
set: function ( value ) {
this.array.set( value );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册