( spline, n_sub )
| 28577 | |
| 28578 | |
| 28579 | function createSplineGeometry( spline, n_sub ) { |
| 28580 | |
| 28581 | var i, index, position, |
| 28582 | geometry = new THREE.Geometry(); |
| 28583 | |
| 28584 | for ( i = 0; i < spline.points.length * n_sub; i ++ ) { |
| 28585 | |
| 28586 | index = i / ( spline.points.length * n_sub ); |
| 28587 | position = spline.getPoint( index ); |
| 28588 | |
| 28589 | geometry.vertices[ i ] = new THREE.Vector3( position.x, position.y, position.z ); |
| 28590 | |
| 28591 | } |
| 28592 | |
| 28593 | return geometry; |
| 28594 | |
| 28595 | }; |
| 28596 | |
| 28597 | function createPath( parent, spline ) { |
| 28598 |