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

Improved MeshFaceMaterial.clone(). See #3787.

上级 0edf3b78
......@@ -10,6 +10,14 @@ THREE.MeshFaceMaterial = function ( materials ) {
THREE.MeshFaceMaterial.prototype.clone = function () {
return new THREE.MeshFaceMaterial( this.materials.slice( 0 ) );
var material = new THREE.MeshFaceMaterial();
for ( var i = 0; i < this.materials.length; i ++ ) {
material.materials.push( this.materials[ i ].clone() );
}
return material;
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册