Browse Source

make curve createGeometry 2D/3D friendly

Alvaro Gil 13 years ago
parent
commit
c9e88e32a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extras/core/CurvePath.js

+ 1 - 1
src/extras/core/CurvePath.js

@@ -204,7 +204,7 @@ THREE.CurvePath.prototype.createGeometry = function( points ) {
 
 	for ( var i = 0; i < points.length; i ++ ) {
 
-		geometry.vertices.push( new THREE.Vector3( points[ i ].x, points[ i ].y, points[ i ].z ) );
+		geometry.vertices.push( new THREE.Vector3( points[ i ].x, points[ i ].y, points[ i ].z || 0) );
 
 	}