Browse Source

Rename _copyFrom to copy

dubejf 10 years ago
parent
commit
2f76f92a1b
50 changed files with 112 additions and 111 deletions
  1. 1 1
      examples/js/renderers/CanvasRenderer.js
  2. 3 3
      src/cameras/Camera.js
  3. 1 1
      src/cameras/OrthographicCamera.js
  4. 1 1
      src/cameras/PerspectiveCamera.js
  5. 29 28
      src/core/BufferGeometry.js
  6. 2 2
      src/core/Geometry.js
  7. 2 2
      src/core/Object3D.js
  8. 1 1
      src/extras/geometries/CircleBufferGeometry.js
  9. 1 1
      src/extras/geometries/DodecahedronGeometry.js
  10. 1 1
      src/extras/geometries/IcosahedronGeometry.js
  11. 1 1
      src/extras/geometries/OctahedronGeometry.js
  12. 1 1
      src/extras/geometries/PlaneBufferGeometry.js
  13. 3 3
      src/extras/geometries/PolyhedronGeometry.js
  14. 1 1
      src/extras/geometries/SphereBufferGeometry.js
  15. 1 1
      src/extras/geometries/TetrahedronGeometry.js
  16. 1 1
      src/lights/AmbientLight.js
  17. 1 1
      src/lights/AreaLight.js
  18. 1 1
      src/lights/DirectionalLight.js
  19. 1 1
      src/lights/HemisphereLight.js
  20. 3 3
      src/lights/Light.js
  21. 1 1
      src/lights/PointLight.js
  22. 1 1
      src/lights/SpotLight.js
  23. 1 1
      src/materials/LineBasicMaterial.js
  24. 1 1
      src/materials/LineDashedMaterial.js
  25. 2 2
      src/materials/Material.js
  26. 1 1
      src/materials/MeshBasicMaterial.js
  27. 1 1
      src/materials/MeshDepthMaterial.js
  28. 1 1
      src/materials/MeshLambertMaterial.js
  29. 1 1
      src/materials/MeshNormalMaterial.js
  30. 1 1
      src/materials/MeshPhongMaterial.js
  31. 1 1
      src/materials/PointCloudMaterial.js
  32. 1 1
      src/materials/RawShaderMaterial.js
  33. 3 3
      src/materials/ShaderMaterial.js
  34. 1 1
      src/materials/SpriteMaterial.js
  35. 3 3
      src/objects/Bone.js
  36. 3 3
      src/objects/Group.js
  37. 3 3
      src/objects/LOD.js
  38. 3 3
      src/objects/LensFlare.js
  39. 3 3
      src/objects/Line.js
  40. 1 1
      src/objects/LineSegments.js
  41. 3 3
      src/objects/Mesh.js
  42. 3 3
      src/objects/MorphAnimMesh.js
  43. 3 3
      src/objects/PointCloud.js
  44. 3 3
      src/objects/SkinnedMesh.js
  45. 3 3
      src/objects/Sprite.js
  46. 3 3
      src/scenes/Scene.js
  47. 1 1
      src/textures/CompressedTexture.js
  48. 1 1
      src/textures/CubeTexture.js
  49. 1 1
      src/textures/DataTexture.js
  50. 2 2
      src/textures/Texture.js

+ 1 - 1
examples/js/renderers/CanvasRenderer.js

