Browse Source

Merge branch 'master' of https://github.com/vandixhoorn/three.js into dev

Mr.doob 11 years ago
parent
commit
cb1f91962f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/extras/core/Shape.js

+ 2 - 2
src/extras/core/Shape.js

@@ -371,7 +371,7 @@ THREE.Shape.Utils = {
 				tmpShape1, tmpShape2,
 				tmpHole1, tmpHole2;
 
-			for (h in holes) { indepHoles.push( h ); }
+			for (h = 0, hl = holes.length; h < hl; h++) { indepHoles.push( h ); }
 
 			var counter = indepHoles.length * 2;
 			while ( indepHoles.length > 0 ) {
@@ -437,7 +437,7 @@ THREE.Shape.Utils = {
 		// To maintain reference to old shape, one must match coordinates, or offset the indices from original arrays. It's probably easier to do the first.
 
 		var allpoints = contour.concat();
-		for (var h in holes) { Array.prototype.push.apply( allpoints, holes[h] ); }
+		for (var h = 0, hl = holes.length; h < hl; h++) { Array.prototype.push.apply( allpoints, holes[h] ); }
 		//console.log( "allpoints",allpoints, allpoints.length );
 
 		// prepare all points map