@@ -30486,12 +30486,16 @@ THREE.Shape.Utils = {
3048630486 }
3048730487
3048830488 var holeIndex, shapeIndex,
30489- shapePt, h, h2, holePt,
30489+ shapePt, holePt,
3049030490 holeIdx, cutKey, failedCuts = [],
3049130491 tmpShape1, tmpShape2,
3049230492 tmpHole1, tmpHole2;
3049330493
30494- for (h in holes) { indepHoles.push( h ); }
30494+ for ( var h = 0, hl = holes.length; h < hl; h ++ ) {
30495+
30496+ indepHoles.push( h );
30497+
30498+ }
3049530499
3049630500 var counter = indepHoles.length * 2;
3049730501 while ( indepHoles.length > 0 ) {
@@ -30509,15 +30513,15 @@ THREE.Shape.Utils = {
3050930513 holeIndex = -1;
3051030514
3051130515 // search for hole which can be reached without intersections
30512- for ( h = 0; h < indepHoles.length; h++ ) {
30516+ for ( var h = 0; h < indepHoles.length; h ++ ) {
3051330517 holeIdx = indepHoles[h];
3051430518
3051530519 // prevent multiple checks
3051630520 cutKey = shapePt.x + ":" + shapePt.y + ":" + holeIdx;
3051730521 if ( failedCuts[cutKey] !== undefined ) continue;
3051830522
3051930523 hole = holes[holeIdx];
30520- for ( h2 = 0; h2 < hole.length; h2 ++ ) {
30524+ for ( var h2 = 0; h2 < hole.length; h2 ++ ) {
3052130525 holePt = hole[ h2 ];
3052230526 if (! isCutLineInsideAngles( shapeIndex, h2 ) ) continue;
3052330527 if ( intersectsShapeEdge( shapePt, holePt ) ) continue;
@@ -30557,7 +30561,13 @@ THREE.Shape.Utils = {
3055730561 // 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.
3055830562
3055930563 var allpoints = contour.concat();
30560- for (var h in holes) { Array.prototype.push.apply( allpoints, holes[h] ); }
30564+
30565+ for ( var h = 0, hl = holes.length; h < hl; h ++ ) {
30566+
30567+ Array.prototype.push.apply( allpoints, holes[h] );
30568+
30569+ }
30570+
3056130571 //console.log( "allpoints",allpoints, allpoints.length );
3056230572
3056330573 // prepare all points map
0 commit comments