Browse Source

fix Path.js again

zz85 13 years ago
parent
commit
ff23c44179
1 changed files with 6 additions and 8 deletions
  1. 6 8
      src/extras/core/Path.js

+ 6 - 8
src/extras/core/Path.js

@@ -330,7 +330,6 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
 			var deltaAngle = aEndAngle - aStartAngle;
 			var deltaAngle = aEndAngle - aStartAngle;
 			var angle;
 			var angle;
 			var tdivisions = divisions * 2;
 			var tdivisions = divisions * 2;
-			var t;
 
 
 			for ( j = 1; j <= tdivisions; j ++ ) {
 			for ( j = 1; j <= tdivisions; j ++ ) {
 
 
@@ -558,21 +557,20 @@ THREE.Path.prototype.toShapes = function() {
 
 
 	if ( subPaths.length == 0 ) return [];
 	if ( subPaths.length == 0 ) return [];
 
 
+	var tmpPath, tmpShape, shapes = [];
+
 	var holesFirst = !THREE.Shape.Utils.isClockWise( subPaths[ 0 ].getPoints() );
 	var holesFirst = !THREE.Shape.Utils.isClockWise( subPaths[ 0 ].getPoints() );
+	// console.log("Holes first", holesFirst);
+
 	if ( subPaths.length == 1) {
 	if ( subPaths.length == 1) {
 		tmpPath = subPaths[0];
 		tmpPath = subPaths[0];
 		tmpShape = new THREE.Shape();
 		tmpShape = new THREE.Shape();
 		tmpShape.actions = tmpPath.actions;
 		tmpShape.actions = tmpPath.actions;
 		tmpShape.curves = tmpPath.curves;
 		tmpShape.curves = tmpPath.curves;
-		return tmpShape;
+		shapes.push( tmpShape );
+		return shapes;
 	};
 	};
 
 
-	var tmpPath, tmpShape, shapes = [];
-
-	// console.log("Holes first", holesFirst);
-	
-	
-
 	if ( holesFirst ) {
 	if ( holesFirst ) {
 
 
 		tmpShape = new THREE.Shape();
 		tmpShape = new THREE.Shape();