@@ -22,7 +22,7 @@ THREE.SpriteCanvasMaterial.prototype.clone = function () {
 
 	var material = new THREE.SpriteCanvasMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 	material.program = this.program;

+ 3 - 3
src/cameras/Camera.js

@@ -53,13 +53,13 @@ THREE.Camera.prototype.lookAt = function () {
 THREE.Camera.prototype.clone = function () {
 
 	var camera = new THREE.Camera();
-	return camera._copyFrom( this );
+	return camera.copy( this );
 
 };
 
-THREE.Camera.prototype._copyFrom = function ( source ) {
+THREE.Camera.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 
 	this.matrixWorldInverse.copy( source.matrixWorldInverse );
 	this.projectionMatrix.copy( source.projectionMatrix );

+ 1 - 1
src/cameras/OrthographicCamera.js

@@ -40,7 +40,7 @@ THREE.OrthographicCamera.prototype.clone = function () {
 
 	var camera = new THREE.OrthographicCamera();
 
-	THREE.Camera.prototype._copyFrom.call( camera, this );
+	THREE.Camera.prototype.copy.call( camera, this );
 
 	camera.zoom = this.zoom;
 

+ 1 - 1
src/cameras/PerspectiveCamera.js

@@ -126,7 +126,7 @@ THREE.PerspectiveCamera.prototype.clone = function () {
 
 	var camera = new THREE.PerspectiveCamera();
 
-	THREE.Camera.prototype._copyFrom.call( camera, this );
+	THREE.Camera.prototype.copy.call( camera, this );
 
 	camera.zoom = this.zoom;
 

+ 29 - 28
src/core/BufferGeometry.js

@@ -110,32 +110,6 @@ THREE.BufferGeometry.prototype = {
 
 	},
 
-	copy: function ( geometry ) {
-
-		// TODO Clear attributes? Clear drawcalls? Copy morphTargets?
-
-		var attributes = geometry.attributes;
-		var offsets = geometry.drawcalls;
-
-		for ( var name in attributes ) {
-
-			var attribute = attributes[ name ];
-
-			this.addAttribute( name, attribute.clone() );
-
-		}
-
-		for ( var i = 0, il = offsets.length; i < il; i ++ ) {
-
-			var offset = offsets[ i ];
-			this.addDrawCall( offset.start, offset.count, offset.index );
-
-		}
-
-		return this;
-
-	},
-
 	center: function () {
 
 		this.computeBoundingBox();
@@ -1108,11 +1082,38 @@ THREE.BufferGeometry.prototype = {
 	clone: function () {
 
 		var geometry = new THREE.BufferGeometry();
-		return geometry._copyFrom( this );
+		return geometry.copy( this );
+
+	},
+
+
+	copy: function ( geometry ) {
+
+		// TODO Clear attributes? Clear drawcalls? Copy morphTargets?
+
+		var attributes = geometry.attributes;
+		var offsets = geometry.drawcalls;
+
+		for ( var name in attributes ) {
+
+			var attribute = attributes[ name ];
+
+			this.addAttribute( name, attribute.clone() );
+
+		}
+
+		for ( var i = 0, il = offsets.length; i < il; i ++ ) {
+
+			var offset = offsets[ i ];
+			this.addDrawCall( offset.start, offset.count, offset.index );
+
+		}
+
+		return this;
 
 	},
 
-	_copyFrom: function ( source ) {
+	copy: function ( source ) {
 
 		for ( var attr in source.attributes ) {
 

+ 2 - 2
src/core/Geometry.js

@@ -1049,11 +1049,11 @@ THREE.Geometry.prototype = {
 	clone: function () {
 
 		var geometry = new THREE.Geometry();
-		return geometry._copyFrom( this );
+		return geometry.copy( this );
 
 	},
 
-	_copyFrom: function ( source ) {
+	copy: function ( source ) {
 
 		this.vertices = [];
 		this.faces = [];

+ 2 - 2
src/core/Object3D.js

@@ -662,11 +662,11 @@ THREE.Object3D.prototype = {
 	clone: function ( recursive ) {
 
 		var object = new THREE.Object3D();
-		return object._copyFrom( this, recursive );
+		return object.copy( this, recursive );
 
 	},
 
-	_copyFrom: function ( source, recursive ) {
+	copy: function ( source, recursive ) {
 
 		if ( recursive === undefined ) recursive = true;
 

+ 1 - 1
src/extras/geometries/CircleBufferGeometry.js

@@ -77,7 +77,7 @@ THREE.CircleBufferGeometry.prototype.clone = function () {
 		this.parameters.thetaLength
 	);
 
-	THREE.BufferGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.BufferGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 1 - 1
src/extras/geometries/DodecahedronGeometry.js

@@ -64,7 +64,7 @@ THREE.DodecahedronGeometry.prototype.clone = function () {
 		this.parameters.detail
 	);
 
-	THREE.PolyhedronGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.PolyhedronGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 1 - 1
src/extras/geometries/IcosahedronGeometry.js

@@ -39,7 +39,7 @@ THREE.IcosahedronGeometry.prototype.clone = function () {
 		this.parameters.detail
 	);
 
-	THREE.PolyhedronGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.PolyhedronGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 1 - 1
src/extras/geometries/OctahedronGeometry.js

@@ -32,7 +32,7 @@ THREE.OctahedronGeometry.prototype.clone = function () {
 		this.parameters.detail
 	);
 
-	THREE.PolyhedronGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.PolyhedronGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 1 - 1
src/extras/geometries/PlaneBufferGeometry.js

@@ -104,7 +104,7 @@ THREE.PlaneBufferGeometry.prototype.clone = function () {
 		this.parameters.heightSegments
 	);
 
-	THREE.BufferGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.BufferGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 3 - 3
src/extras/geometries/PolyhedronGeometry.js

@@ -243,13 +243,13 @@ THREE.PolyhedronGeometry.prototype.clone = function () {
 		this.parameters.detail
 	);
 
-	return geometry._copyFrom( this );
+	return geometry.copy( this );
 
 };
 
-THREE.PolyhedronGeometry.prototype._copyFrom = function ( source ) {
+THREE.PolyhedronGeometry.prototype.copy = function ( source ) {
 
-	THREE.Geometry.prototype._copyFrom.call( this, source );
+	THREE.Geometry.prototype.copy.call( this, source );
 	return this;
 
 };

+ 1 - 1
src/extras/geometries/SphereBufferGeometry.js

@@ -112,7 +112,7 @@ THREE.SphereBufferGeometry.prototype.clone = function () {
 		this.parameters.thetaLength
 	);
 
-	THREE.BufferGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.BufferGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 1 - 1
src/extras/geometries/TetrahedronGeometry.js

@@ -33,7 +33,7 @@ THREE.TetrahedronGeometry.prototype.clone = function () {
 		this.parameters.detail
 	);
 
-	THREE.PolyhedronGeometry.prototype._copyFrom.call( geometry, this );
+	THREE.PolyhedronGeometry.prototype.copy.call( geometry, this );
 
 	return geometry;
 

+ 1 - 1
src/lights/AmbientLight.js

@@ -17,7 +17,7 @@ THREE.AmbientLight.prototype.clone = function () {
 
 	var light = new THREE.AmbientLight();
 
-	THREE.Light.prototype._copyFrom.call( light, this );
+	THREE.Light.prototype.copy.call( light, this );
 
 	return light;
 

+ 1 - 1
src/lights/AreaLight.js

@@ -31,7 +31,7 @@ THREE.AreaLight.prototype.clone = function () {
 
 	var light = new THREE.AreaLight();
 
-	THREE.Light.prototype._copyFrom.call( light, this );
+	THREE.Light.prototype.copy.call( light, this );
 
 	light.normal.copy(this.normal);
 	light.right.copy(this.right);

+ 1 - 1
src/lights/DirectionalLight.js

@@ -67,7 +67,7 @@ THREE.DirectionalLight.prototype.clone = function () {
 
 	var light = new THREE.DirectionalLight();
 
-	THREE.Light.prototype._copyFrom.call( light, this );
+	THREE.Light.prototype.copy.call( light, this );
 
 	light.target = this.target.clone();
 

+ 1 - 1
src/lights/HemisphereLight.js

@@ -22,7 +22,7 @@ THREE.HemisphereLight.prototype.clone = function () {
 
 	var light = new THREE.HemisphereLight();
 
-	THREE.Light.prototype._copyFrom.call( light, this );
+	THREE.Light.prototype.copy.call( light, this );
 
 	light.groundColor.copy( this.groundColor );
 	light.intensity = this.intensity;

+ 3 - 3
src/lights/Light.js

@@ -19,13 +19,13 @@ THREE.Light.prototype.constructor = THREE.Light;
 THREE.Light.prototype.clone = function () {
 
 	var light = new THREE.Light();
-	return light._copyFrom( this );
+	return light.copy( this );
 
 };
 
-THREE.Light.prototype._copyFrom = function ( source ) {
+THREE.Light.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	this.color.copy( source.color );
 
 	return this;

+ 1 - 1
src/lights/PointLight.js

@@ -21,7 +21,7 @@ THREE.PointLight.prototype.clone = function () {
 
 	var light = new THREE.PointLight();
 
-	THREE.Light.prototype._copyFrom.call( light, this );
+	THREE.Light.prototype.copy.call( light, this );
 
 	light.intensity = this.intensity;
 	light.distance = this.distance;

+ 1 - 1
src/lights/SpotLight.js

@@ -50,7 +50,7 @@ THREE.SpotLight.prototype.clone = function () {
 
 	var light = new THREE.SpotLight();
 
-	THREE.Light.prototype._copyFrom.call( light, this );
+	THREE.Light.prototype.copy.call( light, this );
 
 	light.target = this.target.clone();
 

+ 1 - 1
src/materials/LineBasicMaterial.js

@@ -47,7 +47,7 @@ THREE.LineBasicMaterial.prototype.clone = function () {
 
 	var material = new THREE.LineBasicMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 

+ 1 - 1
src/materials/LineDashedMaterial.js

@@ -50,7 +50,7 @@ THREE.LineDashedMaterial.prototype.clone = function () {
 
 	var material = new THREE.LineDashedMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 

+ 2 - 2
src/materials/Material.js

@@ -164,11 +164,11 @@ THREE.Material.prototype = {
 	clone: function () {
 
 		var material = new THREE.Material();
-		return material._copyFrom( this );
+		return material.copy( this );
 
 	},
 
-	_copyFrom: function ( source ) {
+	copy: function ( source ) {
 
 		this.name = source.name;
 

+ 1 - 1
src/materials/MeshBasicMaterial.js

@@ -83,7 +83,7 @@ THREE.MeshBasicMaterial.prototype.clone = function () {
 
 	var material = new THREE.MeshBasicMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 

+ 1 - 1
src/materials/MeshDepthMaterial.js

@@ -35,7 +35,7 @@ THREE.MeshDepthMaterial.prototype.clone = function () {
 
 	var material = new THREE.MeshDepthMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.wireframe = this.wireframe;
 	material.wireframeLinewidth = this.wireframeLinewidth;

+ 1 - 1
src/materials/MeshLambertMaterial.js

@@ -82,7 +82,7 @@ THREE.MeshLambertMaterial.prototype.clone = function () {
 
 	var material = new THREE.MeshLambertMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 	material.emissive.copy( this.emissive );

+ 1 - 1
src/materials/MeshNormalMaterial.js

@@ -36,7 +36,7 @@ THREE.MeshNormalMaterial.prototype.clone = function () {
 
 	var material = new THREE.MeshNormalMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.wireframe = this.wireframe;
 	material.wireframeLinewidth = this.wireframeLinewidth;

+ 1 - 1
src/materials/MeshPhongMaterial.js

@@ -116,7 +116,7 @@ THREE.MeshPhongMaterial.prototype.clone = function () {
 
 	var material = new THREE.MeshPhongMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 	material.emissive.copy( this.emissive );

+ 1 - 1
src/materials/PointCloudMaterial.js

@@ -48,7 +48,7 @@ THREE.PointCloudMaterial.prototype.clone = function () {
 
 	var material = new THREE.PointCloudMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 

+ 1 - 1
src/materials/RawShaderMaterial.js

@@ -17,7 +17,7 @@ THREE.RawShaderMaterial.prototype.clone = function () {
 
 	var material = new THREE.RawShaderMaterial();
 
-	THREE.ShaderMaterial.prototype._copyFrom.call( material, this );
+	THREE.ShaderMaterial.prototype.copy.call( material, this );
 
 	return material;
 

+ 3 - 3
src/materials/ShaderMaterial.js

@@ -92,13 +92,13 @@ THREE.ShaderMaterial.prototype.constructor = THREE.ShaderMaterial;
 THREE.ShaderMaterial.prototype.clone = function () {
 
 	var material = new THREE.ShaderMaterial();
-	return material._copyFrom( this );
+	return material.copy( this );
 
 };
 
-THREE.ShaderMaterial.prototype._copyFrom = function ( source ) {
+THREE.ShaderMaterial.prototype.copy = function ( source ) {
 
-	THREE.Material.prototype._copyFrom.call( this, source );
+	THREE.Material.prototype.copy.call( this, source );
 
 	this.fragmentShader = source.fragmentShader;
 	this.vertexShader = source.vertexShader;

+ 1 - 1
src/materials/SpriteMaterial.js

@@ -43,7 +43,7 @@ THREE.SpriteMaterial.prototype.clone = function () {
 
 	var material = new THREE.SpriteMaterial();
 
-	THREE.Material.prototype._copyFrom.call( material, this );
+	THREE.Material.prototype.copy.call( material, this );
 
 	material.color.copy( this.color );
 	material.map = this.map;

+ 3 - 3
src/objects/Bone.js

@@ -20,13 +20,13 @@ THREE.Bone.prototype.constructor = THREE.Bone;
 THREE.Bone.prototype.clone = function () {
 
 	var bone = new THREE.Bone( this.skin );
-	return bone._copyFrom( this );
+	return bone.copy( this );
 
 };
 
-THREE.Bone.prototype._copyFrom = function ( source ) {
+THREE.Bone.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	this.skin = source.skin;
 
 	return this;

+ 3 - 3
src/objects/Group.js

@@ -16,13 +16,13 @@ THREE.Group.prototype.constructor = THREE.Group;
 THREE.Group.prototype.clone = function () {
 
 	var group = new THREE.Group();
-	return group._copyFrom( this );
+	return group.copy( this );
 
 };
 
-THREE.Group.prototype._copyFrom = function ( source ) {
+THREE.Group.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	return this;
 
 };

+ 3 - 3
src/objects/LOD.js

@@ -133,14 +133,14 @@ THREE.LOD.prototype.update = function () {
 THREE.LOD.prototype.clone = function () {
 
 	var lod = new THREE.LOD();
-	return lod._copyFrom( this );
+	return lod.copy( this );
 
 };
 
 
-THREE.LOD.prototype._copyFrom = function ( source ) {
+THREE.LOD.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source, false );
+	THREE.Object3D.prototype.copy.call( this, source, false );
 
 	var levels = source.levels;
 

+ 3 - 3
src/objects/LensFlare.js

@@ -81,13 +81,13 @@ THREE.LensFlare.prototype.updateLensFlares = function () {
 THREE.LensFlare.prototype.clone = function () {
 
 	var flare = new THREE.LensFlare();
-	return flare._copyFrom( this );
+	return flare.copy( this );
 
 };
 
-THREE.LensFlare.prototype._copyFrom = function ( source ) {
+THREE.LensFlare.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 
 	this.positionScreen.copy( source.positionScreen );
 	this.customUpdateCallback = source.customUpdateCallback;

+ 3 - 3
src/objects/Line.js

@@ -186,13 +186,13 @@ THREE.Line.prototype.raycast = ( function () {
 THREE.Line.prototype.clone = function () {
 
 	var line = new THREE.Line( this.geometry, this.material );
-	return line._copyFrom( this );
+	return line.copy( this );
 
 };
 
-THREE.Line.prototype._copyFrom = function ( source ) {
+THREE.Line.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	return this;
 
 };

+ 1 - 1
src/objects/LineSegments.js

@@ -17,7 +17,7 @@ THREE.LineSegments.prototype.clone = function () {
 
 	var line = new THREE.LineSegments( this.geometry, this.material );
 
-	THREE.Line.prototype._copyFrom.call( line, this );
+	THREE.Line.prototype.copy.call( line, this );
 
 	return line;
 

+ 3 - 3
src/objects/Mesh.js

@@ -308,13 +308,13 @@ THREE.Mesh.prototype.raycast = ( function () {
 THREE.Mesh.prototype.clone = function () {
 
 	var mesh = new THREE.Mesh( this.geometry, this.material );
-	return mesh._copyFrom( this );
+	return mesh.copy( this );
 
 };
 
-THREE.Mesh.prototype._copyFrom = function ( source ) {
+THREE.Mesh.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	return this;
 
 };

+ 3 - 3
src/objects/MorphAnimMesh.js

@@ -195,11 +195,11 @@ THREE.MorphAnimMesh.prototype.interpolateTargets = function ( a, b, t ) {
 THREE.MorphAnimMesh.prototype.clone = function () {
 
 	var morph = new THREE.MorphAnimMesh( this.geometry, this.material );
-	return morph._copyFrom( this );
+	return morph.copy( this );
 
 };
 
-THREE.MorphAnimMesh.prototype._copyFrom = function ( source ) {
+THREE.MorphAnimMesh.prototype.copy = function ( source ) {
 
 	this.duration = source.duration;
 	this.mirroredLoop = source.mirroredLoop;
@@ -211,7 +211,7 @@ THREE.MorphAnimMesh.prototype._copyFrom = function ( source ) {
 	this.direction = source.direction;
 	this.directionBackwards = source.directionBackwards;
 
-	THREE.Mesh.prototype._copyFrom.call( this, source );
+	THREE.Mesh.prototype.copy.call( this, source );
 
 	return this;
 

+ 3 - 3
src/objects/PointCloud.js

@@ -139,13 +139,13 @@ THREE.PointCloud.prototype.raycast = ( function () {
 THREE.PointCloud.prototype.clone = function () {
 
 	var pointCloud = new THREE.PointCloud( this.geometry, this.material );
-	return pointCloud._copyFrom( this );
+	return pointCloud.copy( this );
 
 };
 
-THREE.PointCloud.prototype._copyFrom = function ( source ) {
+THREE.PointCloud.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	return this;
 
 };

+ 3 - 3
src/objects/SkinnedMesh.js

@@ -157,13 +157,13 @@ THREE.SkinnedMesh.prototype.updateMatrixWorld = function( force ) {
 THREE.SkinnedMesh.prototype.clone = function() {
 
 	var skinMesh = new THREE.SkinnedMesh( this.geometry, this.material, this.useVertexTexture );
-	return skinMesh._copyFrom( this );
+	return skinMesh.copy( this );
 
 };
 
-THREE.SkinnedMesh.prototype._copyFrom = function( source ) {
+THREE.SkinnedMesh.prototype.copy = function( source ) {
 
-	THREE.Mesh.prototype._copyFrom.call( this, source );
+	THREE.Mesh.prototype.copy.call( this, source );
 	return this;
 
 };

+ 3 - 3
src/objects/Sprite.js

@@ -63,13 +63,13 @@ THREE.Sprite.prototype.raycast = ( function () {
 THREE.Sprite.prototype.clone = function () {
 
 	var sprite = new THREE.Sprite( this.material );
-	return sprite._copyFrom( this );
+	return sprite.copy( this );
 
 };
 
-THREE.Sprite.prototype._copyFrom = function ( source ) {
+THREE.Sprite.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 	return this;
 
 };

+ 3 - 3
src/scenes/Scene.js

@@ -21,13 +21,13 @@ THREE.Scene.prototype.constructor = THREE.Scene;
 THREE.Scene.prototype.clone = function () {
 
 	var scene = new THREE.Scene();
-	return scene._copyFrom( this );
+	return scene.copy( this );
 
 };
 
-THREE.Scene.prototype._copyFrom = function ( source ) {
+THREE.Scene.prototype.copy = function ( source ) {
 
-	THREE.Object3D.prototype._copyFrom.call( this, source );
+	THREE.Object3D.prototype.copy.call( this, source );
 
 	if ( source.fog !== null ) this.fog = source.fog.clone();
 	if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();

+ 1 - 1
src/textures/CompressedTexture.js

@@ -28,7 +28,7 @@ THREE.CompressedTexture.prototype.clone = function () {
 
 	var texture = new THREE.CompressedTexture();
 
-	THREE.Texture.prototype._copyFrom.call( texture, this );
+	THREE.Texture.prototype.copy.call( texture, this );
 
 	return texture;
 

+ 1 - 1
src/textures/CubeTexture.js

@@ -20,7 +20,7 @@ THREE.CubeTexture.clone = function () {
 
 	var texture = new THREE.CubeTexture();
 
-	THREE.Texture.prototype._copyFrom.call( texture, this );
+	THREE.Texture.prototype.copy.call( texture, this );
 
 	texture.images = this.images;
 

+ 1 - 1
src/textures/DataTexture.js

@@ -17,7 +17,7 @@ THREE.DataTexture.prototype.clone = function () {
 
 	var texture = new THREE.DataTexture();
 
-	THREE.Texture.prototype._copyFrom.call( texture, this );
+	THREE.Texture.prototype.copy.call( texture, this );
 
 	return texture;
 

+ 2 - 2
src/textures/Texture.js

@@ -66,11 +66,11 @@ THREE.Texture.prototype = {
 	clone: function () {
 
 		var texture = new THREE.Texture();
-		return texture._copyFrom( this );
+		return texture.copy( this );
 
 	},
 
-	_copyFrom: function ( source ) {
+	copy: function ( source ) {
 
 		this.image = source.image;
 		this.mipmaps = source.mipmaps.slice( 0 );