2
0

Line2.js 514 B

1234567891011121314151617181920212223
  1. /**
  2. * @author WestLangley / http://github.com/WestLangley
  3. *
  4. */
  5. THREE.Line2 = function ( geometry, material ) {
  6. THREE.LineSegments2.call( this );
  7. this.type = 'Line2';
  8. this.geometry = geometry !== undefined ? geometry : new THREE.LineGeometry();
  9. this.material = material !== undefined ? material : new THREE.LineMaterial( { color: Math.random() * 0xffffff } );
  10. };
  11. THREE.Line2.prototype = Object.assign( Object.create( THREE.LineSegments2.prototype ), {
  12. constructor: THREE.Line2,
  13. isLine2: true
  14. } );