Line.js 583 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @author mr.doob / http://mrdoob.com/
  3. */
  4. THREE.Line = function ( geometry, material, type ) {
  5. THREE.Object3D.call( this );
  6. this.geometry = geometry;
  7. this.material = ( material !== undefined ) ? material : new THREE.LineBasicMaterial( { color: Math.random() * 0xffffff } );
  8. this.type = ( type !== undefined ) ? type : THREE.LineStrip;
  9. if ( this.geometry ) {
  10. if ( ! this.geometry.boundingSphere ) {
  11. this.geometry.computeBoundingSphere();
  12. }
  13. }
  14. };
  15. THREE.LineStrip = 0;
  16. THREE.LinePieces = 1;
  17. THREE.Line.prototype = Object.create( THREE.Object3D.prototype );