@@ -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 = {
- var geometry = new THREE.Geometry();
+ 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 = {
- 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 new THREE.MeshPhongMaterial().copy( this );
};
@@ -495,7 +495,7 @@ THREE.Color.prototype = {
- return new THREE.Color().setRGB( this.r, this.g, this.b );
+ return new THREE.Color().copy( this );
}
@@ -57,8 +57,7 @@ THREE.Texture.prototype = {
- var texture = new THREE.Texture();
- return texture.copy( this );
+ return new THREE.Texture().copy( this );