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

Simplified .clone()s.

上级 563e0f5f
......@@ -1122,8 +1122,7 @@ THREE.BufferGeometry.prototype = {
clone: function () {
var geometry = new THREE.BufferGeometry();
return geometry.copy( this );
return new THREE.BufferGeometry().copy( this );
},
......
......@@ -1052,8 +1052,7 @@ THREE.Geometry.prototype = {
clone: function () {
var geometry = new THREE.Geometry();
return geometry.copy( this );
return new THREE.Geometry().copy( this );
},
......
......@@ -669,8 +669,7 @@ THREE.Object3D.prototype = {
clone: function ( recursive ) {
var object = new THREE.Object3D();
return object.copy( this, recursive );
return new THREE.Object3D().copy( this, recursive );
},
......
......@@ -169,8 +169,7 @@ THREE.Material.prototype = {
clone: function () {
var material = new THREE.Material();
return material.copy( this );
return new THREE.Material().copy( this );
},
......
......@@ -169,7 +169,6 @@ THREE.MeshPhongMaterial.prototype.copy = function ( source ) {
THREE.MeshPhongMaterial.prototype.clone = function () {
var material = new THREE.MeshPhongMaterial();
return material.copy( this );
return new THREE.MeshPhongMaterial().copy( this );
};
......@@ -495,7 +495,7 @@ THREE.Color.prototype = {
clone: function () {
return new THREE.Color().setRGB( this.r, this.g, this.b );
return new THREE.Color().copy( this );
}
......
......@@ -57,8 +57,7 @@ THREE.Texture.prototype = {
clone: function () {
var texture = new THREE.Texture();
return texture.copy( this );
return new THREE.Texture().copy( this );
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册