Line2.js 576 B

12345678910111213141516171819202122232425262728293031
  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. copy: function ( source ) {
  15. // todo
  16. return this;
  17. }
  18. } );