diff --git a/src/extras/core/Path.js b/src/extras/core/Path.js index 566aaddc70388f3468b69562279ea2d54a8c7c58..be6d753b96cbafa12a5acb2213cdca42879bd753 100644 --- a/src/extras/core/Path.js +++ b/src/extras/core/Path.js @@ -491,15 +491,13 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) { function toShapesNoHoles( inSubpaths ) { - var i, il; - var tmpPath, tmpShape; var shapes = []; - for ( i = 0, il = inSubpaths.length; i < il; i ++ ) { + for ( var i = 0, il = inSubpaths.length; i < il; i ++ ) { - tmpPath = inSubpaths[ i ]; + var tmpPath = inSubpaths[ i ]; - tmpShape = new THREE.Shape(); + var tmpShape = new THREE.Shape(); tmpShape.actions = tmpPath.actions; tmpShape.curves = tmpPath.curves; @@ -560,7 +558,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) { var subPaths = extractSubpaths( this.actions ); if ( subPaths.length == 0 ) return []; - if ( noHoles ) return toShapesNoHoles( subPaths ); + if ( noHoles === true ) return toShapesNoHoles( subPaths ); var solid, tmpPath, tmpShape, shapes = [];