( parent, spline )
| 28595 | }; |
| 28596 | |
| 28597 | function createPath( parent, spline ) { |
| 28598 | |
| 28599 | var lineGeo = createSplineGeometry( spline, 10 ), |
| 28600 | particleGeo = createSplineGeometry( spline, 10 ), |
| 28601 | lineMat = new THREE.LineBasicMaterial( { color: 0xff0000, linewidth: 3 } ), |
| 28602 | lineObj = new THREE.Line( lineGeo, lineMat ), |
| 28603 | particleObj = new THREE.ParticleSystem( particleGeo, new THREE.ParticleBasicMaterial( { color: 0xffaa00, size: 3 } ) ); |
| 28604 | |
| 28605 | lineObj.scale.set( 1, 1, 1 ); |
| 28606 | parent.add( lineObj ); |
| 28607 | |
| 28608 | particleObj.scale.set( 1, 1, 1 ); |
| 28609 | parent.add( particleObj ); |
| 28610 | |
| 28611 | var waypoint, |
| 28612 | geo = new THREE.SphereGeometry( 1, 16, 8 ), |
| 28613 | mat = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); |
| 28614 | |
| 28615 | for ( var i = 0; i < spline.points.length; i ++ ) { |
| 28616 | |
| 28617 | waypoint = new THREE.Mesh( geo, mat ); |
| 28618 | waypoint.position.copy( spline.points[ i ] ); |
| 28619 | parent.add( waypoint ); |
| 28620 | |
| 28621 | } |
| 28622 | |
| 28623 | }; |
| 28624 | |
| 28625 | this.init = function ( ) { |
| 28626 |
no test coverage detected