2
0
Эх сурвалжийг харах

Simplify and remove paste error

dubejf 10 жил өмнө
parent
commit
15d9cfe6f9

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

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

+ 0 - 27
src/core/BufferGeometry.js

@@ -1086,33 +1086,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;
-
-	},
-
 	copy: function ( source ) {
 
 		for ( var attr in source.attributes ) {