Browse Source

Fixed reference to geometry in clone method of InstancedBufferGeometry

Daniel Hritzkiv 10 years ago
parent
commit
187d2f8fd2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/InstancedBufferGeometry.js

+ 2 - 2
src/core/InstancedBufferGeometry.js

@@ -32,14 +32,14 @@ THREE.InstancedBufferGeometry.prototype.copy = function ( source ) {
 	for ( var attr in source.attributes ) {
 
 		var sourceAttr = source.attributes[ attr ];
-		geometry.addAttribute( attr, sourceAttr.clone() );
+		this.addAttribute( attr, sourceAttr.clone() );
 
 	}
 
 	for ( var i = 0, il = source.drawcalls.length; i < il; i ++ ) {
 
 		var offset = source.drawcalls[ i ];
-		geometry.addDrawCall( offset.start, offset.count, offset.index, offset.instances );
+		this.addDrawCall( offset.start, offset.count, offset.index, offset.instances );
 
 	}